Developer
News and Updates
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
  • Key-Value Store
  • Custom Entity Store
  • Transaction
  • Batch
Platform
Forge / Reference / KVS/Custom Entity Store API

Batch

Postman Collection
OpenAPI

The Batch API allows you to perform multiple operations on key-value pairs and/or custom entities in a single request. This can improve performance by reducing the number of network calls.

POST

Batch set key-value pairs

Sets multiple Key-Value Store and/or Custom Entity Store values in a single operation. Returns a type BatchResponse which contains successfulKeys and failedKeys. Optionally, you can specify a TTL (Time To Live) for each item to automatically expire the data after a specified duration.

Scopes
storage:app

Request

Request bodyapplication/json

array<anyOf [BatchSetTypedItemSchema, BatchSetUntypedItemSchema]>

Responses

Successfully set the keys to their corresponding values, returns list of successful and failed keys. Failed keys will contain details of the failure error codes.

application/json

BatchSetResponseSchema
POST/v1/batch/set
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 curl --request POST \ --url 'https://api.atlassian.com/forge/storage/kvs/v1/batch/set' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '[ { "key": "<string>", "value": "<string>", "entityName": "<string>", "options": { "ttl": { "value": 38, "unit": "SECONDS" } } } ]'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "successfulKeys": [ { "key": "<string>", "entityName": "<string>" } ], "failedKeys": [ { "key": "<string>", "entityName": "<string>", "error": { "code": "<string>", "message": "<string>" } } ] }
POST

Batch delete key-value and entity entries

Deletes multiple Key-Value Store and/or Custom Entity Store entries in a single operation. Returns a type BatchResponse which contains successfulKeys and failedKeys. Failed keys include an error object with code and message.

Scopes
storage:app

Request

Request bodyapplication/json

array<anyOf [BatchDeleteTypedItemSchema, BatchDeleteUntypedItemSchema]>

Responses

Successfully deleted the requested keys; returns list of successful and failed keys. Failed keys contain details of the failure error codes.

application/json

BatchDeleteResponseSchema
POST/v1/batch/delete
1 2 3 4 5 6 7 8 9 10 curl --request POST \ --url 'https://api.atlassian.com/forge/storage/kvs/v1/batch/delete' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '[ { "key": "<string>", "entityName": "<string>" } ]'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "successfulKeys": [ { "key": "<string>", "entityName": "<string>" } ], "failedKeys": [ { "key": "<string>", "entityName": "<string>", "error": { "code": "<string>", "message": "<string>" } } ] }
POST

Batch get key-value and entity entries

Gets multiple Key-Value Store and/or Custom Entity Store entries in a single operation. Each request item may include optional options.metadataFields to request metadata (createdAt, updatedAt, expireTime) in the response. Returns successfulKeys (each with value and optionally metadata) and failedKeys (with error.code, error.message).

Scopes
storage:app

Request

Request bodyapplication/json

array<anyOf [BatchGetTypedItemSchema, BatchGetUntypedItemSchema]>

Responses

Successfully retrieved the requested keys; returns list of successful keys (with value and optionally metadata) and failed keys (with error details).

application/json

BatchGetResponseSchema
POST/v1/batch/get
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 curl --request POST \ --url 'https://api.atlassian.com/forge/storage/kvs/v1/batch/get' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '[ { "key": "<string>", "entityName": "<string>", "options": { "metadataFields": { "0": "CREATED_AT" } } } ]'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 { "successfulKeys": [ { "key": "<string>", "entityName": "<string>", "value": "<string>", "createdAt": 116, "updatedAt": 121, "expireTime": "<string>" } ], "failedKeys": [ { "key": "<string>", "entityName": "<string>", "error": { "code": "<string>", "message": "<string>" } } ] }

Rate this page: