@Consumes(value="application/json")
@Path(value="/images")
public interface ImageApi
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String id)
Delete the specified image
|
void |
deleteMetadata(String id,
String key)
Delete a metadata item from an image.
|
Image |
get(String id)
List details of the specified image
|
Map<String,String> |
getMetadata(String id)
List all metadata for an image.
|
String |
getMetadata(String id,
String key)
Update the metadata for an image.
|
PagedIterable<Resource> |
list()
List all images (IDs, names, links)
|
PaginatedCollection<Resource> |
list(PaginationOptions options) |
PagedIterable<Image> |
listInDetail()
List all images (all details)
|
PaginatedCollection<Image> |
listInDetail(PaginationOptions options) |
Map<String,String> |
setMetadata(String id,
Map<String,String> metadata)
Sets the metadata for an image.
|
Map<String,String> |
updateMetadata(String id,
Map<String,String> metadata)
Update the metadata for a server.
|
String |
updateMetadata(String id,
String key,
String value)
Set a metadata item for an image.
|
@Named(value="image:list") @GET PagedIterable<Resource> list()
@Named(value="image:list") @GET PaginatedCollection<Resource> list(PaginationOptions options)
@Named(value="image:list") @GET @Path(value="/detail") PagedIterable<Image> listInDetail()
@Named(value="image:list") @GET @Path(value="/detail") PaginatedCollection<Image> listInDetail(PaginationOptions options)
@Named(value="image:get")
@GET
@Path(value="/{id}")
@Nullable
Image get(@PathParam(value="id")
String id)
id - id of the server@Named(value="image:delete")
@DELETE
@Path(value="/{id}")
void delete(@PathParam(value="id")
String id)
id - id of the image@Named(value="image:getMetadata")
@GET
@Path(value="/{id}/metadata")
Map<String,String> getMetadata(@PathParam(value="id")
String id)
id - id of the image@Named(value="image:setMetadata")
@PUT
@Path(value="/{id}/metadata")
@Produces(value="application/json")
Map<String,String> setMetadata(@PathParam(value="id")
String id,
Map<String,String> metadata)
id - id of the imagemetadata - a Map containing the metadata@Named(value="image:updateMetadata")
@POST
@Path(value="/{id}/metadata")
@Produces(value="application/json")
Map<String,String> updateMetadata(@PathParam(value="id")
String id,
Map<String,String> metadata)
id - id of the imagemetadata - a Map containing the metadata@Named(value="image:getMetadata")
@GET
@Path(value="/{id}/metadata/{key}")
@Nullable
String getMetadata(@PathParam(value="id")
String id,
@PathParam(value="key")
String key)
id - id of the imagemetadata - a Map containing the metadata@Named(value="image:updateMetadata")
@PUT
@Path(value="/{id}/metadata/{key}")
@Nullable
String updateMetadata(@PathParam(value="id")
String id,
@PathParam(value="key")
String key,
@PathParam(value="value")
String value)
id - id of the imagekey - the name of the metadata itemvalue - the value of the metadata itemCopyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.