Development guide
Development Guide
REST API
/**
* Get a list of images present in the IaaS platform filtering by name.
* @param filter Optional filter by name. It should be a regular expression.
* @return The list of images found.
*/
@GET
@Path("images")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@Authorized
public List<ImageInfoBean> images(@QueryParam("filter") String filter);
/**
* Force the download and register of a docker image.
* @param imageName Image name in Docker Hub.
* @param tag Desired tag. This parameter is optiona. If not present, latest will be used.
* @return Return asynchronously the information of the new image.
*/
@PUT
@Path("images")
@Produces(MediaType.APPLICATION_JSON)
@Authorized
public ChunkedOutput<ImageInfoBean> pull(
@QueryParam("imageName") final String imageName,
@QueryParam("tag") final String tag);
/**
* Delete an image provided its id.
* @param imageId Image Id to delete.
* @return Success status.
*/
@DELETE
@Path("images/{imageId}")
@Produces(MediaType.APPLICATION_JSON)
@Authorized
public ActionResponseBean delete(@PathParam("imageId") String imageId);
/**
* Webhook that will be called when a new image is pushed or updated to the Indigo repository.
* @param token The secret token needed to verify the origin of the call.
* @param payload The webhook payload sent by DockerHub.
*/
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("notify")
public ChunkedOutput<ImageInfoBean> notify(@QueryParam("token") String token,
ObjectNode payload);
/**
* Force the synchronization of the configured repositories.
* It will pull the images and then execute an update on each of them
* @return Asynchronously returns each updated image.
*/
@PUT
@Path("sync")
@Produces(MediaType.APPLICATION_JSON)
@Authorized
public ChunkedOutput<String> sync();Last updated