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.
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.
storage:apparray<anyOf [BatchSetTypedItemSchema, BatchSetUntypedItemSchema]>
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.
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"
}
}
}
]'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>"
}
}
]
}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.
storage:apparray<anyOf [BatchDeleteTypedItemSchema, BatchDeleteUntypedItemSchema]>
Successfully deleted the requested keys; returns list of successful and failed keys. Failed keys contain details of the failure error codes.
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>"
}
]'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>"
}
}
]
}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).
storage:apparray<anyOf [BatchGetTypedItemSchema, BatchGetUntypedItemSchema]>
Successfully retrieved the requested keys; returns list of successful keys (with value and optionally metadata) and failed keys (with error details).
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"
}
}
}
]'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: