NAME | TYPE | DESCRIPTION |
---|---|---|
|
| Unique ID for the image. |
|
| ID of the user who created the image. |
|
| ID of the user who owns the image. |
|
| ID of the namespace the image belongs to if any. |
|
| The name of the image. |
|
| The RFC3339 formatted string at which the image was created. |
|
| The API URL for the image entity itself. |
|
| The user who authored the image. |
|
| The user the image belongs to. |
|
| The namespace the image belongs to, if any. |
GET
/images
POST
/images
GET
/images/:id
DELETE
/images/:id
List the images for the currently authenticated user. The following parameters can be given as query parameters to the URL. This requires the image:read
permission.
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| Get the images with names like the given value. |
This will return a list of images. The list will be paginated to 25 images per page, and will be ordered lexically. If the images were paginated, then the pagination information will be in the response header Link
.
Link: <https://api.djinn-ci.com/images?page=1>; rel="prev",
<https://api.djinn-ci.com/images?page=3>; rel="next"
This will create an image for the currently authenticated user. This requires the image:write
permission.
Images can be created in two ways, either via a direct upload, or via a download. If the image is being created via an upload, then the contents of the image should be sent in the request body, and the parameters set as URL query parameters. If the image is being created via a download, then a regular JSON payload can be sent, specifying the download URL.
NAME | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
|
| Yes | The name of the image to create. |
|
| No | The namespace to upload the image to. |
|
| No* | The URL to download the image from. Only required if the image is being downloaded. |
$ curl -X POST \ -H "Authorization: Bearer 1a2b3c4d5f" \ -d "@alpine.qcow2" \ https://api.djinn-ci.com/images?name=alpine $ curl -X POST \ -H "Authorization: Bearer 1a2b3c4d5f" \ -d "@alpine.qcow2" \ https://api.djinn-ci.com/images?name=alpine&namespace=djinn $ curl -X POST \ -H "Authorization: Bearar 1a2b3c4d5f" \ -H "Content-Type: application/json" \ -d '{"name": "alpine", "namespace": "djinn", "download_url": "https://example.com/alpine"}' https://api.djinn-ci.com/images
This will delete the image by the given :id
. This requires the image:delete
permission.
This returns no content in the response body.