REST API



GET /{resource}

Where {resource} is either a model ID or a tag.

Returns a listing of {resource}, sliced by length and offset, optionally metarialized by the metadata flag.

Note the "Link" response header follows https://developer.github.com/v3/guides/traversing-with-pagination/


Path: /{resource}

Method: GET

Protocol: HTTP/1.1

Query Param:

length<int>
offset<int>
metadata<bool>

Headers:

X-Karma-Signature: 
X-Karma-Codec: json



GET /{resource}/{id}

Where {resource} is either a model ID or a tag.

Returns a value by ID, optionally metarialized by the metadata flag.


Path: /{resource}

Method: GET

Protocol: HTTP/1.1

Query Param:

metadata<bool>

Headers:

X-Karma-Signature: 
X-Karma-Codec: json



POST /{resource}

Where {resource} is either a model ID or a tag.

Parses the request body using the model at {resource} and issues a create call with the resulting value.


Path: /{resource}

Method: POST

Protocol: HTTP/1.1

Query Param:

metadata<bool>

Headers:

X-Karma-Signature: 
X-Karma-Codec: json



PUT /{resource}/{id}

Where {resource} is either a model ID or a tag.

Parses the request body using the model at {resource} and issue an update call with the resulting value.


Path: /{resource}/{id}

Method: PUT

Protocol: HTTP/1.1

Headers:

X-Karma-Signature: 
X-Karma-Codec: json



DELETE /{resource}

Where {resource} is either a model ID or a tag.

Deletes the model at {resource}.


Path: /{resource}

Method: DELETE

Protocol: HTTP/1.1

Headers:

X-Karma-Signature: 
X-Karma-Codec: json



DELETE /{resource}/{id}

Where {resource} is either a model ID or a tag.

Deletes an object by ID.


Path: /{resource}/{id}

Method: DELETE

Protocol: HTTP/1.1

Headers:

X-Karma-Signature: 
X-Karma-Codec: json