Extensions can make use of Storage API to access & modify data from the extension's DB storage. The available storage API 's are,
- Add data to storage
- Get data from storage
- Delete data from storage
#STORAGE_DATA_OBJECT
Every storage object has the following properties.
#STORAGE_DATA_OBJECT
- {
- "key" : "color-red-data-id-278783",
- "queriableValue" : "color-red-datas",
- "value" : {
- "myResult" : "Diluted solution for red color experiment 128ml "
- }
- }
Add data to storage
Use this API to add data to the extension storage.
Add data to storage:
Request Format:
URL : https://desk.zoho.com/api/v1/installedExtensions/{{installationId}}/storage
OAuth Scope : Desk.extensions.CREATE
RequestMethod : POST
RequestHeaders : orgId, Authorization
Content-Type : application/json
RequestBody : #STORAGE_DATA_OBJECT.
Response Format:
ResponseCode : 200
Content-Type : application/json
Response : #STORAGE_DATA_OBJECT
Get data from storage
Use this API to get data from the extension storage with the matching criteria.
Get data from storage:
Request Format:
URL : https://desk.zoho.com/api/v1/installedExtensions/{{installationId}}/storage
OAuth Scope : Desk.extensions.READ
RequestMethod : GET
RequestHeaders : orgId, Authorization
QueryParams : key, queriableValue, from, limit
Response Format:
ResponseCode : 200
Content-Type : application/json
Response : JSONObject with data property
containing the result as array of #STORAGE_DATA_OBJECT.
Delete data from storage
Use this API to delete data from the extension storage specifying the key.
Delete data from storage:
Request Format:
URL : https://desk.zoho.com/api/v1/installedExtensions/{{installationId}}/storage
OAuth Scope : Desk.extensions.DELETE
RequestMethod : DELETE
RequestHeaders : orgId, Authorization
QueryParams : key
Response Format:
ResponseCode : 200