Key Value
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.
DELETE /sfp/api/key-value/{key} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
No content
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.
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.
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.
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.
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"
}
Last updated
Was this helpful?