Libraries
register_library
Introduced in version 1
Summary: POST /v1/<namespace>/libraries/<name>
Register the specified library name for the authenticated user.
Request JSON Schema
{ "additionalProperties": false, "properties": { "library-name": { "type": "string" } }, "required": [ "library-name" ], "type": "object" }
Response JSON Schema
{ "additionalProperties": false, "properties": { "library-id": { "type": "string" } }, "required": [ "library-id" ], "type": "object" }
push_library_revision
Introduced in version 1
Summary: POST /v1/<namespace>/libraries/<name>/<library_id>
Create a new revision of the specified library.
Request JSON Schema
{ "properties": { "api": { "type": "integer" }, "content": { "type": "string" }, "hash": { "type": "string" }, "patch": { "type": "integer" } }, "required": [ "api", "patch", "content", "hash" ], "type": "object" }
Response JSON Schema
{ "properties": { "api": { "type": "integer" }, "charm-name": { "type": "string" }, "hash": { "type": "string" }, "library-id": { "type": "string" }, "library-name": { "type": "string" }, "patch": { "type": "integer" } }, "required": [ "charm-name", "library-id", "library-name", "api", "patch", "hash" ], "type": "object" }
fetch_library
Introduced in version 1
Summary: GET /v1/<namespace>/libraries/<name>/<library_id>
Get library metadata and content.
URL Parameters
{ "properties": { "api": { "pattern": "^[0-9]*$", "type": "string" }, "patch": { "pattern": "^[0-9]*$", "type": "string" } }, "type": "object" }
- api
- Must match regex "^[0-9]*$"
- patch
- Must match regex "^[0-9]*$"
Response JSON Schema
{ "properties": { "api": { "type": "integer" }, "charm-name": { "type": "string" }, "content": { "type": "string" }, "hash": { "type": "string" }, "library-id": { "type": "string" }, "library-name": { "type": "string" }, "patch": { "type": "integer" } }, "required": [ "charm-name", "library-id", "library-name", "api", "patch", "hash", "content" ], "type": "object" }
fetch_libraries
Introduced in version 1
Summary: POST /v1/<namespace>/libraries/bulk
Get the information for "tip" versions of several libraries at once.
fetch_libraries changelog
- Version 30: Added patch field.
Request JSON Schema
{ "items": { "additionalProperties": false, "minItems": 1, "properties": { "api": { "type": "integer" }, "charm-name": { "type": "string" }, "library-id": { "type": "string" }, "library-name": { "type": "string" }, "patch": { "introduced_at": 30, "type": [ "integer", "null" ] } }, "type": "object" }, "type": "array" }
Response JSON Schema
{ "additionalProperties": false, "properties": { "libraries": { "items": { "properties": { "api": { "type": "integer" }, "charm-name": { "type": "string" }, "hash": { "type": "string" }, "library-id": { "type": "string" }, "library-name": { "type": "string" }, "patch": { "type": "integer" } }, "required": [ "charm-name", "library-id", "library-name", "api", "patch", "hash" ], "type": "object" }, "type": "array" } }, "required": [ "libraries" ], "type": "object" }