website logo
⌘K
πŸ–οΈIntroduction to hyper cloud
🍎Getting Started
😍What's New
Blueberry Migration Guide
πŸ’ͺWorkshops
Deno Workshops
NodeJS Workshops
⚑Quickstarts
NodeJS Quickstarts
πŸ”ŒAPI Reference (hyper cloud)
🍎Basics
⚑hyper connect
πŸ”‘JWT Auth
πŸ’ΎData API
🏎️Cache API
πŸ”ŽSearch API
πŸ—„οΈStorage API
πŸ€“Queue API
πŸ”“Sign In
⚑Applications
βš™οΈSettings
πŸ”‘App Keys
πŸ‘₯Teams
Switching Between Accounts
Application Services
Application Service Instances
Adding a Queue Service
Adding a Search Service
Subscriptions
πŸ€‘Upgrade
πŸ“•Terminology
Parameters
πŸ’³Billing
Payment and Pricing Terms
πŸ’ΌLegal
Terms of Service
Acceptable Use Policy
Privacy Policy
πŸ•ΆοΈHyper Vision
Docs powered byΒ archbeeΒ 
14min

Update a Document

PUT /{appname}/data/{servicename}/{_id}

This command updates an existing document in your data service, you can change/add any property on the JSON document except the _id property it must stay the same. If you need to change the _id, simply remove the existing document and create a new document with the new _id.

The update command only supports full document updates, not partial updates.

Parameters

Path

  • appname - string - the name of your hyper cloud application.
  • servicename - string - the name of your hyper cloud service.
  • _id - string - unique document identifier.
  • See parametersο»Ώ

Request Body

A JSON document with one-to-many fields, an _id field is required. No other fields that start with _ are allowed. Each field name must follow the following rules:

  • must begin with a lowercase letter (a-z), unless it is the _id field.
  • must be lowercase letters (a-z)
  • digits (0-9)
  • any of these characters _ $ + -

Request Payload Limit

When creating or updating a document within the Data service, the request body payload size limit for the Data service is 5MB.

JSON
|

Examples

Don't forget!

Be sure to set your HYPER environment variable with the value of your hyper app's connection string.

Node.js
Curl
|

Responses

When making a request to this endpoint you can get the following responses returned:

Status Code

Description

Response

201

Successfully updated document

{"ok": true, "id": "1234"}

500

An error occurred trying to update the document

{"ok": false, "msg": "..."}

Need Help?

You can always reach out to our support team for any additional assistance on slack.

Updated 24 Mar 2022
Did this page help you?
Yes
No
UP NEXT
Delete a Document
Docs powered byΒ archbeeΒ 
TABLE OF CONTENTS
PUT /{appname}/data/{servicename}/{_id}
Parameters
Path
Request Body
Request Payload Limit
Examples
Don't forget!
Responses
Need Help?