Key Value
Creates a new key-value pair. Will fail if the key already exists. Use upsert endpoint to create or update. Values can be any JSON-serializable data. Optional TTL and tags can be specified.
The key-value pair has been successfully created.
The key already exists.
Internal server error.
POST /sfp/api/key-value HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"key": "text",
"value": "text"
}
{
"key": "text",
"value": "text"
}
Creates a new key-value pair or updates an existing one. This is the preferred method for storing data when you want to ensure the value is saved regardless of whether the key exists.
The key-value pair has been successfully created or updated.
Internal server error.
POST /sfp/api/key-value/upsert HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"key": "text",
"value": "text"
}
{
"key": "text",
"value": "text"
}
Retrieves the value associated with the specified key. Returns 404 if the key does not exist. Expired keys (if TTL was set) are automatically removed and will return 404.
The value has been successfully retrieved.
The key was not found.
Internal server error.
GET /sfp/api/key-value/{key} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
No content
Updates an existing key-value pair. Will fail with 404 if the key does not exist. Use this when you need to ensure the key exists before updating. TTL and tags can also be updated.
The value has been successfully updated.
The key was not found.
Internal server error.
PUT /sfp/api/key-value/{key} HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"value": "text"
}
{
"key": "text",
"value": "text"
}
Permanently removes a key-value pair from storage. Returns 404 if the key does not exist. This operation cannot be undone. Only users with owner role or application tokens can perform this operation.
The key-value pair has been successfully deleted.
The key was not found.
Internal server error.
DELETE /sfp/api/key-value/{key} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
No content
Was this helpful?