Create An Image Source
Create an image source that can be used to create images from.
Requires the images-import permission.
query
value
- namestringoptional
The name of the image source.
- typestring
The type of import:
direct
|stack-build
- originobjectThe origin of the image source.Show child fields
- aboutobjectoptional
Contains details regarding the source.
Show child fields
Returns
Returns an source resource, otherwise returns an Error.
POST /v1/images/sources
Example Request
$ curl https://api.cycle.io/v1/images/sources \-H"Authorization: Bearer API_KEY"\-H"X-Hub-Id: HUB_ID"\-H "Content-Type: application/json" \-d '{"name":"Demo Image Source","type":"direct","origin":{"type":"docker-hub","details":{"target":"node:alpine"}}}' \-X POST
Example Response
{"data": {"id": "5b9c2a77b6393d0001eb45fd","type": "direct","name": "demo","about": {"description": null},"origin": {"type": "docker-hub","details": {"target": "cycleplatform/getting-started:latest"}},"creator": {"id": "5a232a77b6393d0001ac2df2","type": "api-key"},"hub_id": "5fff2a77b6393d0001eb3333","state": {"changed": "2021-02-10T20:08:29.734Z","current": "live"},"events": {"created": "2021-02-10T20:08:29.734Z","updated": "0001-01-01T00:00:00Z","deleted": "0001-01-01T00:00:00Z"}}}