Tutorials
edgeEngine mCM API
mimik Container API
Retrieves a list of images cached locally on the node
Code | Description |
---|---|
200 |
Get the images "data": [ { "id": "sha256:4dcab49015d4", "name": "mimik/mdrive/v1", "repoDigests": [ [ "sha256:4dcab49015d4", "sha256:3c9clb11a52b" ] ], "created": 1505947350, "size": 1024, "containers": 2 } ] } |
create a image by uploading the image bundle
Name | Description |
---|---|
newImage *required object (body) |
the image information { "url": "http://containerregistry.com/example.", "base64Image": "string" } Parameter content type |
mode string (query) |
Switch to toggle from downloading the payload to downloading the reference of the payload. Available values : payload, reference Default value : reference |
Code | Description |
---|---|
201 |
Image created successfully { "url": "http://containerregistry.com/example.", "base64Image": "string" } |
remove a image
Name | Description |
---|---|
id *required string (path) |
GUID ot identify the image id – GUID ot identify the image |
Code | Description |
---|---|
200 |
Deleted Image Information { "id": "sha256:4dcab49015d4", "name": "mimik/mdrive/v1", "repoDigests": [ [ "sha256:4dcab49015d4", "sha256:3c9clb11a52b" ] ], "created": 1505947350, "size": 1024, "containers": 2 } |
404 | image cannot be found |
Retrieves a list of containers created on this node
Code | Description |
---|---|
200 |
list of containers { "data": [ { "id": "string", "image": "string", "imageId": "string", "created": 0, "state": "created", "env": [ "string" ] } ] } |
create an instance of container from a image
Name | Description |
---|---|
newContainer *required object (body) |
the container information { "name": "string", "image": "string", "env": [ "string" ] } Parameter content type |
Code | Description |
---|---|
201 |
New Container Information { "id": "string", "image": "string", "imageId": "string", "created": 0, "state": "created", "env": [ "string" ] } |
start/stop a container
Name | Description |
---|---|
id *required string (path) |
GUID ot identify the image id – GUID ot identify the image |
Action *required object (body) |
the container state { "action": "start" } Parameter content type |
Code | Description |
---|---|
200 |
Updated Container Information { "data": {} } |
404 | container not found |
removes a container
Name | Description |
---|---|
id *required string (path) |
GUID ot identify the image id – GUID ot identify the image |
Code | Description |
---|---|
200 |
Deleted Container Information { "id": "string", "image": "string", "imageId": "string", "created": 0, "state": "created", "env": [ "string" ] } |
404 | container not found |
description: | image object |
id |
string example: sha256:4dcab49015d4 A mimik image’s ID is a digest, which contains an SHA256 hash of the image’s JSON configuration object |
name |
string example: mimik/mdrive/v1 An image name is made up of slash-separated name components, optionally prefixed by a registry hostname. The hostname must comply with standard DNS rules, but may not contain underscores. |
repoDigests |
[
an array of filesystem layer of the container string example: List [ “sha256:4dcab49015d4”, “sha256:3c9clb11a52b” ]] |
created |
integer example: 1505947350 the epoch time in second |
size |
integer example: 1024 the size of the image in bytes |
containers |
integer example: 2 the number of containers created from this image |
description: | image object |
id |
string example: sha256:4dcab49015d4 A mimik image’s ID is a digest, which contains an SHA256 hash of the image’s JSON configuration object |
name |
string example: mimik/mdrive/v1 An image name is made up of slash-separated name components, optionally prefixed by a registry hostname. The hostname must comply with standard DNS rules, but may not contain underscores. |
repoDigests |
[
an array of filesystem layer of the container string example: List [ “sha256:4dcab49015d4”, “sha256:3c9clb11a52b” ]] |
created |
integer example: 1505947350 the epoch time in second |
size |
integer example: 1024 the size of the image in bytes |
containers |
integer example: 2 the number of containers created from this image |
description: | container object |
id |
string A GUID generated by the system |
image |
string The name of the image used |
imageId |
string The id of the image used |
created |
integer date the container is created. Epoch in seconds |
state |
string default: created the state of container. Valid strings are created|running|removing|paused Please note that in docker they have restarting|exited|dead, but does not make sense in the light container. Enum: [ created, running, removing, paused ] |
env |
string [A list of environment variables to set inside the container in the form [“VAR=value”, …]. A variable without = is removed from the environment, rather than to have an empty value. Please note that this properties will be filtered out when make the request because it may contain sensitive data that needs to be used to initialize the container] |
description: | container object |
id |
string A GUID generated by the system |
image |
string The name of the image used |
imageId |
string The id of the image used |
created |
integer date the container is created. Epoch in seconds |
state |
string default: created the state of container. Valid strings are created|running|removing|paused Please note that in docker they have restarting|exited|dead, but does not make sense in the light container. Enum: [ created, running, removing, paused ] |
env |
string [A list of environment variables to set inside the container in the form [“VAR=value”, …]. A variable without = is removed from the environment, rather than to have an empty value. Please note that this properties will be filtered out when make the request because it may contain sensitive data that needs to be used to initialize the container] |
description: | image creation object |
url |
string example: http://containerregistry.com/example. url to retrive the container image |
base64Image |
string a base64 encoded container image |
description: | updated container object |
action |
string example: start default: start Valid strings are start|stop Enum: [ start, stop ] |
description: | new container object |
name |
string name for the container. Please note that Docker allows one to give more than one name to a container. |
image |
string The name of the image to use when creating the container |
env |
string [A list of environment variables to set inside the container in the form [“VAR=value”, …]. A variable without = is removed from the environment, rather than to have an empty value.] |