Skip to content

Storage API

Overview

This document describes storage API

Version information

Version : 1.0.0

URI scheme

Schemes : HTTPS, HTTP

Paths

Store a value in the storage (cache)

POST /api/storage/kv

Parameters

Type Name Description Schema
Body Value
required
Value to be inserted into the storage Value

Responses

HTTP Code Description Schema
201 Value stored successfully Key
400 Bad request ErrorResponse
401 Unauthorized No Content
405 Method not allowed No Content
503 Feature disabled ErrorResponse

Consumes

  • application/json

Security

Type Name
Unknown basic_auth

Example HTTP request

Request path
/api/storage/kv
Request body
{
  "value" : "valueA"
}

Example HTTP response

Response 201
{
  "value" : "ABCD-1234"
}
Response 400
{
  "Incorrect value" : {
    "error_code" : 8002,
    "error_message" : "Storage value cannot be empty"
  }
}
Response 503
{
  "Missing field" : {
    "error_code" : 1001,
    "error_message" : "API currently disabled"
  }
}

Retrieve a value from the storage for the given key

GET /api/storage/kv/{key_id}

Parameters

Type Name Schema
Path key_id
required
string

Responses

HTTP Code Description Schema
200 Value successfully retrieved Value
401 Unauthorized No Content
404 Not found ErrorResponse
405 Method not allowed No Content
503 Feature disabled ErrorResponse

Consumes

  • application/json

Security

Type Name
Unknown basic_auth

Example HTTP request

Request path
/api/storage/kv/string

Example HTTP response

Response 200
{
  "value" : "valueA"
}
Response 404
{
  "Non existing key" : {
    "error_code" : 8001,
    "error_message" : "A value for the given key does not exists"
  }
}
Response 503
{
  "Missing field" : {
    "error_code" : 1001,
    "error_message" : "Storage API is disabled"
  }
}

Definitions

ErrorResponse

Name Description Schema
error_code
optional
Example : 8001 integer (int32)
error_message
optional
Example : "Requested feature is currently not available" string

Key

Name Description Schema
value
optional
Key under which the provided value has been stored
Example : "ABCD-1234"
string

Value

Name Description Schema
value
required
Value to be inserted into the storage
Example : "valueA"
string