Class hierarchy

Warning

The HTTP API is a workin in progress and has not been implemented anywhere yet!

The class hierarchy is designed to reflect the class hierarchy of the code in subuserlib. Resource names are intentionally similar to method names. However, while method names are imperitive, resource names are declarative. For example, the method Repository.isTemporary() becomes the resource /registry/repositories/{repository}/temporary.

/registry

GET /registry/log

Get a log of changes to the registry.

PUT /registry/rollback

Rollback the registry to a previous state.

/registry/subusers

GET /registry/subusers

Get a list of subusers.

This request takes no query parameters.

Status code Status
200 OK

Body:

A JSON list of strings. Each string is the name of a subuser.

PUT /registry/subusers/{subuser-name}

Add or reconfigure a subuser.

Query parameters

DELETE /registry/subusers/{subuser-name}

GET /registry/subusers/{subuser-name}/description

Get a description of the given subuser.

This request takes no query parameters.

Status code Status
200 OK
404 Subuser does not exist

Body:

A plain text description of the given subuser.

GET /registry/subusers/{subuser-name}/permissions

PUT /registry/subusers/{subuser-name}/permissions

GET /registry/subusers/{subuser-name}/image-source

GET /registry/subusers/{subuser-name}/home-dir-on-host

GET /registry/subusers/{subuser-name}/locked

PUT /registry/subusers/{subuser-name}/locked

GET /registry/subusers/{subuser-name}/executable-shortcut-installed

PUT /registry/subusers/{subuser-name}/executable-shortcut-installed

/registry/repositories

GET /registry/repositories

Get a list of repositories.

This request takes no query parameters.

Status code Status
200 OK

Body:

A JSON list of strings. Each string is the name of a repository.

PUT /registry/repositories/{repository-name}

DELETE /registry/repositories/{repository-name}

GET /registry/repositories/{repository-name}/description

GET /registry/repositories/{repository-name}/display-name

GET /registry/repositories/{repository-name}/temporary

/registry/repositories/{repository}/image-sources

GET /registry/repositories/{repository-name}/image-sources

Get a list of image-sources.

This request takes no query parameters.

Status code Status
200 OK

Body:

A JSON list of strings. Each string is the name of an image-source.

GET /registry/repositories/{repository-name}/image-sources/{image-source-name}/permissions

GET /registry/repositories/{repository-name}/image-sources/{image-source-name}/description

GET /registry/repositories/{repository-name}/image-sources/{image-source-name}/dependencies

RPC

Running subusers

PUT /rpc/subuser/run

Lookup

GET /rpc/image-source

Look up the image source given an image source identifier.

Query parameters

Responce codes

Status code Status
200 OK
400 Malformed image Id

When the status is 200, the responce body is a plain text URL to the image source.

Ex:

GET /rpc/image-source
image-source-identifier: iceweasel@default


Gives:

/repositories/default/image-sources/iceweasel

Development

PUT /rpc/image-source/test

Test the given image-source.

Query parameters

PUT /rpc/subuser/dry-run

Maintenance

PUT /rpc/maintenance/update

Update all subuser images

PUT /rpc/maintenance/remove-old-images

PUT /rpc/maintenance/verify