Create a KV Table

post/kvservice.createtable/{tableName}

Creates a table in the Key-Value Database Storage.

Securitybasic or X-PriceFx-jwt
Request
path Parameters
tableName
required
string

A name of the table you want create. Only lower case letters, numbers and underscores are allowed. Do not use special characters.

Request Body schema: application/json

The sample request creates a table with four columns: sku, customer, record and payload (TEXT).
Note: The “payload” column is always added automatically and must not be present in the creation definition.

object
Array of objects
Array
columnType
string
Possible values: "UUID" "TEXT" "INT" "TIMESTAMP" "DECIMAL" "DATE"
columnName
string

A unique name of the column. Only lower case letters, numbers and underscores are allowed. Do not use special characters.

isPrimaryKey
boolean

Sets the column as a primary key. A primary key uniquely identifies a column, so it can be used for a look up. At least one column must be set as a primary key.

isIndexed
boolean

Additional non-Primary Key columns can be added for further filtering (you cannot filter on “payload”). If also fast lookup on these secondary columns is required they should be indexed. See also Performance Considerations.

Responses
200

A general response that contains data property with a content depending on returned objects (e.g., Product master table fields when calling the /fetch/P endpoint). Can be null.

Response Schema: application/json
object
node
string
data
object or null
status
integer
startRow
integer
endRow
integer
Request samples
application/json
{
  • "data": {
    • "keys": [
      • {
        • "columnType": "TEXT",
        • "columnName": "sku",
        • "isPrimaryKey": true
        },
      • {
        • "columnType": "TEXT",
        • "columnName": "customer",
        • "isPrimaryKey": true
        },
      • {
        • "columnType": "INT",
        • "columnName": "record",
        • "isIndexed": true
        }
      ]
    }
}
Response samples
application/json
{
  • "response": {
    • "node": "string",
    • "data": null,
    • "status": 0,
    • "startRow": 0,
    • "endRow": 0
    }
}