API

Buckets

getBuckets

GET /v1/buckets

Description

Get all buckets in database.

Responses

Table 1. http response codes

Code

Message

Datatype

200

{"buckets":["bucket"]}

JSON


getBucketByID

GET /v1/buckets/{id}

Description

Gets a bucket

Responses

Table 2. http response codes

Code

Message

Datatype

200

404


deleteBucketByID

DELETE /v1/buckets/{id}

Description

Deletes a bucket

Responses
Table 3. http response codes

Code

Message

Datatype

200


createBucketByID

POST /v1/buckets/{id}

Description

Creates a bucket

Table 4. parameters

Name

Description

Required

Default

Pattern

ID

Bucket name

X

Responses
Table 5. http response codes

Code

Message

Datatype

200

404


Keys

getBucketKeys

GET /v1/buckets/{bucketID}/keys

Description

Get all keys in a bucket

Responses
Table 6. http response codes

Code

Message

Datatype

200

{"key":"value","key2":"value2"}

JSON

404

{"details": "no kv pairs in bucket"}

JSON


getKVByID

GET /v1/buckets/{bucketID}/keys/{keyID}

Description

Get data from KV

Table 7. parameters

Name

Description

Required

Default

Pattern

bucketID

Bucket name

X

keyID

Key name

X

Responses
Table 8. http response codes

Code

Message

Datatype

200

{"key":"value"}

JSON

404

{"details":"kv not found"}

JSON


createKV

POST /v1/buckets/{bucketID}/keys/{keyID}

Description

Create KV pair

Table 9. parameters

Name

Description

Required

Default

Pattern

bucketID

Bucket name

X

keyID

Key name

X

Body

{"data": "your-value"}

X

Responses
Table 10. http response codes

Code

Message

Datatype

200


deleteKVByID

DELETE /v1/buckets/{bucketID}/keys/{keyID}

Description

Deletes a KV

Table 11. parameters

Name

Description

Required

Default

Pattern

bucketID

Bucket name

X

keyID

Key name

X

Responses
Table 12. http response codes

Code

Message

Datatype

200