Buggy Library API

Buggy Component and meta information API

Paths

List all components

GET /components

All the component meta ids of all registered components in this component library.

200
An array of all component meta IDs
Insert a new component

POST /components

Add a new component to the library. It is not possible to have two components with the same meta key and version in the registry.

201
The component was added successuflly.
400
The component it is not in a valid format and thus cannot be inserted.
409
The component already exists and thus cannot be inserted.
Number of components

GET /components/count

Gives the number of all registered components in the registry.

200
The number of components.
Information for a specific component.

GET /components/get/{meta}

Gets a JSON object describing the latest version of the component. It looks for the component via its meta key (i.e. component.meta). The latest version is specified via semver.
meta Meta key of the component path string

200
A component with the meta key was found and included in the response.
404
No component with the given meta key was found.
Information for a specific component.

GET /components/get/{meta}/version/{version}

Gets a JSON object describing the given version of the component. It looks for the component via its meta key (i.e. component.meta).
meta Meta key of the component path string
version The version of the component path string

200
A component with the meta key was found and included in the response.
404
No component with the given meta key at the specified version was found.
A configuration value

GET /config/{key}

Get the configuration value for key
key The configuration key path string

200
The value of the key.
404
No such key is defined.
Set a configuration value

POST /config/{key}

Create or update a configuration key and its value.
key The configuration key path string

204
The key was successfully updated.
Returns the whole database

GET /export

Get the JSON document describing the whole database.

200
The whole DB is returned.
Server information

GET /info

Sends information about the server. Which version it runs and which backend it uses.

200
An object with the server information
version: string
type: string
All meta keys for a component

GET /meta/{component}

Returns an array of all meta keys for this component, without their values.
component Meta key for the component path string

200
An array of all keys
400
No component with this meta key exists.
All meta keys for a component @version

GET /meta/{component}/version/{version}

Returns an array of all meta keys for this component that are valid in the given version, without their values.
component Meta key for the component path string
version The version of the component. This must be a valid semver version. Valid meta keys are those that at the specified version or the latest update before this version. E.g. a component at version 1.2.0 has a value specified in version 1.1.0 but not in 1.2.0, then the 1.1.0 version value is taken. path string

200
An array of all keys valid at the given version
400
No component with this meta key exists.
Meta key value for a component

GET /meta/{component}/version/{version}/{key}

Returns the value of the meta key for this component.
component Meta key for the component path string
version The version of the component. This must be a valid semver version. Valid meta keys are those that at the specified version or the latest update before this version. E.g. a component at version 1.2.0 has a value specified in version 1.1.0 but not in 1.2.0, then the 1.1.0 version value is taken. path string
key Meta key that is created or updated. path string

200
The value of the meta key that is valid at the given version. Type can be anything.
400
No component with this meta key exists.
404
The component does not have meta information for this key.
Set a meta key

POST /meta/{component}/version/{version}/{key}

Sets a meta key for the specified component for the latest version.
component Identifier for the component path string
version The version of the component. This must be a valid semver version. Valid meta keys are those that at the specified version or the latest update before this version. E.g. a component at version 1.2.0 has a value specified in version 1.1.0 but not in 1.2.0, then the 1.1.0 version value is taken. path string
key Meta key that is created or updated. path string

204
The key was updated for the component in the given version.
400
No component with this meta key exists.
Meta key value for a component

GET /meta/{component}/{key}

Returns the value of the meta key for this component.
component Meta key for the component path string
key Meta key that is created or updated. path string

200
The value of the meta key. Type can be anything.
400
No component with this meta key exists.
Set a meta key

POST /meta/{component}/{key}

Sets a meta key for the specified component for the latest version.
component Identifier for the component path string
key Meta key that is created or updated. path string

204
The key was updated for the component.
400
No component with this meta key exists.
404
The component does not have meta information for this key.

Definitions