Overview

HTTP Verbs

EAMT API tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.

Verb Usage

GET

Used to retrieve a resource

POST

Used to create a new resource

PUT

Used to update resource

DELETE

Used to delete an existing resource

EAMT API tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.

Status code Usage

200 OK

The request completed successfully

201 Created

A new resource has been created successfully. The resource’s URI is available from the response’s Location header

204 No Content

An update to an existing resource has been applied successfully

400 Bad Request

The request was malformed. The response body will include an error providing further information

403 Request Forbidden

The request don’t have enough privileges

404 Not Found

Resources

/api/v1/deploymentprofile

Provides operations on Deployments.

getDeploymentByID

A GET request is used to access the Deployment read.

URL

/api/v1/deploymentprofile/{deploymentid}

Request structure

GET /api/v1/deploymentprofile/5ee21e9802743900e7d446bb HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MiwiaWF0IjoxNTkxODc3MjcyLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.ttpRLP0qkqEOOQASinDwHAD1vb5HBzc6d-PJlT0dURY
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 2786
Content-Type: application/json;charset=UTF-8

{"id":"5ee21e9802743900e7d446bb","name":"analysis_service_deploy","templateID":"5ddd00d3658d290007e7f2f9","content":null,"components":[{"id":null,"name":"analysiscomponent","required":true,"ports":[{"hostPort":8400,"componentPort":8400}],"networks":["construction-network"],"dependson":["databasecomponent"],"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":true,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5ddd00d3658d290007e7f2f9","project":"analysis_service","versionId":"5ddd0165658d290007e7f30a","tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set1","name":"Common Setting 1","type":"STRING","description":"Common Setting","value":"deploy-set-1","common":true,"visibleToUsers":true},{"key":"track-code","name":"Tracking Code","type":"STRING","description":"Tracking code for the serivce","value":"track-code-value","common":true,"visibleToUsers":false}],"restartPolicy":"always","minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":{"5dba97b218d38900072f733f":[{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"5678"}],"5dd77509658d290007e79dc9":[{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"4321"}]},"cloudProvider":null},{"id":null,"name":"databasecomponent","required":true,"ports":null,"networks":["construction-network"],"dependson":null,"image":{"id":null,"name":"analysis_service/mongo:v0.1","published":true,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5ddd00d3658d290007e7f2f9","project":"analysis_service","versionId":"5ddd0165658d290007e7f30a","tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set2","name":"Common Setting 2","type":"STRING","description":"Common Setting 2","value":"deploy-set-2","common":true,"visibleToUsers":true},{"key":"track-code2","name":"Tracking code","type":"STRING","description":"Tracking code for the serivce","value":"track-code-2","common":true,"visibleToUsers":false}],"restartPolicy":"no","minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":{"5dba97b218d38900072f733f":[{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"8765"}],"5dd77509658d290007e79dc9":[{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"1234"}]},"cloudProvider":null}],"networks":["construction-network"],"volumes":["data:/data","conf:/conf"],"deviceIds":["5dd77509658d290007e79dc9","5dba97b218d38900072f733f"],"status":"READYFORDEPLOY","createTime":0,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","taskId":"5dd775e1658d290007e79dce"}

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentprofile/5ee21e9802743900e7d446bb' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MiwiaWF0IjoxNTkxODc3MjcyLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.ttpRLP0qkqEOOQASinDwHAD1vb5HBzc6d-PJlT0dURY'

Response Fields

Path Type Description

id

String

ID of the deployment, created by EAMT

name

String

The name of the deployment.

templateID

String

The service ID this deployment used.

content

Null

The final deployment content.

components.[]

Array

The service components for this deployment.

networks

Array

A list of network names used by this deployment.

volumes

Array

A list of volumes used by this deployment.

deviceIds

Array

Device ID list that this deployment will deploy to

status

String

The deployment status

createTime

Number

When this deployment was created.

updateTime

Number

Last update time.

userId

String

User Id who create this deployment.

taskId

String

Taks id which can be used to query the task status for this deployment.

components.[].id

String

ID of the component, created by EAMT.

components.[].name

String

The name of the component.

components.[].required

Boolean

The component is required or not.

components.[].ports.[]

Array

An array of the component ports.

components.[].networks

Array

A list of network names used by this component.

components.[].volumes

Array

A list of volumes used by this component.

components.[].dependson

Array

An array of the component depends on.

components.[].image

Object

The Docker image of the component.

components.[].image.project

String

The service name of the Docker image.

components.[].image.versionId

String

The version Id of the Docker image.

components.[].image.tag

String

The tag of the Docker image.

components.[].image.id

String

The id of the Docker image.

components.[].image.name

String

The name of the Docker image.

components.[].image.published

Boolean

The Docker image is published or not.

components.[].image.publishAddress

String

The publishAddress of the Docker image. Currently it is not used yet.

components.[].image.digest

String

The digest of the Docker image.

components.[].image.buildID

String

The buildID of the Docker image. Currently it is not used yet.

components.[].image.serviceID

String

The serviceID of the Docker image.

components.[].envSettings.[]

Array

An array of the component environment settings.

components.[].restartPolicy

String

The component restart policy.

components.[].minimalRequiredCPU

Number

The component minimal required CPU.

components.[].minimalRequiredMemory

Number

The component minimal required memory.

components.[].minimalRequiredStorage

Number

The component minimal required storage.

components.[].customSettings

Object

An Map of the component custom settings. Key represents the device ID and value is the value is an list of environment settings(without common and visibleToUsers field).

components.[].cloudProvider

Object

An Map of the component cloud settings. Key is cloud name and the value an list of environment settings.

components.[].ports.[].hostPort

Number

Port is used on the device to access the service.

components.[].ports.[].componentPort

Number

Service port.

components.[].envSettings.[].key

String

The identifier of the environment variable. The service will use this key to get the value of the environment variable in their code.

components.[].envSettings.[].name

String

The display name of the environment variable. It will be display in the deployment builder wizard UI when user build a new deployment.

components.[].envSettings.[].type

String

The type of this environment variable, supported types include : STRING,BOOLEAN,NUMBER

components.[].envSettings.[].description

String

The description of this environment variable.

components.[].envSettings.[].value

String

The default value of this environment variable.

components.[].envSettings.[].common

Boolean

If set this field to true, when user build a deployment he only need to set the value once. The value will be applied to all devices. If set this field to false, the device can have different values, user need to specify a value for each device.

components.[].envSettings.[].visibleToUsers

Boolean

Boolean, when the value is false it means user cannot see this environment variable when they build a deployment.

getDeploymentByName

A GET request is used to access the Deployment read.

URL

/api/v1/deploymentprofile/name/{name}

Request structure

GET /api/v1/deploymentprofile/name/analysis_service_deploy HTTP/1.1
Host: localhost:8080
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU

Example response

HTTP/1.1 200 OK
Content-Length: 2786
Content-Type: application/json;charset=UTF-8

{"id":"5ee21e9902743900e7d446be","name":"analysis_service_deploy","templateID":"5ddd00d3658d290007e7f2f9","content":null,"components":[{"id":null,"name":"analysiscomponent","required":true,"ports":[{"hostPort":8400,"componentPort":8400}],"networks":["construction-network"],"dependson":["databasecomponent"],"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":true,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5ddd00d3658d290007e7f2f9","project":"analysis_service","versionId":"5ddd0165658d290007e7f30a","tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set1","name":"Common Setting 1","type":"STRING","description":"Common Setting","value":"deploy-set-1","common":true,"visibleToUsers":true},{"key":"track-code","name":"Tracking Code","type":"STRING","description":"Tracking code for the serivce","value":"track-code-value","common":true,"visibleToUsers":false}],"restartPolicy":"always","minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":{"5dba97b218d38900072f733f":[{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"5678"}],"5dd77509658d290007e79dc9":[{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"4321"}]},"cloudProvider":null},{"id":null,"name":"databasecomponent","required":true,"ports":null,"networks":["construction-network"],"dependson":null,"image":{"id":null,"name":"analysis_service/mongo:v0.1","published":true,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5ddd00d3658d290007e7f2f9","project":"analysis_service","versionId":"5ddd0165658d290007e7f30a","tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set2","name":"Common Setting 2","type":"STRING","description":"Common Setting 2","value":"deploy-set-2","common":true,"visibleToUsers":true},{"key":"track-code2","name":"Tracking code","type":"STRING","description":"Tracking code for the serivce","value":"track-code-2","common":true,"visibleToUsers":false}],"restartPolicy":"no","minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":{"5dba97b218d38900072f733f":[{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"8765"}],"5dd77509658d290007e79dc9":[{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"1234"}]},"cloudProvider":null}],"networks":["construction-network"],"volumes":["data:/data","conf:/conf"],"deviceIds":["5dd77509658d290007e79dc9","5dba97b218d38900072f733f"],"status":"READYFORDEPLOY","createTime":0,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","taskId":"5dd775e1658d290007e79dce"}

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentprofile/name/analysis_service_deploy' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU'

Response Fields

Path Type Description

id

String

ID of the deployment, created by EAMT

name

String

The name of the deployment.

templateID

String

The service ID this deployment used.

content

Null

The final deployment content.

components.[]

Array

The service components for this deployment.

networks

Array

A list of network names used by this deployment.

volumes

Array

A list of volumes used by this deployment.

deviceIds

Array

Device ID list that this deployment will deploy to

status

String

The deployment status

createTime

Number

When this deployment was created.

updateTime

Number

Last update time.

userId

String

User Id who create this deployment.

taskId

String

Taks id which can be used to query the task status for this deployment.

components.[].id

String

ID of the component, created by EAMT.

components.[].name

String

The name of the component.

components.[].required

Boolean

The component is required or not.

components.[].ports.[]

Array

An array of the component ports.

components.[].networks

Array

A list of network names used by this component.

components.[].volumes

Array

A list of volumes used by this component.

components.[].dependson

Array

An array of the component depends on.

components.[].image

Object

The Docker image of the component.

components.[].image.project

String

The service name of the Docker image.

components.[].image.versionId

String

The version Id of the Docker image.

components.[].image.tag

String

The tag of the Docker image.

components.[].image.id

String

The id of the Docker image.

components.[].image.name

String

The name of the Docker image.

components.[].image.published

Boolean

The Docker image is published or not.

components.[].image.publishAddress

String

The publishAddress of the Docker image. Currently it is not used yet.

components.[].image.digest

String

The digest of the Docker image.

components.[].image.buildID

String

The buildID of the Docker image. Currently it is not used yet.

components.[].image.serviceID

String

The serviceID of the Docker image.

components.[].envSettings.[]

Array

An array of the component environment settings.

components.[].restartPolicy

String

The component restart policy.

components.[].minimalRequiredCPU

Number

The component minimal required CPU.

components.[].minimalRequiredMemory

Number

The component minimal required memory.

components.[].minimalRequiredStorage

Number

The component minimal required storage.

components.[].customSettings

Object

An Map of the component custom settings. Key represents the device ID and value is the value is an list of environment settings(without common and visibleToUsers field).

components.[].cloudProvider

Object

An Map of the component cloud settings. Key is cloud name and the value an list of environment settings.

components.[].ports.[].hostPort

Number

Port is used on the device to access the service.

components.[].ports.[].componentPort

Number

Service port.

components.[].envSettings.[].key

String

The identifier of the environment variable. The service will use this key to get the value of the environment variable in their code.

components.[].envSettings.[].name

String

The display name of the environment variable. It will be display in the deployment builder wizard UI when user build a new deployment.

components.[].envSettings.[].type

String

The type of this environment variable, supported types include : STRING,BOOLEAN,NUMBER

components.[].envSettings.[].description

String

The description of this environment variable.

components.[].envSettings.[].value

String

The default value of this environment variable.

components.[].envSettings.[].common

Boolean

If set this field to true, when user build a deployment he only need to set the value once. The value will be applied to all devices. If set this field to false, the device can have different values, user need to specify a value for each device.

components.[].envSettings.[].visibleToUsers

Boolean

Boolean, when the value is false it means user cannot see this environment variable when they build a deployment.

getDeploymentProfileWithPage

A GET request is used to access the Deployment read.

URL

/api/v1/deploymentprofile/pagenumber/{pagenumber}/pagesize/{pagesize}

Request structure

GET /api/v1/deploymentprofile/pagenumber/1/pagesize/10 HTTP/1.1
Host: localhost:8080
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU

Example response

HTTP/1.1 200 OK
Content-Length: 3104
Content-Type: application/json;charset=UTF-8

{"content":[{"id":"5ee21e9902743900e7d446c1","name":"analysis_service_deploy","templateID":"5ddd00d3658d290007e7f2f9","content":null,"components":[{"id":null,"name":"analysiscomponent","required":true,"ports":[{"hostPort":8400,"componentPort":8400}],"networks":["construction-network"],"dependson":["databasecomponent"],"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":true,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5ddd00d3658d290007e7f2f9","project":"analysis_service","versionId":"5ddd0165658d290007e7f30a","tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set1","name":"Common Setting 1","type":"STRING","description":"Common Setting","value":"deploy-set-1","common":true,"visibleToUsers":true},{"key":"track-code","name":"Tracking Code","type":"STRING","description":"Tracking code for the serivce","value":"track-code-value","common":true,"visibleToUsers":false}],"restartPolicy":"always","minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":{"5dba97b218d38900072f733f":[{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"5678"}],"5dd77509658d290007e79dc9":[{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"4321"}]},"cloudProvider":null},{"id":null,"name":"databasecomponent","required":true,"ports":null,"networks":["construction-network"],"dependson":null,"image":{"id":null,"name":"analysis_service/mongo:v0.1","published":true,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5ddd00d3658d290007e7f2f9","project":"analysis_service","versionId":"5ddd0165658d290007e7f30a","tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set2","name":"Common Setting 2","type":"STRING","description":"Common Setting 2","value":"deploy-set-2","common":true,"visibleToUsers":true},{"key":"track-code2","name":"Tracking code","type":"STRING","description":"Tracking code for the serivce","value":"track-code-2","common":true,"visibleToUsers":false}],"restartPolicy":"no","minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":{"5dba97b218d38900072f733f":[{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"8765"}],"5dd77509658d290007e79dc9":[{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"1234"}]},"cloudProvider":null}],"networks":["construction-network"],"volumes":["data:/data","conf:/conf"],"deviceIds":["5dd77509658d290007e79dc9","5dba97b218d38900072f733f"],"status":"READYFORDEPLOY","createTime":0,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","taskId":"5dd775e1658d290007e79dce"}],"pageable":{"sort":{"sorted":true,"unsorted":false,"empty":false},"pageSize":10,"pageNumber":0,"offset":0,"paged":true,"unpaged":false},"totalPages":1,"totalElements":1,"last":true,"first":true,"sort":{"sorted":true,"unsorted":false,"empty":false},"numberOfElements":1,"size":10,"number":0,"empty":false}

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentprofile/pagenumber/1/pagesize/10' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU'

Response Fields

Path Type Description

content.[]

Array

An array of deploymentProfile

pageable

Object

pageable parameters

last

Boolean

Whether the current page is the last one.

totalPages

Number

totalPages

totalElements

Number

totalElements

number

Number

number

size

Number

size

sort

Object

sort parameters

numberOfElements

Number

numberOfElements

first

Boolean

Whether the current page is the first one.

empty

Boolean

empty

content.[].id

String

ID of the deployment, created by EAMT

content.[].name

String

The name of the deployment.

content.[].templateID

String

The service ID this deployment used.

content.[].content

Null

The final deployment content.

content.[].components.[]

Array

The service components for this deployment.

content.[].networks

Array

A list of network names used by this deployment.

content.[].volumes

Array

A list of volumes used by this deployment.

content.[].deviceIds

Array

Device ID list that this deployment will deploy to

content.[].status

String

The deployment status

content.[].createTime

Number

When this deployment was created.

content.[].updateTime

Number

Last update time.

content.[].userId

String

User Id who create this deployment.

content.[].taskId

String

Taks id which can be used to query the task status for this deployment.

content.[].components.[].id

String

ID of the component, created by EAMT.

content.[].components.[].name

String

The name of the component.

content.[].components.[].required

Boolean

The component is required or not.

content.[].components.[].ports.[]

Array

An array of the component ports.

content.[].components.[].networks

Array

A list of network names used by this component.

content.[].components.[].volumes

Array

A list of volumes used by this component.

content.[].components.[].dependson

Array

An array of the component depends on.

content.[].components.[].image

Object

The Docker image of the component.

content.[].components.[].image.project

String

The service name of the Docker image.

content.[].components.[].image.versionId

String

The version Id of the Docker image.

content.[].components.[].image.tag

String

The tag of the Docker image.

content.[].components.[].image.id

String

The id of the Docker image.

content.[].components.[].image.name

String

The name of the Docker image.

content.[].components.[].image.published

Boolean

The Docker image is published or not.

content.[].components.[].image.publishAddress

String

The publishAddress of the Docker image. Currently it is not used yet.

content.[].components.[].image.digest

String

The digest of the Docker image.

content.[].components.[].image.buildID

String

The buildID of the Docker image. Currently it is not used yet.

content.[].components.[].image.serviceID

String

The serviceID of the Docker image.

content.[].components.[].envSettings.[]

Array

An array of the component environment settings.

content.[].components.[].restartPolicy

String

The component restart policy.

content.[].components.[].minimalRequiredCPU

Number

The component minimal required CPU.

content.[].components.[].minimalRequiredMemory

Number

The component minimal required memory.

content.[].components.[].minimalRequiredStorage

Number

The component minimal required storage.

content.[].components.[].customSettings

Object

An Map of the component custom settings. Key represents the device ID and value is the value is an list of environment settings(without common and visibleToUsers field).

content.[].components.[].cloudProvider

Object

An Map of the component cloud settings. Key is cloud name and the value an list of environment settings.

content.[].components.[].ports.[].hostPort

Number

Port is used on the device to access the service.

content.[].components.[].ports.[].componentPort

Number

Service port.

content.[].components.[].envSettings.[].key

String

The identifier of the environment variable. The service will use this key to get the value of the environment variable in their code.

content.[].components.[].envSettings.[].name

String

The display name of the environment variable. It will be display in the deployment builder wizard UI when user build a new deployment.

content.[].components.[].envSettings.[].type

String

The type of this environment variable, supported types include : STRING,BOOLEAN,NUMBER

content.[].components.[].envSettings.[].description

String

The description of this environment variable.

content.[].components.[].envSettings.[].value

String

The default value of this environment variable.

content.[].components.[].envSettings.[].common

Boolean

If set this field to true, when user build a deployment he only need to set the value once. The value will be applied to all devices. If set this field to false, the device can have different values, user need to specify a value for each device.

content.[].components.[].envSettings.[].visibleToUsers

Boolean

Boolean, when the value is false it means user cannot see this environment variable when they build a deployment.

createDeployment

A POST request is used to create a Deployment.

URL

/api/v1/deploymentprofile

Request structure

POST /api/v1/deploymentprofile HTTP/1.1
Content-Length: 2627
Content-Type: application/json
Host: localhost:8080
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU

{ "name" : "analysis_service_deploy", "templateID" : "5ddd00d3658d290007e7f2f9", "components" : [ { "name" : "analysiscomponent", "required" : true, "ports" : [ { "hostPort" : 80, "componentPort" : 80 }, { "hostPort" : 8400, "componentPort" : 8400 } ], "networks" : [ "construction-network" ], "dependson" : [ "databasecomponent" ], "image" : { "project" : "analysis_service", "versionId" : "5ddd0165658d290007e7f30a", "name" : "analysis_service/nginx:v0.1", "published" : false, "serviceID" : "5ddd00d3658d290007e7f2f9" }, "volumes" : [ "data:/data", "conf:/conf" ], "envSettings" : [ { "key" : "cn-set1", "name" : "Common Setting 1", "type" : "STRING", "description" : "Common Setting", "value" : "deploy-set-1", "common" : true, "visibleToUsers" : true }, { "key" : "track-code", "name" : "Tracking Code Boolean", "type" : "BOOLEAN", "description" : "Tracking code for the serivce", "value" : "true", "common" : true, "visibleToUsers" : false } ], "restartPolicy" : "unless_stopped", "customSettings" : { "5dd77509658d290007e79dc9" : [ { "key" : "sp-set", "name" : "Specific Setting", "type" : "NUMBER", "description" : "Specific Setting", "value" : "4321" } ], "5dba97b218d38900072f733f" : [ { "key" : "sp-set", "name" : "Specific Setting", "type" : "NUMBER", "description" : "Specific Setting", "value" : "5678" } ] } }, { "name" : "databasecomponent", "required" : true, "networks" : [ "construction-network" ], "image" : { "project" : "analysis_service", "versionId" : "5ddd0165658d290007e7f30a", "name" : "analysis_service/mongo:v0.1", "published" : false, "serviceID" : "5ddd00d3658d290007e7f2f9" }, "volumes" : [ "data:/data", "conf:/conf" ], "envSettings" : [ { "key" : "cn-set2", "name" : "Common Setting 2", "type" : "STRING", "description" : "Common Setting 2", "value" : "deploy-set-2", "common" : true, "visibleToUsers" : true }, { "key" : "track-code2", "name" : "Tracking code", "type" : "STRING", "description" : "Tracking code", "value" : "track-code-2", "common" : true, "visibleToUsers" : false } ], "restartPolicy" : "on_failure", "customSettings" : { "5dd77509658d290007e79dc9" : [ { "key" : "spe-set2", "name" : "Specific Setting 2", "type" : "NUMBER", "description" : "Specific Setting 2", "value" : "1234" } ], "5dba97b218d38900072f733f" : [ { "key" : "spe-set2", "name" : "Specific Setting 2", "type" : "NUMBER", "description" : "Specific Setting 2", "value" : "8765" } ] } } ], "networks" : [ "construction-network" ], "volumes" : [ "data:/data", "conf:/conf" ], "deviceIds" : [ "5dd77509658d290007e79dc9", "5dba97b218d38900072f733f" ], "status" : "ACTIVE",  "userId" : "5d47ee5c3574a90007cb93e1" }

Request Fields

Path Type Description

name

String

The name of the deployment.

templateID

String

The service ID this deployment used.

components.[]

Array

The service components for this deployment.

networks

Array

Docker network name list used by this deployment

volumes

Array

Docker volume name list used by this deployment.

deviceIds

Array

Device ID list that this deployment will deploy to

status

String

The deployment status, either READYFORDEPOLY or DRAFT

components.[].id

String

ID of the component, created by EAMT.

components.[].name

String

The name of the component.

components.[].required

Boolean

The component is required or not.

components.[].ports.[]

Array

An array of the component ports.

components.[].networks

Array

A list of network names used by this component.

components.[].volumes

Array

A list of volumes used by this component.

components.[].dependson

Array

An array of the component depends on.

components.[].image

Object

The Docker image of the component.

components.[].image.project

String

The service name of the Docker image.

components.[].image.versionId

String

The version Id of the Docker image.

components.[].image.tag

String

The tag of the Docker image.

components.[].image.id

String

The id of the Docker image.

components.[].image.name

String

The name of the Docker image.

components.[].image.published

Boolean

The Docker image is published or not.

components.[].image.publishAddress

String

The publishAddress of the Docker image. Currently it is not used yet.

components.[].image.digest

String

The digest of the Docker image.

components.[].image.buildID

String

The buildID of the Docker image. Currently it is not used yet.

components.[].image.serviceID

String

The serviceID of the Docker image.

components.[].envSettings.[]

Array

An array of the component environment settings.

components.[].restartPolicy

String

The component restart policy.

components.[].minimalRequiredCPU

Number

The component minimal required CPU.

components.[].minimalRequiredMemory

Number

The component minimal required memory.

components.[].minimalRequiredStorage

Number

The component minimal required storage.

components.[].customSettings

Object

An Map of the component custom settings. Key represents the device ID and value is the value is an list of environment settings(without common and visibleToUsers field).

components.[].cloudProvider

Object

An Map of the component cloud settings. Key is cloud name and the value an list of environment settings.

components.[].ports.[].hostPort

Number

Port is used on the device to access the service.

components.[].ports.[].componentPort

Number

Service port.

components.[].envSettings.[].key

String

The identifier of the environment variable. The service will use this key to get the value of the environment variable in their code.

components.[].envSettings.[].name

String

The display name of the environment variable. It will be display in the deployment builder wizard UI when user build a new deployment.

components.[].envSettings.[].type

String

The type of this environment variable, supported types include : STRING,BOOLEAN,NUMBER

components.[].envSettings.[].description

String

The description of this environment variable.

components.[].envSettings.[].value

String

The default value of this environment variable.

components.[].envSettings.[].common

Boolean

If set this field to true, when user build a deployment he only need to set the value once. The value will be applied to all devices. If set this field to false, the device can have different values, user need to specify a value for each device.

components.[].envSettings.[].visibleToUsers

Boolean

Boolean, when the value is false it means user cannot see this environment variable when they build a deployment.

Example response

HTTP/1.1 201 Created
Location: http://localhost:8080/api/v1/deploymentprofile/5ee21e9902743900e7d446c0

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentprofile' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU' \
    -d '{ "name" : "analysis_service_deploy", "templateID" : "5ddd00d3658d290007e7f2f9", "components" : [ { "name" : "analysiscomponent", "required" : true, "ports" : [ { "hostPort" : 80, "componentPort" : 80 }, { "hostPort" : 8400, "componentPort" : 8400 } ], "networks" : [ "construction-network" ], "dependson" : [ "databasecomponent" ], "image" : { "project" : "analysis_service", "versionId" : "5ddd0165658d290007e7f30a", "name" : "analysis_service/nginx:v0.1", "published" : false, "serviceID" : "5ddd00d3658d290007e7f2f9" }, "volumes" : [ "data:/data", "conf:/conf" ], "envSettings" : [ { "key" : "cn-set1", "name" : "Common Setting 1", "type" : "STRING", "description" : "Common Setting", "value" : "deploy-set-1", "common" : true, "visibleToUsers" : true }, { "key" : "track-code", "name" : "Tracking Code Boolean", "type" : "BOOLEAN", "description" : "Tracking code for the serivce", "value" : "true", "common" : true, "visibleToUsers" : false } ], "restartPolicy" : "unless_stopped", "customSettings" : { "5dd77509658d290007e79dc9" : [ { "key" : "sp-set", "name" : "Specific Setting", "type" : "NUMBER", "description" : "Specific Setting", "value" : "4321" } ], "5dba97b218d38900072f733f" : [ { "key" : "sp-set", "name" : "Specific Setting", "type" : "NUMBER", "description" : "Specific Setting", "value" : "5678" } ] } }, { "name" : "databasecomponent", "required" : true, "networks" : [ "construction-network" ], "image" : { "project" : "analysis_service", "versionId" : "5ddd0165658d290007e7f30a", "name" : "analysis_service/mongo:v0.1", "published" : false, "serviceID" : "5ddd00d3658d290007e7f2f9" }, "volumes" : [ "data:/data", "conf:/conf" ], "envSettings" : [ { "key" : "cn-set2", "name" : "Common Setting 2", "type" : "STRING", "description" : "Common Setting 2", "value" : "deploy-set-2", "common" : true, "visibleToUsers" : true }, { "key" : "track-code2", "name" : "Tracking code", "type" : "STRING", "description" : "Tracking code", "value" : "track-code-2", "common" : true, "visibleToUsers" : false } ], "restartPolicy" : "on_failure", "customSettings" : { "5dd77509658d290007e79dc9" : [ { "key" : "spe-set2", "name" : "Specific Setting 2", "type" : "NUMBER", "description" : "Specific Setting 2", "value" : "1234" } ], "5dba97b218d38900072f733f" : [ { "key" : "spe-set2", "name" : "Specific Setting 2", "type" : "NUMBER", "description" : "Specific Setting 2", "value" : "8765" } ] } } ], "networks" : [ "construction-network" ], "volumes" : [ "data:/data", "conf:/conf" ], "deviceIds" : [ "5dd77509658d290007e79dc9", "5dba97b218d38900072f733f" ], "status" : "ACTIVE",  "userId" : "5d47ee5c3574a90007cb93e1" }'

updateDeployment

A PUT request is used to update a Deployment.

URL

/api/v1/deploymentprofile

Request structure

PUT /api/v1/deploymentprofile HTTP/1.1
Content-Length: 2771
Content-Type: application/json
Host: localhost:8080
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU

{"id":"5ee21e9902743900e7d446c3","name":"New_Name","templateID":"5ddd00d3658d290007e7f2f9","content":null,"components":[{"id":null,"name":"analysiscomponent","required":true,"ports":[{"hostPort":8400,"componentPort":8400}],"networks":["construction-network"],"dependson":["databasecomponent"],"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":true,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5ddd00d3658d290007e7f2f9","project":"analysis_service","versionId":"5ddd0165658d290007e7f30a","tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set1","name":"Common Setting 1","type":"STRING","description":"Common Setting","value":"deploy-set-1","common":true,"visibleToUsers":true},{"key":"track-code","name":"Tracking Code","type":"STRING","description":"Tracking code for the serivce","value":"track-code-value","common":true,"visibleToUsers":false}],"restartPolicy":"always","minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":{"5dba97b218d38900072f733f":[{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"5678"}],"5dd77509658d290007e79dc9":[{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"4321"}]},"cloudProvider":null},{"id":null,"name":"databasecomponent","required":true,"ports":null,"networks":["construction-network"],"dependson":null,"image":{"id":null,"name":"analysis_service/mongo:v0.1","published":true,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5ddd00d3658d290007e7f2f9","project":"analysis_service","versionId":"5ddd0165658d290007e7f30a","tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set2","name":"Common Setting 2","type":"STRING","description":"Common Setting 2","value":"deploy-set-2","common":true,"visibleToUsers":true},{"key":"track-code2","name":"Tracking code","type":"STRING","description":"Tracking code for the serivce","value":"track-code-2","common":true,"visibleToUsers":false}],"restartPolicy":"no","minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":{"5dba97b218d38900072f733f":[{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"8765"}],"5dd77509658d290007e79dc9":[{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"1234"}]},"cloudProvider":null}],"networks":["construction-network"],"volumes":["data:/data","conf:/conf"],"deviceIds":["5dd77509658d290007e79dc9","5dba97b218d38900072f733f"],"status":"READYFORDEPLOY","createTime":0,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","taskId":"5dd775e1658d290007e79dce"}

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentprofile' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU' \
    -d '{"id":"5ee21e9902743900e7d446c3","name":"New_Name","templateID":"5ddd00d3658d290007e7f2f9","content":null,"components":[{"id":null,"name":"analysiscomponent","required":true,"ports":[{"hostPort":8400,"componentPort":8400}],"networks":["construction-network"],"dependson":["databasecomponent"],"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":true,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5ddd00d3658d290007e7f2f9","project":"analysis_service","versionId":"5ddd0165658d290007e7f30a","tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set1","name":"Common Setting 1","type":"STRING","description":"Common Setting","value":"deploy-set-1","common":true,"visibleToUsers":true},{"key":"track-code","name":"Tracking Code","type":"STRING","description":"Tracking code for the serivce","value":"track-code-value","common":true,"visibleToUsers":false}],"restartPolicy":"always","minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":{"5dba97b218d38900072f733f":[{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"5678"}],"5dd77509658d290007e79dc9":[{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"4321"}]},"cloudProvider":null},{"id":null,"name":"databasecomponent","required":true,"ports":null,"networks":["construction-network"],"dependson":null,"image":{"id":null,"name":"analysis_service/mongo:v0.1","published":true,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5ddd00d3658d290007e7f2f9","project":"analysis_service","versionId":"5ddd0165658d290007e7f30a","tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set2","name":"Common Setting 2","type":"STRING","description":"Common Setting 2","value":"deploy-set-2","common":true,"visibleToUsers":true},{"key":"track-code2","name":"Tracking code","type":"STRING","description":"Tracking code for the serivce","value":"track-code-2","common":true,"visibleToUsers":false}],"restartPolicy":"no","minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":{"5dba97b218d38900072f733f":[{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"8765"}],"5dd77509658d290007e79dc9":[{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"1234"}]},"cloudProvider":null}],"networks":["construction-network"],"volumes":["data:/data","conf:/conf"],"deviceIds":["5dd77509658d290007e79dc9","5dba97b218d38900072f733f"],"status":"READYFORDEPLOY","createTime":0,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","taskId":"5dd775e1658d290007e79dce"}'

onboardDeployment

A POST request is used to provision a Deployment.

URL

/api/v1/deploymentprofile/{deploymentid}/onboard

Request structure

POST /api/v1/deploymentprofile/5dd775d6658d290007e79dcd/onboard HTTP/1.1
Host: localhost:8080
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU

Example response

Return task id of the deploy job.

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 24

5ee21e9902743900e7d446bf

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentprofile/5dd775d6658d290007e79dcd/onboard' -i -X POST \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU'

offboardDeployment

A POST request is used to offboard a Deployment.

URL

/api/v1/deploymentprofile/{deploymentid}/offboard

Request structure

POST /api/v1/deploymentprofile/5dd775d6658d290007e79dcd/offboard HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MiwiaWF0IjoxNTkxODc3MjcyLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.ttpRLP0qkqEOOQASinDwHAD1vb5HBzc6d-PJlT0dURY
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 24

5ee21e9802743900e7d446ba

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentprofile/5dd775d6658d290007e79dcd/offboard' -i -X POST \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MiwiaWF0IjoxNTkxODc3MjcyLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.ttpRLP0qkqEOOQASinDwHAD1vb5HBzc6d-PJlT0dURY'

saveComponentStats

A POST request is used to create a service component stats.

URL

/api/v1/deploymentprofile/component/stats

Request structure

POST /api/v1/deploymentprofile/component/stats HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3NCwiaWF0IjoxNTkxODc3Mjc0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.h4fYNd0BckDq-d4VcGjLtGeLxyjyXHPkcqUBVbs1b8o
Content-Length: 307
Content-Type: application/json
Host: localhost:8080

{"componentName":"DeviceServiceComponent","deploymentId":"5ddb5bce7dd8eb6964172cd0","deviceId":"5d4818ac37e70b260c4b704e","cpuPercentUsage":0.5,"memoryPercentUsage":0.2,"memoryUsage":512,"storagePercentUsage":0.1,"storageUsage":12,"dockerNetI":10.0,"dockerNetO":10.0,"dockerBlockI":10.0,"dockerBlockO":10.0}

Request Fields

Path Type Description

componentName

String

The name of the component.

deploymentId

String

The deployment id of the service.

deviceId

String

The device id of the service.

cpuPercentUsage

Number

The cpu percent of the service usage.

memoryPercentUsage

Number

The memory percent of the service usage.

memoryUsage

Number

The memory of the service usage(MB).

storagePercentUsage

Number

The storage percent of the service usage.

storageUsage

Number

The storage of the service usage(GB).

dockerNetI

Number

The docker net input stream network(KB).

dockerNetO

Number

The docker net output stream network(KB).

dockerBlockI

Number

The docker input stream block(MB).

dockerBlockO

Number

The docker output stream block(MB).

Example response

HTTP/1.1 201 Created
Location: http://localhost:8080/api/v1/services/5ee21e9a02743900e7d446c6

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentprofile/component/stats' -i -X POST \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3NCwiaWF0IjoxNTkxODc3Mjc0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.h4fYNd0BckDq-d4VcGjLtGeLxyjyXHPkcqUBVbs1b8o' \
    -H 'Content-Type: application/json' \
    -d '{"componentName":"DeviceServiceComponent","deploymentId":"5ddb5bce7dd8eb6964172cd0","deviceId":"5d4818ac37e70b260c4b704e","cpuPercentUsage":0.5,"memoryPercentUsage":0.2,"memoryUsage":512,"storagePercentUsage":0.1,"storageUsage":12,"dockerNetI":10.0,"dockerNetO":10.0,"dockerBlockI":10.0,"dockerBlockO":10.0}'

updateDeployment

A PUT request is used to update a service component state.

URL

/api/v1/deploymentprofile/component/state

Request structure

PUT /api/v1/deploymentprofile/component/state HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3NCwiaWF0IjoxNTkxODc3Mjc0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.h4fYNd0BckDq-d4VcGjLtGeLxyjyXHPkcqUBVbs1b8o
Content-Type: application/json
Content-Length: 338
Host: localhost:8080

{"id":"5ee21e9a02743900e7d446c5","componentName":"DeviceServiceComponent","deploymentId":"5ee21e9a02743900e7d446c4","deviceId":"5d4818ac37e70b260c4b704e","componentContainerName":"deviceservicecomponent_service","componentContainerId":"16d493ff02749fc5a283920c60480c2d2c6a1d4351ac59fe2b3c6994914ac0c8","status":"UNHEALTHY","updateTime":0}

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentprofile/component/state' -i -X PUT \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3NCwiaWF0IjoxNTkxODc3Mjc0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.h4fYNd0BckDq-d4VcGjLtGeLxyjyXHPkcqUBVbs1b8o' \
    -H 'Content-Type: application/json' \
    -d '{"id":"5ee21e9a02743900e7d446c5","componentName":"DeviceServiceComponent","deploymentId":"5ee21e9a02743900e7d446c4","deviceId":"5d4818ac37e70b260c4b704e","componentContainerName":"deviceservicecomponent_service","componentContainerId":"16d493ff02749fc5a283920c60480c2d2c6a1d4351ac59fe2b3c6994914ac0c8","status":"UNHEALTHY","updateTime":0}'

getStateByDeploymentIdAndDeviceId

A GET request is used to get a service component state by deployment id and device id.

URL

/api/v1/deploymentprofile/state/deploymentid/{deploymentid}/deviceid/{deviceid}

Request structure

GET /api/v1/deploymentprofile/state/deploymentid/5d47d8ba37e70b260c4b7041/deviceid/5d4818ac37e70b260c4b704e HTTP/1.1
Host: localhost:8080
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 338

[{"id":"5ee21e9902743900e7d446c2","componentName":"DeviceServiceComponent","deploymentId":"5d47d8ba37e70b260c4b7041","deviceId":"5d4818ac37e70b260c4b704e","componentContainerName":"deviceservicecomponent_service","componentContainerId":"16d493ff02749fc5a283920c60480c2d2c6a1d4351ac59fe2b3c6994914ac0c8","status":"HEALTHY","updateTime":0}]

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentprofile/state/deploymentid/5d47d8ba37e70b260c4b7041/deviceid/5d4818ac37e70b260c4b704e' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MywiaWF0IjoxNTkxODc3MjczLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.M8NLtV-6AMKFrdSSrCBMLwVdNKATQ9r8ptBB_J-KetU'

Response Fields

Path Type Description

[]

Array

An array of state

[].id

String

ID of the state, created by EAMT

[].componentName

String

The name of the component.

[].deploymentId

String

The deployment id of the service.

[].deviceId

String

The device id of the service.

[].componentContainerName

String

The container name of the component.

[].componentContainerId

String

The container id of the component.

[].status

class com.vmware.nebula.datamodel.stats.ServiceComponentState$ServiceComponentStatus

Health status of component.

[].updateTime

Number

When the state was last updated

publishComponentCommand

A POST request is used to publish component command.

URL

/api/v1/deploymentprofile/id/{deploymentid}/device/{deviceid}/component/{componentname}/command/{command}

Request structure

POST /api/v1/deploymentprofile/id/5ee21e9802743900e7d446bc/device/5d4818ac37e70b260c4b704e/component/DeviceServiceComponent/command/COMPONENTSTART HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MiwiaWF0IjoxNTkxODc3MjcyLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.ttpRLP0qkqEOOQASinDwHAD1vb5HBzc6d-PJlT0dURY
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 24

5ee21e9802743900e7d446bd

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentprofile/id/5ee21e9802743900e7d446bc/device/5d4818ac37e70b260c4b704e/component/DeviceServiceComponent/command/COMPONENTSTART' -i -X POST \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3MiwiaWF0IjoxNTkxODc3MjcyLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.ttpRLP0qkqEOOQASinDwHAD1vb5HBzc6d-PJlT0dURY'

/api/v1/auth

Authentification for EAMT.

getAccessToken

A POST request is used to get the access token for EAMT API.

URL

/api/v1/auth/token

Request structure

POST /api/v1/auth/token HTTP/1.1
Content-Length: 42
Content-Type: application/json
Host: localhost:8080

{"username":"Jerry","password":"Admin!23"}

Request Fields

Path Type Description

username

String

Login username

password

String

Password of the user.

Example response

HTTP/1.1 200 OK
Content-Length: 261
Set-Cookie: token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ4MywiaWF0IjoxNTkxODc3MjgzLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.tG0jrW6Pp1aGwFHeiAO6-WA_qV9AOkhMOEd553C13Rs; Path=/; Domain=localhost; Max-Age=7200; Expires=Thu, 11 Jun 2020 14:08:03 GMT; HttpOnly
Content-Type: application/json;charset=UTF-8

{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ4MywiaWF0IjoxNTkxODc3MjgzLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.tG0jrW6Pp1aGwFHeiAO6-WA_qV9AOkhMOEd553C13Rs","expires_in":1591884483329}

CURL request

$ curl 'http://localhost:8080/api/v1/auth/token' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '{"username":"Jerry","password":"Admin!23"}'

Response Fields

Path Type Description

access_token

String

Token string for access API

expires_in

Number

When the token will be expired

refreshAccessToken

A GET request is used to refresh the access token for EAMT API.

URL

/api/v1/auth/token/refresh

Request structure

GET /api/v1/auth/token/refresh HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ4MywiaWF0IjoxNTkxODc3MjgzLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.dYlhadLDa5Bsp0xTBvpJr8F3ClYDuBYqrDLbynZnkVU
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 261
Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5MywiaWF0IjoxNTkxODc3MjkzLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.zSrZg-KhoNDZqdV8WHXDDmU-i7fnL49_k20-o-3Ibnc
Set-Cookie: token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5MywiaWF0IjoxNTkxODc3MjkzLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.zSrZg-KhoNDZqdV8WHXDDmU-i7fnL49_k20-o-3Ibnc; Path=/; Domain=localhost; HttpOnly
Content-Type: application/json;charset=UTF-8

{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5MywiaWF0IjoxNTkxODc3MjkzLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.zSrZg-KhoNDZqdV8WHXDDmU-i7fnL49_k20-o-3Ibnc","expires_in":1591884493985}

CURL request

$ curl 'http://localhost:8080/api/v1/auth/token/refresh' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ4MywiaWF0IjoxNTkxODc3MjgzLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.dYlhadLDa5Bsp0xTBvpJr8F3ClYDuBYqrDLbynZnkVU'

Response Fields

Path Type Description

access_token

String

Token string for access API

expires_in

Number

When the token will be expired

logout

A GET request is used to logout EAMT

URL

/api/v1/auth/logout

Request structure

GET /api/v1/auth/logout HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU2NjUzNTk2NiwiaWF0IjoxNTY2NTI4NzY2LCJ1c2VySWQiOiI1ZDNlNjJmNmY4Yzc2YTg5ODQzZTg5YWEifQ.WmGHFFgSTkn3Mp1ZgPuAiSxklv6gh3hKQa7XInDGEs0
Host: localhost:8080

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/auth/logout' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU2NjUzNTk2NiwiaWF0IjoxNTY2NTI4NzY2LCJ1c2VySWQiOiI1ZDNlNjJmNmY4Yzc2YTg5ODQzZTg5YWEifQ.WmGHFFgSTkn3Mp1ZgPuAiSxklv6gh3hKQa7XInDGEs0'

createUser

A POST request is used to create a user.

URL

/api/v1/auth/user

Request structure

POST /api/v1/auth/user HTTP/1.1
Content-Length: 98
Content-Type: application/json
Host: localhost:8080

{"username":"Jerry","password":"Admin!23","email":"test@vmware.com","roles":["VENDOR","CUSTOMER"]}

Request Fields

Path Type Description

username

String

Unique user name

password

String

Password for the user

roles

Array

User roles: ADMIN,VENDOR,CUSTOMER

email

String

User email address

Example response

HTTP/1.1 201 Created

CURL request

$ curl 'http://localhost:8080/api/v1/auth/user' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '{"username":"Jerry","password":"Admin!23","email":"test@vmware.com","roles":["VENDOR","CUSTOMER"]}'

updateUser

A PUT request is used to update user for EAMT API.

URL

/api/v1/auth/user

Request structure

PUT /api/v1/auth/user HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NCwiaWF0IjoxNTkxODc3Mjk0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.umtInszSexcNkJGibq8PaShHzIH_XNsM2ZYWYLfbxec
Content-Length: 264
Content-Type: application/json
Host: localhost:8080

{"id":"5d47ee5c3574a90007cb93e1","username":null,"password":null,"mobile":"818","email":"update@vmware.com","createTime":null,"roles":["VENDOR"],"lastPasswordResetDate":0,"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true}

Request Fields

Path Type Description

id

String

User ID, unique id created by EAMT

mobile

String

User mobile phone number.

email

String

User email address

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/auth/user' -i -X PUT \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NCwiaWF0IjoxNTkxODc3Mjk0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.umtInszSexcNkJGibq8PaShHzIH_XNsM2ZYWYLfbxec' \
    -H 'Content-Type: application/json' \
    -d '{"id":"5d47ee5c3574a90007cb93e1","username":null,"password":null,"mobile":"818","email":"update@vmware.com","createTime":null,"roles":["VENDOR"],"lastPasswordResetDate":0,"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true}'

updateUserRoles

A PUT request is used to update user roles for EAMT API.

URL

/api/v1/auth/user/roles

Request structure

PUT /api/v1/auth/user/roles HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ4MywiaWF0IjoxNTkxODc3MjgzLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.tG0jrW6Pp1aGwFHeiAO6-WA_qV9AOkhMOEd553C13Rs
Content-Type: application/json
Host: localhost:8080
Content-Length: 256

{"id":"5d47ee5c3574a90007cb93e1","username":null,"password":null,"mobile":null,"email":null,"createTime":null,"roles":["ADMIN","VENDOR"],"lastPasswordResetDate":0,"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true}

Request Fields

Path Type Description

id

String

User ID, unique id created by EAMT

roles

Array

User roles

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/auth/user/roles' -i -X PUT \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ4MywiaWF0IjoxNTkxODc3MjgzLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.tG0jrW6Pp1aGwFHeiAO6-WA_qV9AOkhMOEd553C13Rs' \
    -H 'Content-Type: application/json' \
    -d '{"id":"5d47ee5c3574a90007cb93e1","username":null,"password":null,"mobile":null,"email":null,"createTime":null,"roles":["ADMIN","VENDOR"],"lastPasswordResetDate":0,"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true}'

deleteUser

A DELETE request is used to delete a user.

URL

/api/v1/auth/user

Request structure

DELETE /api/v1/auth/user/5d47ee5c3574a90007cb93e1 HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/auth/user/5d47ee5c3574a90007cb93e1' -i -X DELETE

getUserByUsername

A GET request is used to query a user by username.

URL

/api/v1/auth/user/name/{name}

Request structure

GET /api/v1/auth/user/name/Jerry HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 275
Content-Type: application/json;charset=UTF-8

{"id":"5d47ee5c3574a90007cb93e1","username":"Jerry","password":null,"mobile":null,"email":"test@vmware.com","createTime":null,"roles":["VENDOR","CUSTOMER"],"lastPasswordResetDate":0,"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true}

CURL request

$ curl 'http://localhost:8080/api/v1/auth/user/name/Jerry' -i -X GET

Response Fields

Path Type Description

id

String

User ID, unique id created by EAMT

username

String

Unique username to identify a user

roles

Array

User roles

email

String

User email address

createTime

Null

When this accout is create

getUserById

A GET request is used to query a user by user id.

URL

/api/v1/auth/user/{id}

Request structure

GET /api/v1/auth/user/5d47ee5c3574a90007cb93e1 HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 275
Content-Type: application/json;charset=UTF-8

{"id":"5d47ee5c3574a90007cb93e1","username":"Jerry","password":null,"mobile":null,"email":"test@vmware.com","createTime":null,"roles":["VENDOR","CUSTOMER"],"lastPasswordResetDate":0,"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true}

CURL request

$ curl 'http://localhost:8080/api/v1/auth/user/5d47ee5c3574a90007cb93e1' -i -X GET

Response Fields

Path Type Description

id

String

User ID, unique id created by EAMT

username

String

Unique username to identify a user

roles

Array

User roles

email

String

User email address

createTime

Null

When this accout is create

getUsersWithPage

A GET request is used to query users with page.

URL

/api/v1/auth/user/pagenumber/{pagenumber}/pagesize/{pagesize}

Request structure

GET /api/v1/auth/user/pagenumber/1/pagesize/10 HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 593
Content-Type: application/json;charset=UTF-8

{"content":[{"id":"5d47ee5c3574a90007cb93e1","username":"Jerry","password":null,"mobile":null,"email":"test@vmware.com","createTime":null,"roles":["VENDOR","CUSTOMER"],"lastPasswordResetDate":0,"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true}],"pageable":{"sort":{"sorted":true,"unsorted":false,"empty":false},"pageSize":10,"pageNumber":0,"offset":0,"paged":true,"unpaged":false},"totalPages":1,"totalElements":1,"last":true,"first":true,"sort":{"sorted":true,"unsorted":false,"empty":false},"numberOfElements":1,"size":10,"number":0,"empty":false}

CURL request

$ curl 'http://localhost:8080/api/v1/auth/user/pagenumber/1/pagesize/10' -i -X GET

Response Fields

Path Type Description

content

Array

Users array.

pageable

Object

content’s pages information.

empty

Boolean

Is the empty.

totalPages

Number

content’s total pages.

totalElements

Number

content’s total elements.

last

Boolean

Whether the current page is the last one.

number

Number

The page number.

size

Number

The page size.

sort

Object

The sort.

numberOfElements

Number

The number of Elements.

first

Boolean

Whether the current page is the first one.

getRoles

A GET request is used to query roles of current user.

URL

/api/v1/auth/roles

Request structure

GET /api/v1/auth/roles HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ4MywiaWF0IjoxNTkxODc3MjgzLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.tG0jrW6Pp1aGwFHeiAO6-WA_qV9AOkhMOEd553C13Rs
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 10
Content-Type: application/json;charset=UTF-8

["VENDOR"]

CURL request

$ curl 'http://localhost:8080/api/v1/auth/roles' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ4MywiaWF0IjoxNTkxODc3MjgzLCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.tG0jrW6Pp1aGwFHeiAO6-WA_qV9AOkhMOEd553C13Rs'

Response Fields

Path Type Description

[]

Array

An array of roles. Possible value include: VENDOR, CUSTOMER, ADMIN

/api/v1/services

Edge services in EAMT.

createService

A POST request is used to create service for EAMT API.

URL

/api/v1/services

Request structure

POST /api/v1/services HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo
Content-Length: 138
Content-Type: application/json
Host: localhost:8080

{"name":"Analysis_Service","defaultLanguage":{"language":"English"},"defaultIndustry":"General","description":"This is new edge service."}

Request Fields

Path Type Description

name

String

The name of the service.

defaultLanguage

Object

The default language object of the service. It will include the default description text in the default language. It will used when display the service in an unsupported language environment.

defaultIndustry

String

The default industry for this service.

description

String

The description of the service.

Example response

HTTP/1.1 201 Created
Location: http://localhost:8080/api/v1/services/5ee21eb102743900e7d44702

CURL request

$ curl 'http://localhost:8080/api/v1/services' -i -X POST \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo' \
    -H 'Content-Type: application/json' \
    -d '{"name":"Analysis_Service","defaultLanguage":{"language":"English"},"defaultIndustry":"General","description":"This is new edge service."}'

updateService

A PUT request is used to update service for EAMT API.

URL

/api/v1/services

Request structure

PUT /api/v1/services HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo
Content-Length: 417
Content-Type: application/json
Host: localhost:8080

{"id":"5dd64a0f658d290007e78e76","name":"update_edge_service","defaultLanguage":{"language":"English","texts":null},"supportLanguages":[],"defaultIndustry":"General","supportIndustries":[],"description":"This is new edge service.","skuNumber":null,"versions":[],"defaultVersion":null,"avatarUrl":null,"imgUrl":null,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","createTime":0,"updateTime":0,"status":"DRAFT"}

Request Fields

Path Type Description

name

String

The name of the service.

defaultLanguage

Object

The default language object of the service. It will include the default description text in the default language. It will used when display the service in an unsupported language environment.

defaultIndustry

String

The default industry for this service.

description

String

The description of the service.

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/services' -i -X PUT \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo' \
    -H 'Content-Type: application/json' \
    -d '{"id":"5dd64a0f658d290007e78e76","name":"update_edge_service","defaultLanguage":{"language":"English","texts":null},"supportLanguages":[],"defaultIndustry":"General","supportIndustries":[],"description":"This is new edge service.","skuNumber":null,"versions":[],"defaultVersion":null,"avatarUrl":null,"imgUrl":null,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","createTime":0,"updateTime":0,"status":"DRAFT"}'

getServiceById

A GET request is used to query a service by service id.

URL

/api/v1/services/{id}

Request structure

GET /api/v1/services/5dd64a0f658d290007e78e76 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 414
Content-Type: application/json;charset=UTF-8

{"id":"5dd64a0f658d290007e78e76","name":"Analysis_Service","defaultLanguage":{"language":"English","texts":null},"supportLanguages":[],"defaultIndustry":"General","supportIndustries":[],"description":"This is new edge service.","skuNumber":null,"versions":[],"defaultVersion":null,"avatarUrl":null,"imgUrl":null,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","createTime":0,"updateTime":0,"status":"DRAFT"}

CURL request

$ curl 'http://localhost:8080/api/v1/services/5dd64a0f658d290007e78e76' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo'

Response Fields

Path Type Description

id

String

ID of the service, created by EAMT

name

String

The name of the service.

defaultLanguage

Object

The default language object of the service. It will include the default description text in the default language. It will used when display the service in an unsupported language environment.

defaultLanguage.language

String

The name of the language.

defaultLanguage.texts

Object

The service description content in the related language.

supportLanguages.[]

Array

Supported languages.

defaultIndustry

String

The default industry for this service.

supportIndustries.[]

Array

A list of Industries that this service supported.

versions.[]

Array

All the versions belong to this service.

defaultVersion

String

The service default version.

avatarUrl

String

The icon URL of the service.

imgUrl

String

The screenshot of the service.

description

String

The description of the service.

createTime

Number

When the service was created.

updateTime

Number

Last update time.

userId

String

The userid of the service owner.

userName

String

Service owner’s user name.

status

String

status of the service, created by EAMT

versions.[]id

String

The id of the version.

versions.[]version

String

The version name.

versions.[]restriction

Object

The restriction of this version.

versions.[]restriction.cpu

Number

The minimal required CPU , unit GHz.

versions.[]restriction.memory

Number

The minimal required memory , unit MB.

versions.[]restriction.storage

Number

The minimal required storage , unit GB.

versions.[]restriction.dockerVersion

String

The minimal required docker version.

versions.[]restriction.others

Object

This field can be used by any additional restriction declaration. Currently it is not used yet.

getServiceByName

A GET request is used to query a service by service name.

URL

/api/v1/services/name/{name}

Request structure

GET /api/v1/services/name/Analysis_Service HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5OCwiaWF0IjoxNTkxODc3Mjk4LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.igCKKnIKjnmfxh4P-OOPhfIAeRP0NXbRTsmeSgOyhaQ
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 414
Content-Type: application/json;charset=UTF-8

{"id":"5dd64a0f658d290007e78e76","name":"Analysis_Service","defaultLanguage":{"language":"English","texts":null},"supportLanguages":[],"defaultIndustry":"General","supportIndustries":[],"description":"This is new edge service.","skuNumber":null,"versions":[],"defaultVersion":null,"avatarUrl":null,"imgUrl":null,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","createTime":0,"updateTime":0,"status":"DRAFT"}

CURL request

$ curl 'http://localhost:8080/api/v1/services/name/Analysis_Service' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5OCwiaWF0IjoxNTkxODc3Mjk4LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.igCKKnIKjnmfxh4P-OOPhfIAeRP0NXbRTsmeSgOyhaQ'

Response Fields

Path Type Description

id

String

ID of the service, created by EAMT

name

String

The name of the service.

defaultLanguage

Object

The default language object of the service. It will include the default description text in the default language. It will used when display the service in an unsupported language environment.

defaultLanguage.language

String

The name of the language.

defaultLanguage.texts

Object

The service description content in the related language.

supportLanguages.[]

Array

Supported languages.

defaultIndustry

String

The default industry for this service.

supportIndustries.[]

Array

A list of Industries that this service supported.

versions.[]

Array

All the versions belong to this service.

defaultVersion

String

The service default version.

avatarUrl

String

The icon URL of the service.

imgUrl

String

The screenshot of the service.

description

String

The description of the service.

createTime

Number

When the service was created.

updateTime

Number

Last update time.

userId

String

The userid of the service owner.

userName

String

Service owner’s user name.

status

String

status of the service, created by EAMT

versions.[]id

String

The id of the version.

versions.[]version

String

The version name.

versions.[]restriction

Object

The restriction of this version.

versions.[]restriction.cpu

Number

The minimal required CPU , unit GHz.

versions.[]restriction.memory

Number

The minimal required memory , unit MB.

versions.[]restriction.storage

Number

The minimal required storage , unit GB.

versions.[]restriction.dockerVersion

String

The minimal required docker version.

versions.[]restriction.others

Object

This field can be used by any additional restriction declaration. Currently it is not used yet.

removeService

A DELETE request is used to delete a service.

URL

/api/v1/services/{id}

Request structure

DELETE /api/v1/services/5dd64a0f658d290007e78e76 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5OCwiaWF0IjoxNTkxODc3Mjk4LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.igCKKnIKjnmfxh4P-OOPhfIAeRP0NXbRTsmeSgOyhaQ
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4

true

CURL request

$ curl 'http://localhost:8080/api/v1/services/5dd64a0f658d290007e78e76' -i -X DELETE \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5OCwiaWF0IjoxNTkxODc3Mjk4LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.igCKKnIKjnmfxh4P-OOPhfIAeRP0NXbRTsmeSgOyhaQ'

getAllService

A GET request is used to query all services.

URL

/api/v1/services

Request structure

GET /api/v1/services HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 416
Content-Type: application/json;charset=UTF-8

[{"id":"5dd64a0f658d290007e78e76","name":"Analysis_Service","defaultLanguage":{"language":"English","texts":null},"supportLanguages":[],"defaultIndustry":"General","supportIndustries":[],"description":"This is new edge service.","skuNumber":null,"versions":[],"defaultVersion":null,"avatarUrl":null,"imgUrl":null,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","createTime":0,"updateTime":0,"status":"DRAFT"}]

CURL request

$ curl 'http://localhost:8080/api/v1/services' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo'

Response Fields

Path Type Description

[]

Array

An array of services

[].id

String

ID of the service, created by EAMT

[].name

String

The name of the service.

[].defaultLanguage

Object

The default language object of the service. It will include the default description text in the default language. It will used when display the service in an unsupported language environment.

[].defaultLanguage.language

String

The name of the language.

[].defaultLanguage.texts

Object

The service description content in the related language.

[].supportLanguages.[]

Array

Supported languages.

[].defaultIndustry

String

The default industry for this service.

[].supportIndustries.[]

Array

A list of Industries that this service supported.

[].versions.[]

Array

All the versions belong to this service.

[].defaultVersion

String

The service default version.

[].avatarUrl

String

The icon URL of the service.

[].imgUrl

String

The screenshot of the service.

[].description

String

The description of the service.

[].createTime

Number

When the service was created.

[].updateTime

Number

Last update time.

[].userId

String

The userid of the service owner.

[].userName

String

Service owner’s user name.

[].status

String

status of the service, created by EAMT

[].versions.[]id

String

The id of the version.

[].versions.[]version

String

The version name.

[].versions.[]restriction

Object

The restriction of this version.

[].versions.[]restriction.cpu

Number

The minimal required CPU , unit GHz.

[].versions.[]restriction.memory

Number

The minimal required memory , unit MB.

[].versions.[]restriction.storage

Number

The minimal required storage , unit GB.

[].versions.[]restriction.dockerVersion

String

The minimal required docker version.

[].versions.[]restriction.others

Object

This field can be used by any additional restriction declaration. Currently it is not used yet.

getServicesWithPage

A GET request is used to query services with page.

URL

/api/v1/services/pagenumber/{pagenumber}/pagesize/{pagesize}

Request structure

GET /api/v1/services/pagenumber/1/pagesize/10 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5OCwiaWF0IjoxNTkxODc3Mjk4LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.igCKKnIKjnmfxh4P-OOPhfIAeRP0NXbRTsmeSgOyhaQ
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 732
Content-Type: application/json;charset=UTF-8

{"content":[{"id":"5dd64a0f658d290007e78e76","name":"Analysis_Service","defaultLanguage":{"language":"English","texts":null},"supportLanguages":[],"defaultIndustry":"General","supportIndustries":[],"description":"This is new edge service.","skuNumber":null,"versions":[],"defaultVersion":null,"avatarUrl":null,"imgUrl":null,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","createTime":0,"updateTime":0,"status":"DRAFT"}],"pageable":{"sort":{"sorted":true,"unsorted":false,"empty":false},"pageSize":10,"pageNumber":0,"offset":0,"paged":true,"unpaged":false},"totalPages":1,"totalElements":1,"last":true,"first":true,"sort":{"sorted":true,"unsorted":false,"empty":false},"numberOfElements":1,"size":10,"number":0,"empty":false}

CURL request

$ curl 'http://localhost:8080/api/v1/services/pagenumber/1/pagesize/10' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5OCwiaWF0IjoxNTkxODc3Mjk4LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.igCKKnIKjnmfxh4P-OOPhfIAeRP0NXbRTsmeSgOyhaQ'

Response Fields

Path Type Description

content.[]

Array

Services array.

pageable

Object

content’s pages information.

empty

Boolean

Is the empty.

totalPages

Number

content’s total pages.

totalElements

Number

content’s total elements.

last

Boolean

Whether the current page is the last one.

number

Number

The page number.

size

Number

The page size.

sort

Object

The sort.

numberOfElements

Number

The number of Elements.

first

Boolean

Whether the current page is the first one.

content.[].id

String

ID of the service, created by EAMT

content.[].name

String

The name of the service.

content.[].defaultLanguage

Object

The default language object of the service. It will include the default description text in the default language. It will used when display the service in an unsupported language environment.

content.[].defaultLanguage.language

String

The name of the language.

content.[].defaultLanguage.texts

Object

The service description content in the related language.

content.[].supportLanguages.[]

Array

Supported languages.

content.[].defaultIndustry

String

The default industry for this service.

content.[].supportIndustries.[]

Array

A list of Industries that this service supported.

content.[].versions.[]

Array

All the versions belong to this service.

content.[].defaultVersion

String

The service default version.

content.[].avatarUrl

String

The icon URL of the service.

content.[].imgUrl

String

The screenshot of the service.

content.[].description

String

The description of the service.

content.[].createTime

Number

When the service was created.

content.[].updateTime

Number

Last update time.

content.[].userId

String

The userid of the service owner.

content.[].userName

String

Service owner’s user name.

content.[].status

String

status of the service, created by EAMT

content.[].versions.[].id

String

The id of the version.

content.[].versions.[].version

String

The version name.

content.[].versions.[].restriction

Object

The restriction of this version.

content.[].versions.[].restriction.cpu

Number

The minimal required CPU , unit GHz.

content.[].versions.[].restriction.memory

Number

The minimal required memory , unit MB.

content.[].versions.[].restriction.storage

Number

The minimal required storage , unit GB.

content.[].versions.[].restriction.dockerVersion

String

The minimal required docker version.

content.[].versions.[].restriction.others

Object

This field can be used by any additional restriction declaration. Currently it is not used yet.

getAllServicesWithPage

A GET request is used to query all services with page.

URL

/api/v1/services/all/pagenumber/{pagenumber}/pagesize/{pagesize}

Request structure

GET /api/v1/services/all/pagenumber/1/pagesize/10 HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 317
Content-Type: application/json;charset=UTF-8

{"content":[],"pageable":{"sort":{"sorted":true,"unsorted":false,"empty":false},"pageSize":10,"pageNumber":0,"offset":0,"paged":true,"unpaged":false},"totalPages":0,"totalElements":0,"last":true,"first":true,"sort":{"sorted":true,"unsorted":false,"empty":false},"numberOfElements":0,"size":10,"number":0,"empty":true}

CURL request

$ curl 'http://localhost:8080/api/v1/services/all/pagenumber/1/pagesize/10' -i -X GET

Response Fields

Path Type Description

content.[]

Array

Services array.

pageable

Object

content’s pages information.

empty

Boolean

Is the empty.

totalPages

Number

content’s total pages.

totalElements

Number

content’s total elements.

last

Boolean

Whether the current page is the last one.

number

Number

The page number.

size

Number

The page size.

sort

Object

The sort.

numberOfElements

Number

The number of Elements.

first

Boolean

Whether the current page is the first one.

content.[].id

String

ID of the service, created by EAMT

content.[].name

String

The name of the service.

content.[].defaultLanguage

Object

The default language object of the service. It will include the default description text in the default language. It will used when display the service in an unsupported language environment.

content.[].defaultLanguage.language

String

The name of the language.

content.[].defaultLanguage.texts

Object

The service description content in the related language.

content.[].supportLanguages.[]

Array

Supported languages.

content.[].defaultIndustry

String

The default industry for this service.

content.[].supportIndustries.[]

Array

A list of Industries that this service supported.

content.[].versions.[]

Array

All the versions belong to this service.

content.[].defaultVersion

String

The service default version.

content.[].avatarUrl

String

The icon URL of the service.

content.[].imgUrl

String

The screenshot of the service.

content.[].description

String

The description of the service.

content.[].createTime

Number

When the service was created.

content.[].updateTime

Number

Last update time.

content.[].userId

String

The userid of the service owner.

content.[].userName

String

Service owner’s user name.

content.[].status

String

status of the service, created by EAMT

content.[].versions.[].id

String

The id of the version.

content.[].versions.[].version

String

The version name.

content.[].versions.[].restriction

Object

The restriction of this version.

content.[].versions.[].restriction.cpu

Number

The minimal required CPU , unit GHz.

content.[].versions.[].restriction.memory

Number

The minimal required memory , unit MB.

content.[].versions.[].restriction.storage

Number

The minimal required storage , unit GB.

content.[].versions.[].restriction.dockerVersion

String

The minimal required docker version.

content.[].versions.[].restriction.others

Object

This field can be used by any additional restriction declaration. Currently it is not used yet.

getServicesByIndustryWithPage

A GET request is used to query all services by industry with page.

URL

/api/v1/services/industry/{industry}/pagenumber/{pagenumber}/pagesize/{pagesize}

Request structure

GET /api/v1/services/industry/General/pagenumber/1/pagesize/10 HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 736
Content-Type: application/json;charset=UTF-8

{"content":[{"id":"5dd64a0f658d290007e78e76","name":"Analysis_Service","defaultLanguage":{"language":"English","texts":null},"supportLanguages":[],"defaultIndustry":"General","supportIndustries":[],"description":"This is new edge service.","skuNumber":null,"versions":[],"defaultVersion":null,"avatarUrl":null,"imgUrl":null,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","createTime":0,"updateTime":0,"status":"PUBLISHED"}],"pageable":{"sort":{"sorted":true,"unsorted":false,"empty":false},"pageSize":10,"pageNumber":0,"offset":0,"paged":true,"unpaged":false},"totalPages":1,"totalElements":1,"last":true,"first":true,"sort":{"sorted":true,"unsorted":false,"empty":false},"numberOfElements":1,"size":10,"number":0,"empty":false}

CURL request

$ curl 'http://localhost:8080/api/v1/services/industry/General/pagenumber/1/pagesize/10' -i -X GET

Response Fields

Path Type Description

content

Array

Services array.

pageable

Object

content’s pages information.

empty

Boolean

Is the empty.

totalPages

Number

content’s total pages.

totalElements

Number

content’s total elements.

last

Boolean

Whether the current page is the last one.

number

Number

The page number.

size

Number

The page size.

sort

Object

The sort.

numberOfElements

Number

The number of Elements.

first

Boolean

Whether the current page is the first one.

content.[].id

String

ID of the service, created by EAMT

content.[].name

String

The name of the service.

content.[].defaultLanguage

Object

The default language object of the service. It will include the default description text in the default language. It will used when display the service in an unsupported language environment.

content.[].defaultLanguage.language

String

The name of the language.

content.[].defaultLanguage.texts

Object

The service description content in the related language.

content.[].supportLanguages.[]

Array

Supported languages.

content.[].defaultIndustry

String

The default industry for this service.

content.[].supportIndustries.[]

Array

A list of Industries that this service supported.

content.[].versions.[]

Array

All the versions belong to this service.

content.[].defaultVersion

String

The service default version.

content.[].avatarUrl

String

The icon URL of the service.

content.[].imgUrl

String

The screenshot of the service.

content.[].description

String

The description of the service.

content.[].createTime

Number

When the service was created.

content.[].updateTime

Number

Last update time.

content.[].userId

String

The userid of the service owner.

content.[].userName

String

Service owner’s user name.

content.[].status

String

status of the service, created by EAMT

content.[].versions.[].id

String

The id of the version.

content.[].versions.[].version

String

The version name.

content.[].versions.[].restriction

Object

The restriction of this version.

content.[].versions.[].restriction.cpu

Number

The minimal required CPU , unit GHz.

content.[].versions.[].restriction.memory

Number

The minimal required memory , unit MB.

content.[].versions.[].restriction.storage

Number

The minimal required storage , unit GB.

content.[].versions.[].restriction.dockerVersion

String

The minimal required docker version.

content.[].versions.[].restriction.others

Object

This field can be used by any additional restriction declaration. Currently it is not used yet.

publishService

A PUT request is used to publish service for EAMT API.

URL

/api/v1/services/publish/{id}

Request structure

PUT /api/v1/services/publish/5dd64a0f658d290007e78e76 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo
Host: localhost:8080

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/services/publish/5dd64a0f658d290007e78e76' -i -X PUT \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo'

unpublishService

A PUT request is used to unpublish service for EAMT API.

URL

/api/v1/services/unpublish/{id}

Request structure

PUT /api/v1/services/unpublish/5dd64a0f658d290007e78e76 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo
Host: localhost:8080

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/services/unpublish/5dd64a0f658d290007e78e76' -i -X PUT \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NywiaWF0IjoxNTkxODc3Mjk3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.V3h8JuGsD2Qoobw8jutlErPr399S_oK_i1tsr07kFmo'

/api/v1/serviceversions

Edge service’s versions in EAMT.

createServiceVersion

A POST request is used to create service version for EAMT API.

URL

/api/v1/serviceversions

Request structure

POST /api/v1/serviceversions HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NCwiaWF0IjoxNTkxODc3Mjk0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.umtInszSexcNkJGibq8PaShHzIH_XNsM2ZYWYLfbxec
Content-Length: 2120
Content-Type: application/json
Host: localhost:8080

{ "version" : "v0.1", "serviceId" : "5ddd00d3658d290007e7f2f9", "supportArchitecture" : [ "X86", "ARM64" ], "restriction" : { "cpu" : 1, "memory" : 256, "storage" : 8, "dockerVersion" : "17.03" }, "serviceComponents" : [ { "name" : "analysiscomponent", "required" : true, "ports" : [ { "hostPort" : 80, "componentPort" : 80 }, { "hostPort" : 8400, "componentPort" : 8400 } ], "networks" : [ "construction-network" ],"dependson":["databasecomponent"], "image" : { "project" : "analysis_service", "name" : "analysis_service/nginx:v0.1", "serviceID" : "5ddd00d3658d290007e7f2f9" }, "volumes" : [ "data:/data", "conf:/conf" ], "envSettings" : [ { "key" : "cn-set1", "name" : "Common Setting 1", "type" : "STRING", "description" : "Common Setting", "value" : "comstr1", "common" : true, "visibleToUsers" : true }, { "key" : "track-code", "name" : "Tracking Code Boolean", "type" : "BOOLEAN", "description" : "Tracking code for the serivce", "value" : "true", "common" : true, "visibleToUsers" : false } ], "restartPolicy" : "unless_stopped", "customSettings" : { "0" : [ { "key" : "sp-set", "name" : "Specific Setting", "type" : "NUMBER", "description" : "Specific Setting", "value" : "spestr" } ] } }, { "name" : "databasecomponent", "required" : true, "ports" : [ ], "networks" : [ "construction-network" ], "image" : { "project" : "analysis_service", "name" : "analysis_service/mongo:v0.1", "serviceID" : "5ddd00d3658d290007e7f2f9" }, "volumes" : [ "data:/data", "conf:/conf" ], "envSettings" : [ { "key" : "cn-set2", "name" : "Common Setting 2", "type" : "STRING", "description" : "Common Setting 2", "value" : "comstr2", "common" : true, "visibleToUsers" : true }, { "key" : "track-code2", "name" : "Tracking code", "type" : "STRING", "description" : "Tracking code", "value" : "track-code-2", "common" : true, "visibleToUsers" : false } ], "restartPolicy" : "on_failure", "customSettings" : { "0" : [ { "key" : "spe-set2", "name" : "Specific Setting 2", "type" : "NUMBER", "description" : "Specific Setting 2", "value" : "1234" } ] } } ], "networks" : ["construction-network"], "volumes" : ["data:/data","conf:/conf"] }

Request Fields

Path Type Description

version

String

The version name.

serviceId

String

The service ID.

supportArchitecture

Array

The OS architectures this version supported. Possible value include: X86,ARM64

restriction

Object

The restriction of this version.

restriction.cpu

Number

The minimal required CPU , unit GHz.

restriction.memory

Number

The minimal required memory , unit MB.

restriction.storage

Number

The minimal required storage , unit GB.

restriction.dockerVersion

String

The minimal required docker version.

serviceComponents.[]

Array

The service components for this version.

networks

Array

A list of network names used by this version.

volumes

Array

A list of volumes used by this version.

serviceComponents.[].name

String

The name of the component.

serviceComponents.[].required

Boolean

The component is required or not.

serviceComponents.[].ports.[]

Array

A list of the component ports.

serviceComponents.[].networks

Array

A list of network names used by this component.

serviceComponents.[].volumes

Array

A list of volumes used by this component.

serviceComponents.[].dependson

Array

A list of the component depends on.

serviceComponents.[].image

Object

The Docker image of the component.

serviceComponents.[].image.project

String

The service name of the Docker image.

serviceComponents.[].image.name

String

The name of the Docker image.

serviceComponents.[].image.serviceID

String

The serviceID of the Docker image.

serviceComponents.[].envSettings.[]

Array

An array of the component environment settings.

serviceComponents.[].restartPolicy

String

The component restart policy.

serviceComponents.[].customSettings

Object

An Map of the component custom settings. Key represents the device ID and value is the value is an list of environment settings(without common and visibleToUsers field).

serviceComponents.[].ports.[].hostPort

Number

Port is used on the device to access the service.

serviceComponents.[].ports.[].componentPort

Number

Service port.

serviceComponents.[].envSettings.[].key

String

The identifier of the environment variable. The service will use this key to get the value of the environment variable in their code.

serviceComponents.[].envSettings.[].name

String

The display name of the environment variable. It will be display in the deployment builder wizard UI when user build a new deployment.

serviceComponents.[].envSettings.[].type

String

The type of this environment variable, supported types include : STRING,BOOLEAN,NUMBER

serviceComponents.[].envSettings.[].description

String

The description of this environment variable.

serviceComponents.[].envSettings.[].value

String

The default value of this environment variable.

serviceComponents.[].envSettings.[].common

Boolean

If set this field to true, when user build a deployment he only need to set the value once. The value will be applied to all devices. If set this field to false, the device can have different values, user need to specify a value for each device.

serviceComponents.[].envSettings.[].visibleToUsers

Boolean

Boolean, when the value is false it means user cannot see this environment variable when they build a deployment.

Example response

HTTP/1.1 201 Created
Location: http://localhost:8080/api/v1/serviceversions/5ee21eae02743900e7d446fa

CURL request

$ curl 'http://localhost:8080/api/v1/serviceversions' -i -X POST \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NCwiaWF0IjoxNTkxODc3Mjk0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.umtInszSexcNkJGibq8PaShHzIH_XNsM2ZYWYLfbxec' \
    -H 'Content-Type: application/json' \
    -d '{ "version" : "v0.1", "serviceId" : "5ddd00d3658d290007e7f2f9", "supportArchitecture" : [ "X86", "ARM64" ], "restriction" : { "cpu" : 1, "memory" : 256, "storage" : 8, "dockerVersion" : "17.03" }, "serviceComponents" : [ { "name" : "analysiscomponent", "required" : true, "ports" : [ { "hostPort" : 80, "componentPort" : 80 }, { "hostPort" : 8400, "componentPort" : 8400 } ], "networks" : [ "construction-network" ],"dependson":["databasecomponent"], "image" : { "project" : "analysis_service", "name" : "analysis_service/nginx:v0.1", "serviceID" : "5ddd00d3658d290007e7f2f9" }, "volumes" : [ "data:/data", "conf:/conf" ], "envSettings" : [ { "key" : "cn-set1", "name" : "Common Setting 1", "type" : "STRING", "description" : "Common Setting", "value" : "comstr1", "common" : true, "visibleToUsers" : true }, { "key" : "track-code", "name" : "Tracking Code Boolean", "type" : "BOOLEAN", "description" : "Tracking code for the serivce", "value" : "true", "common" : true, "visibleToUsers" : false } ], "restartPolicy" : "unless_stopped", "customSettings" : { "0" : [ { "key" : "sp-set", "name" : "Specific Setting", "type" : "NUMBER", "description" : "Specific Setting", "value" : "spestr" } ] } }, { "name" : "databasecomponent", "required" : true, "ports" : [ ], "networks" : [ "construction-network" ], "image" : { "project" : "analysis_service", "name" : "analysis_service/mongo:v0.1", "serviceID" : "5ddd00d3658d290007e7f2f9" }, "volumes" : [ "data:/data", "conf:/conf" ], "envSettings" : [ { "key" : "cn-set2", "name" : "Common Setting 2", "type" : "STRING", "description" : "Common Setting 2", "value" : "comstr2", "common" : true, "visibleToUsers" : true }, { "key" : "track-code2", "name" : "Tracking code", "type" : "STRING", "description" : "Tracking code", "value" : "track-code-2", "common" : true, "visibleToUsers" : false } ], "restartPolicy" : "on_failure", "customSettings" : { "0" : [ { "key" : "spe-set2", "name" : "Specific Setting 2", "type" : "NUMBER", "description" : "Specific Setting 2", "value" : "1234" } ] } } ], "networks" : ["construction-network"], "volumes" : ["data:/data","conf:/conf"] }'

updateServiceVersion

A PUT request is used to update a service version.

URL

/api/v1/serviceversions

Request structure

PUT /api/v1/serviceversions HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NCwiaWF0IjoxNTkxODc3Mjk0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.umtInszSexcNkJGibq8PaShHzIH_XNsM2ZYWYLfbxec
Content-Length: 2442
Content-Type: application/json
Host: localhost:8080

{"id":"5ee21eae02743900e7d446f7","version":"v0.1","serviceId":"5dd64a0f658d290007e78e76","supportArchitecture":["X86","ARM64"],"pricing":null,"restriction":{"cpu":2.0,"memory":500,"storage":10,"dockerVersion":null,"others":null},"builds":[],"serviceComponents":[{"id":null,"name":"analysiscomponent","required":true,"ports":[{"hostPort":80,"componentPort":80},{"hostPort":8400,"componentPort":8400}],"networks":["construction-network"],"dependson":["databasecomponent"],"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":false,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5dd64a0f658d290007e78e76","project":"analysis_service","versionId":null,"tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set1","name":"Common Setting 1","type":"STRING","description":"Common Setting","value":"comstr1","common":true,"visibleToUsers":true},{"key":"track-code","name":"Tracking Code","type":"STRING","description":"Tracking code for the serivce","value":"true","common":true,"visibleToUsers":false},{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"1234","common":false,"visibleToUsers":true}],"restartPolicy":null,"minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":null,"cloudProvider":null},{"id":null,"name":"databasecomponent","required":true,"ports":null,"networks":["construction-network"],"dependson":null,"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":false,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5dd64a0f658d290007e78e76","project":"analysis_service","versionId":null,"tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set2","name":"Common Setting 2","type":"STRING","description":"Common Setting 2","value":"comstr2","common":true,"visibleToUsers":true},{"key":"track-code2","name":"Tracking Code","type":"STRING","description":"Tracking code","value":"track-code-2","common":true,"visibleToUsers":false},{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"1234","common":false,"visibleToUsers":true}],"restartPolicy":null,"minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":null,"cloudProvider":null}],"networks":["construction-network"],"volumes":["data:/data","conf:/conf"],"createTime":0,"updateTime":0}

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/serviceversions' -i -X PUT \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NCwiaWF0IjoxNTkxODc3Mjk0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.umtInszSexcNkJGibq8PaShHzIH_XNsM2ZYWYLfbxec' \
    -H 'Content-Type: application/json' \
    -d '{"id":"5ee21eae02743900e7d446f7","version":"v0.1","serviceId":"5dd64a0f658d290007e78e76","supportArchitecture":["X86","ARM64"],"pricing":null,"restriction":{"cpu":2.0,"memory":500,"storage":10,"dockerVersion":null,"others":null},"builds":[],"serviceComponents":[{"id":null,"name":"analysiscomponent","required":true,"ports":[{"hostPort":80,"componentPort":80},{"hostPort":8400,"componentPort":8400}],"networks":["construction-network"],"dependson":["databasecomponent"],"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":false,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5dd64a0f658d290007e78e76","project":"analysis_service","versionId":null,"tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set1","name":"Common Setting 1","type":"STRING","description":"Common Setting","value":"comstr1","common":true,"visibleToUsers":true},{"key":"track-code","name":"Tracking Code","type":"STRING","description":"Tracking code for the serivce","value":"true","common":true,"visibleToUsers":false},{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"1234","common":false,"visibleToUsers":true}],"restartPolicy":null,"minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":null,"cloudProvider":null},{"id":null,"name":"databasecomponent","required":true,"ports":null,"networks":["construction-network"],"dependson":null,"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":false,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5dd64a0f658d290007e78e76","project":"analysis_service","versionId":null,"tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set2","name":"Common Setting 2","type":"STRING","description":"Common Setting 2","value":"comstr2","common":true,"visibleToUsers":true},{"key":"track-code2","name":"Tracking Code","type":"STRING","description":"Tracking code","value":"track-code-2","common":true,"visibleToUsers":false},{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"1234","common":false,"visibleToUsers":true}],"restartPolicy":null,"minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":null,"cloudProvider":null}],"networks":["construction-network"],"volumes":["data:/data","conf:/conf"],"createTime":0,"updateTime":0}'

getVersionsByServiceId

A GET request is used to query versions by service id.

URL

/api/v1/serviceversions/serviceid/{serviceid}

Request structure

GET /api/v1/serviceversions/serviceid/5dd64a0f658d290007e78e76 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NSwiaWF0IjoxNTkxODc3Mjk1LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.I3y3TR__yr3ucP98L6JdCfE4wFB5CucMCnRzK5MgCDg
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 2444
Content-Type: application/json;charset=UTF-8

[{"id":"5ee21eaf02743900e7d44700","version":"v0.1","serviceId":"5dd64a0f658d290007e78e76","supportArchitecture":["X86","ARM64"],"pricing":null,"restriction":{"cpu":1,"memory":256,"storage":8,"dockerVersion":"17.03","others":null},"builds":[],"serviceComponents":[{"id":null,"name":"analysiscomponent","required":true,"ports":[{"hostPort":80,"componentPort":80},{"hostPort":8400,"componentPort":8400}],"networks":["construction-network"],"dependson":["databasecomponent"],"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":false,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5dd64a0f658d290007e78e76","project":"analysis_service","versionId":null,"tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set1","name":"Common Setting 1","type":"STRING","description":"Common Setting","value":"comstr1","common":true,"visibleToUsers":true},{"key":"track-code","name":"Tracking Code","type":"STRING","description":"Tracking code for the serivce","value":"true","common":true,"visibleToUsers":false},{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"1234","common":false,"visibleToUsers":true}],"restartPolicy":null,"minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":null,"cloudProvider":null},{"id":null,"name":"databasecomponent","required":true,"ports":null,"networks":["construction-network"],"dependson":null,"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":false,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5dd64a0f658d290007e78e76","project":"analysis_service","versionId":null,"tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set2","name":"Common Setting 2","type":"STRING","description":"Common Setting 2","value":"comstr2","common":true,"visibleToUsers":true},{"key":"track-code2","name":"Tracking Code","type":"STRING","description":"Tracking code","value":"track-code-2","common":true,"visibleToUsers":false},{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"1234","common":false,"visibleToUsers":true}],"restartPolicy":null,"minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":null,"cloudProvider":null}],"networks":["construction-network"],"volumes":["data:/data","conf:/conf"],"createTime":0,"updateTime":0}]

CURL request

$ curl 'http://localhost:8080/api/v1/serviceversions/serviceid/5dd64a0f658d290007e78e76' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NSwiaWF0IjoxNTkxODc3Mjk1LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.I3y3TR__yr3ucP98L6JdCfE4wFB5CucMCnRzK5MgCDg'

Response Fields

Path Type Description

[]

Array

An array of versions.

[].id

String

The id of the version.

[].version

String

The version name.

[].serviceId

String

The service ID.

[].supportArchitecture

Array

The OS architectures this version supported. Possible value include: X86,ARM64

[].restriction

Object

The restriction of this version.

[].restriction.cpu

Number

The minimal required CPU , unit GHz.

[].restriction.memory

Number

The minimal required memory , unit MB.

[].restriction.storage

Number

The minimal required storage , unit GB.

[].restriction.dockerVersion

String

The minimal required docker version.

[].restriction.others

Object

This field can be used by any additional restriction declaration. Currently it is not used yet.

[].builds.[]

Array

Builds for this version.

[].builds.[].id

String

The ID of a build.

[].builds.[].buildNumber

String

The build number of the version.

[].serviceComponents.[]

Array

The service components for this version.

[].networks

Array

A list of network names used by this version.

[].volumes

Array

A list of volumes used by this version.

[].createTime

Number

The create time of this version.

[].updateTime

Number

Last update time.

[].serviceComponents.[].id

String

ID of the component, created by EAMT.

[].serviceComponents.[].name

String

The name of the component.

[].serviceComponents.[].required

Boolean

The component is required or not.

[].serviceComponents.[].ports.[]

Array

An array of the component ports.

[].serviceComponents.[].networks

Array

A list of network names used by this component.

[].serviceComponents.[].volumes

Array

A list of volumes used by this component.

[].serviceComponents.[].dependson

Array

An array of the component depends on.

[].serviceComponents.[].image

Object

The Docker image of the component.

[].serviceComponents.[].image.project

String

The service name of the Docker image.

[].serviceComponents.[].image.versionId

String

The version Id of the Docker image.

[].serviceComponents.[].image.tag

String

The tag of the Docker image.

[].serviceComponents.[].image.id

String

The id of the Docker image.

[].serviceComponents.[].image.name

String

The name of the Docker image.

[].serviceComponents.[].image.published

Boolean

The Docker image is published or not.

[].serviceComponents.[].image.publishAddress

String

The publishAddress of the Docker image. Currently it is not used yet.

[].serviceComponents.[].image.digest

String

The digest of the Docker image.

[].serviceComponents.[].image.buildID

String

The buildID of the Docker image. Currently it is not used yet.

[].serviceComponents.[].image.serviceID

String

The serviceID of the Docker image.

[].serviceComponents.[].envSettings.[]

Array

An array of the component environment settings.

[].serviceComponents.[].restartPolicy

String

The component restart policy.

[].serviceComponents.[].minimalRequiredCPU

Number

The component minimal required CPU.

[].serviceComponents.[].minimalRequiredMemory

Number

The component minimal required memory.

[].serviceComponents.[].minimalRequiredStorage

Number

The component minimal required storage.

[].serviceComponents.[].customSettings

Object

An Map of the component custom settings. Key represents the device ID and value is the value is an list of environment settings(without common and visibleToUsers field).

[].serviceComponents.[].cloudProvider

Object

An Map of the component cloud settings. Key is cloud name and the value an list of environment settings.

[].serviceComponents.[].ports.[].hostPort

Number

Port is used on the device to access the service.

[].serviceComponents.[].ports.[].componentPort

Number

Service port.

[].serviceComponents.[].envSettings.[].key

String

The identifier of the environment variable. The service will use this key to get the value of the environment variable in their code.

[].serviceComponents.[].envSettings.[].name

String

The display name of the environment variable. It will be display in the deployment builder wizard UI when user build a new deployment.

[].serviceComponents.[].envSettings.[].type

String

The type of this environment variable, supported types include : STRING,BOOLEAN,NUMBER

[].serviceComponents.[].envSettings.[].description

String

The description of this environment variable.

[].serviceComponents.[].envSettings.[].value

String

The default value of this environment variable.

[].serviceComponents.[].envSettings.[].common

Boolean

If set this field to true, when user build a deployment he only need to set the value once. The value will be applied to all devices. If set this field to false, the device can have different values, user need to specify a value for each device.

[].serviceComponents.[].envSettings.[].visibleToUsers

Boolean

Boolean, when the value is false it means user cannot see this environment variable when they build a deployment.

getDefaultVersionByServiceId

A GET request is used to query default version by service id.

URL

/api/v1/serviceversions/defaultversionbyserviceid/{serviceid}

Request structure

GET /api/v1/serviceversions/defaultversionbyserviceid/5dd64a0f658d290007e78e76 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NCwiaWF0IjoxNTkxODc3Mjk0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.umtInszSexcNkJGibq8PaShHzIH_XNsM2ZYWYLfbxec
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 2442
Content-Type: application/json;charset=UTF-8

{"id":"5ee21eae02743900e7d446f9","version":"v0.1","serviceId":"5dd64a0f658d290007e78e76","supportArchitecture":["X86","ARM64"],"pricing":null,"restriction":{"cpu":1,"memory":256,"storage":8,"dockerVersion":"17.03","others":null},"builds":[],"serviceComponents":[{"id":null,"name":"analysiscomponent","required":true,"ports":[{"hostPort":80,"componentPort":80},{"hostPort":8400,"componentPort":8400}],"networks":["construction-network"],"dependson":["databasecomponent"],"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":false,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5dd64a0f658d290007e78e76","project":"analysis_service","versionId":null,"tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set1","name":"Common Setting 1","type":"STRING","description":"Common Setting","value":"comstr1","common":true,"visibleToUsers":true},{"key":"track-code","name":"Tracking Code","type":"STRING","description":"Tracking code for the serivce","value":"true","common":true,"visibleToUsers":false},{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"1234","common":false,"visibleToUsers":true}],"restartPolicy":null,"minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":null,"cloudProvider":null},{"id":null,"name":"databasecomponent","required":true,"ports":null,"networks":["construction-network"],"dependson":null,"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":false,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5dd64a0f658d290007e78e76","project":"analysis_service","versionId":null,"tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set2","name":"Common Setting 2","type":"STRING","description":"Common Setting 2","value":"comstr2","common":true,"visibleToUsers":true},{"key":"track-code2","name":"Tracking Code","type":"STRING","description":"Tracking code","value":"track-code-2","common":true,"visibleToUsers":false},{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"1234","common":false,"visibleToUsers":true}],"restartPolicy":null,"minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":null,"cloudProvider":null}],"networks":["construction-network"],"volumes":["data:/data","conf:/conf"],"createTime":0,"updateTime":0}

CURL request

$ curl 'http://localhost:8080/api/v1/serviceversions/defaultversionbyserviceid/5dd64a0f658d290007e78e76' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NCwiaWF0IjoxNTkxODc3Mjk0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.umtInszSexcNkJGibq8PaShHzIH_XNsM2ZYWYLfbxec'

Response Fields

Path Type Description

id

String

The id of the version.

version

String

The version name.

serviceId

String

The service ID.

supportArchitecture

Array

The OS architectures this version supported. Possible value include: X86,ARM64

restriction

Object

The restriction of this version.

restriction.cpu

Number

The minimal required CPU , unit GHz.

restriction.memory

Number

The minimal required memory , unit MB.

restriction.storage

Number

The minimal required storage , unit GB.

restriction.dockerVersion

String

The minimal required docker version.

restriction.others

Object

This field can be used by any additional restriction declaration. Currently it is not used yet.

builds.[]

Array

Builds for this version.

builds.[].id

String

The ID of a build.

builds.[].buildNumber

String

The build number of the version.

serviceComponents.[]

Array

The service components for this version.

networks

Array

A list of network names used by this version.

volumes

Array

A list of volumes used by this version.

createTime

Number

The create time of this version.

updateTime

Number

Last update time.

serviceComponents.[].id

String

ID of the component, created by EAMT.

serviceComponents.[].name

String

The name of the component.

serviceComponents.[].required

Boolean

The component is required or not.

serviceComponents.[].ports.[]

Array

An array of the component ports.

serviceComponents.[].networks

Array

A list of network names used by this component.

serviceComponents.[].volumes

Array

A list of volumes used by this component.

serviceComponents.[].dependson

Array

An array of the component depends on.

serviceComponents.[].image

Object

The Docker image of the component.

serviceComponents.[].image.project

String

The service name of the Docker image.

serviceComponents.[].image.versionId

String

The version Id of the Docker image.

serviceComponents.[].image.tag

String

The tag of the Docker image.

serviceComponents.[].image.id

String

The id of the Docker image.

serviceComponents.[].image.name

String

The name of the Docker image.

serviceComponents.[].image.published

Boolean

The Docker image is published or not.

serviceComponents.[].image.publishAddress

String

The publishAddress of the Docker image. Currently it is not used yet.

serviceComponents.[].image.digest

String

The digest of the Docker image.

serviceComponents.[].image.buildID

String

The buildID of the Docker image. Currently it is not used yet.

serviceComponents.[].image.serviceID

String

The serviceID of the Docker image.

serviceComponents.[].envSettings.[]

Array

An array of the component environment settings.

serviceComponents.[].restartPolicy

String

The component restart policy.

serviceComponents.[].minimalRequiredCPU

Number

The component minimal required CPU.

serviceComponents.[].minimalRequiredMemory

Number

The component minimal required memory.

serviceComponents.[].minimalRequiredStorage

Number

The component minimal required storage.

serviceComponents.[].customSettings

Object

An Map of the component custom settings. Key represents the device ID and value is the value is an list of environment settings(without common and visibleToUsers field).

serviceComponents.[].cloudProvider

Object

An Map of the component cloud settings. Key is cloud name and the value an list of environment settings.

serviceComponents.[].ports.[].hostPort

Number

Port is used on the device to access the service.

serviceComponents.[].ports.[].componentPort

Number

Service port.

serviceComponents.[].envSettings.[].key

String

The identifier of the environment variable. The service will use this key to get the value of the environment variable in their code.

serviceComponents.[].envSettings.[].name

String

The display name of the environment variable. It will be display in the deployment builder wizard UI when user build a new deployment.

serviceComponents.[].envSettings.[].type

String

The type of this environment variable, supported types include : STRING,BOOLEAN,NUMBER

serviceComponents.[].envSettings.[].description

String

The description of this environment variable.

serviceComponents.[].envSettings.[].value

String

The default value of this environment variable.

serviceComponents.[].envSettings.[].common

Boolean

If set this field to true, when user build a deployment he only need to set the value once. The value will be applied to all devices. If set this field to false, the device can have different values, user need to specify a value for each device.

serviceComponents.[].envSettings.[].visibleToUsers

Boolean

Boolean, when the value is false it means user cannot see this environment variable when they build a deployment.

getServiceVersionById

A GET request is used to query version by id.

URL

/api/v1/serviceversions/{id}

Request structure

GET /api/v1/serviceversions/5ee21eaf02743900e7d446ff HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NSwiaWF0IjoxNTkxODc3Mjk1LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.I3y3TR__yr3ucP98L6JdCfE4wFB5CucMCnRzK5MgCDg
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 2442
Content-Type: application/json;charset=UTF-8

{"id":"5ee21eaf02743900e7d446ff","version":"v0.1","serviceId":"5dd64a0f658d290007e78e76","supportArchitecture":["X86","ARM64"],"pricing":null,"restriction":{"cpu":1,"memory":256,"storage":8,"dockerVersion":"17.03","others":null},"builds":[],"serviceComponents":[{"id":null,"name":"analysiscomponent","required":true,"ports":[{"hostPort":80,"componentPort":80},{"hostPort":8400,"componentPort":8400}],"networks":["construction-network"],"dependson":["databasecomponent"],"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":false,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5dd64a0f658d290007e78e76","project":"analysis_service","versionId":null,"tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set1","name":"Common Setting 1","type":"STRING","description":"Common Setting","value":"comstr1","common":true,"visibleToUsers":true},{"key":"track-code","name":"Tracking Code","type":"STRING","description":"Tracking code for the serivce","value":"true","common":true,"visibleToUsers":false},{"key":"sp-set","name":"Specific Setting","type":"NUMBER","description":"Specific Setting","value":"1234","common":false,"visibleToUsers":true}],"restartPolicy":null,"minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":null,"cloudProvider":null},{"id":null,"name":"databasecomponent","required":true,"ports":null,"networks":["construction-network"],"dependson":null,"image":{"id":null,"name":"analysis_service/nginx:v0.1","published":false,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5dd64a0f658d290007e78e76","project":"analysis_service","versionId":null,"tag":null},"volumes":["data:/data","conf:/conf"],"envSettings":[{"key":"cn-set2","name":"Common Setting 2","type":"STRING","description":"Common Setting 2","value":"comstr2","common":true,"visibleToUsers":true},{"key":"track-code2","name":"Tracking Code","type":"STRING","description":"Tracking code","value":"track-code-2","common":true,"visibleToUsers":false},{"key":"spe-set2","name":"Specific Setting 2","type":"NUMBER","description":"Specific Setting 2","value":"1234","common":false,"visibleToUsers":true}],"restartPolicy":null,"minimalRequiredCPU":null,"minimalRequiredMemory":null,"minimalRequiredStorage":null,"customSettings":null,"cloudProvider":null}],"networks":["construction-network"],"volumes":["data:/data","conf:/conf"],"createTime":0,"updateTime":0}

CURL request

$ curl 'http://localhost:8080/api/v1/serviceversions/5ee21eaf02743900e7d446ff' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NSwiaWF0IjoxNTkxODc3Mjk1LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.I3y3TR__yr3ucP98L6JdCfE4wFB5CucMCnRzK5MgCDg'

Response Fields

Path Type Description

id

String

The id of the version.

version

String

The version name.

serviceId

String

The service ID.

supportArchitecture

Array

The OS architectures this version supported. Possible value include: X86,ARM64

restriction

Object

The restriction of this version.

restriction.cpu

Number

The minimal required CPU , unit GHz.

restriction.memory

Number

The minimal required memory , unit MB.

restriction.storage

Number

The minimal required storage , unit GB.

restriction.dockerVersion

String

The minimal required docker version.

restriction.others

Object

This field can be used by any additional restriction declaration. Currently it is not used yet.

builds.[]

Array

Builds for this version.

builds.[].id

String

The ID of a build.

builds.[].buildNumber

String

The build number of the version.

serviceComponents.[]

Array

The service components for this version.

networks

Array

A list of network names used by this version.

volumes

Array

A list of volumes used by this version.

createTime

Number

The create time of this version.

updateTime

Number

Last update time.

serviceComponents.[].id

String

ID of the component, created by EAMT.

serviceComponents.[].name

String

The name of the component.

serviceComponents.[].required

Boolean

The component is required or not.

serviceComponents.[].ports.[]

Array

An array of the component ports.

serviceComponents.[].networks

Array

A list of network names used by this component.

serviceComponents.[].volumes

Array

A list of volumes used by this component.

serviceComponents.[].dependson

Array

An array of the component depends on.

serviceComponents.[].image

Object

The Docker image of the component.

serviceComponents.[].image.project

String

The service name of the Docker image.

serviceComponents.[].image.versionId

String

The version Id of the Docker image.

serviceComponents.[].image.tag

String

The tag of the Docker image.

serviceComponents.[].image.id

String

The id of the Docker image.

serviceComponents.[].image.name

String

The name of the Docker image.

serviceComponents.[].image.published

Boolean

The Docker image is published or not.

serviceComponents.[].image.publishAddress

String

The publishAddress of the Docker image. Currently it is not used yet.

serviceComponents.[].image.digest

String

The digest of the Docker image.

serviceComponents.[].image.buildID

String

The buildID of the Docker image. Currently it is not used yet.

serviceComponents.[].image.serviceID

String

The serviceID of the Docker image.

serviceComponents.[].envSettings.[]

Array

An array of the component environment settings.

serviceComponents.[].restartPolicy

String

The component restart policy.

serviceComponents.[].minimalRequiredCPU

Number

The component minimal required CPU.

serviceComponents.[].minimalRequiredMemory

Number

The component minimal required memory.

serviceComponents.[].minimalRequiredStorage

Number

The component minimal required storage.

serviceComponents.[].customSettings

Object

An Map of the component custom settings. Key represents the device ID and value is the value is an list of environment settings(without common and visibleToUsers field).

serviceComponents.[].cloudProvider

Object

An Map of the component cloud settings. Key is cloud name and the value an list of environment settings.

serviceComponents.[].ports.[].hostPort

Number

Port is used on the device to access the service.

serviceComponents.[].ports.[].componentPort

Number

Service port.

serviceComponents.[].envSettings.[].key

String

The identifier of the environment variable. The service will use this key to get the value of the environment variable in their code.

serviceComponents.[].envSettings.[].name

String

The display name of the environment variable. It will be display in the deployment builder wizard UI when user build a new deployment.

serviceComponents.[].envSettings.[].type

String

The type of this environment variable, supported types include : STRING,BOOLEAN,NUMBER

serviceComponents.[].envSettings.[].description

String

The description of this environment variable.

serviceComponents.[].envSettings.[].value

String

The default value of this environment variable.

serviceComponents.[].envSettings.[].common

Boolean

If set this field to true, when user build a deployment he only need to set the value once. The value will be applied to all devices. If set this field to false, the device can have different values, user need to specify a value for each device.

serviceComponents.[].envSettings.[].visibleToUsers

Boolean

Boolean, when the value is false it means user cannot see this environment variable when they build a deployment.

removeVersion

A DELETE request is used to delete a version.

URL

/api/v1/serviceversions/{id}

Request structure

DELETE /api/v1/serviceversions/5ee21eae02743900e7d446f8 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NCwiaWF0IjoxNTkxODc3Mjk0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.umtInszSexcNkJGibq8PaShHzIH_XNsM2ZYWYLfbxec
Host: localhost:8080

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/serviceversions/5ee21eae02743900e7d446f8' -i -X DELETE \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NCwiaWF0IjoxNTkxODc3Mjk0LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.umtInszSexcNkJGibq8PaShHzIH_XNsM2ZYWYLfbxec'

getTemplateImages

A GET request is used to query images by service id and version id.

URL

/api/v1/serviceversions/gettempimagesbyserviceidandversion/{serviceid}/{versionid}

Request structure

GET /api/v1/serviceversions/gettempimagesbyserviceidandversion/5dd64a0f658d290007e78e76/5ee21eaf02743900e7d446fb HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NSwiaWF0IjoxNTkxODc3Mjk1LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.I3y3TR__yr3ucP98L6JdCfE4wFB5CucMCnRzK5MgCDg
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 240
Content-Type: application/json;charset=UTF-8

[{"id":"5ee21eaf02743900e7d446fc","name":"test-image","published":false,"publishAddress":null,"digest":null,"buildID":null,"serviceID":"5dd64a0f658d290007e78e76","project":"test-service","versionId":"5ee21eaf02743900e7d446fb","tag":"v0.1"}]

CURL request

$ curl 'http://localhost:8080/api/v1/serviceversions/gettempimagesbyserviceidandversion/5dd64a0f658d290007e78e76/5ee21eaf02743900e7d446fb' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NSwiaWF0IjoxNTkxODc3Mjk1LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.I3y3TR__yr3ucP98L6JdCfE4wFB5CucMCnRzK5MgCDg'

Response Fields

Path Type Description

[]

Array

An array of versions.

[].id

String

The id of the docker image.

[].versionId

String

The version ID of the docker image.

[].tag

String

The tag of the docker image.

[].project

String

The project of the docker image.

[].name

String

The name of the docker image.

[].published

Boolean

Is this docker image public.

[].serviceID

String

The service ID of the docker image.

[].publishAddress

String

The publishAddress of the Docker image. Currently it is not used yet.

[].digest

String

The digest of the Docker image.

[].buildID

String

The buildID of the Docker image. Currently it is not used yet.

uploadimages

A POST request is used to upload docker tar file for EAMT API.

URL

/api/v1/serviceversions/uploadimages

Request structure

POST /api/v1/serviceversions/uploadimages HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NSwiaWF0IjoxNTkxODc3Mjk1LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.I3y3TR__yr3ucP98L6JdCfE4wFB5CucMCnRzK5MgCDg
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Host: localhost:8080

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=versionId

5ee21eaf02743900e7d446fd
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=architecture

X86
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=helloworld.tar
Content-Type: text/plain

cdccdf50922d90e847e097347de49119be0f17c18b4a2d98da9919fa5884479d/0040755000000000000000000000000013412541167020125 5ustar0000000000000000cdccdf50922d90e847e097347de49119be0f17c18b4a2d98da9919fa5884479d/VERSION0100644000000000000000000000000313412541167021163 0ustar00000000000000001.0cdccdf50922d90e847e097347de49119be0f17c18b4a2d98da9919fa5884479d/json0100644000000000000000000000223613412541167021021 0ustar0000000000000000{"id":"cdccdf50922d90e847e097347de49119be0f17c18b4a2d98da9919fa5884479d","created":"2019-01-01T01:29:27.650294696Z","container":"8e2caa5a514bb6d8b4f2a2553e9067498d261a0fd83a96aeaaf303943dff6ff9","container_config":{"Hostname":"8e2caa5a514b","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"ArgsEscaped":true,"Image":"sha256:a6d1aaad8ca65655449a26146699fe9d61240071f6992975be7e720f1cd42440","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"docker_version":"18.06.1-ce","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"ArgsEscaped":true,"Image":"sha256:a6d1aaad8ca65655449a26146699fe9d61240071f6992975be7e720f1cd42440","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"architecture":"amd64","os":"linux"}cdccdf50922d90e847e097347de49119be0f17c18b4a2d98da9919fa5884479d/layer.tar0100644000000000000000000000700013412541167021743 0ustar0000000000000000hello0100775000000000000000000000346013412541034010300 0ustar0000000000000000ELF>P@@p@8@@@00   @ @$$0``Q�tdGNU�2���F�b$�����C�vH�iH�����'1��Z1��<1��H��H��H��H��M��M��L�L$H=�����f.�H��d�%����H����
Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

zRx�x���&4����.shstrtab.note.gnu.build-id.text.rodata.eh_frame.tbss @ $P@Pp$�@�( ,�@�H6`00<fce289e99eb9bca977dae136fbe2a82b6b7d4c372474c9235adc1741675f587e.json0100644000000000000000000000274613412541167021242 0ustar0000000000000000{"architecture":"amd64","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"ArgsEscaped":true,"Image":"sha256:a6d1aaad8ca65655449a26146699fe9d61240071f6992975be7e720f1cd42440","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"8e2caa5a514bb6d8b4f2a2553e9067498d261a0fd83a96aeaaf303943dff6ff9","container_config":{"Hostname":"8e2caa5a514b","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"ArgsEscaped":true,"Image":"sha256:a6d1aaad8ca65655449a26146699fe9d61240071f6992975be7e720f1cd42440","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2019-01-01T01:29:27.650294696Z","docker_version":"18.06.1-ce","history":[{"created":"2019-01-01T01:29:27.416803627Z","created_by":"/bin/sh -c #(nop) COPY file:f77490f70ce51da25bd21bfc30cb5e1a24b2b65eb37d4af0c327ddc24f0986a6 in / "},{"created":"2019-01-01T01:29:27.650294696Z","created_by":"/bin/sh -c #(nop)  CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:af0b15c8625bb1938f1d7b17081031f649fd14e6b233688eea3c5483994a66a3"]}}manifest.json0100644000000000000000000000031700000000000011710 0ustar0000000000000000[{"Config":"fce289e99eb9bca977dae136fbe2a82b6b7d4c372474c9235adc1741675f587e.json","RepoTags":["hello-world:latest"],"Layers":["cdccdf50922d90e847e097347de49119be0f17c18b4a2d98da9919fa5884479d/layer.tar"]}]
repositories0100644000000000000000000000013600000000000011660 0ustar0000000000000000{"hello-world":{"latest":"cdccdf50922d90e847e097347de49119be0f17c18b4a2d98da9919fa5884479d"}}

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/serviceversions/uploadimages' -i -X POST \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ5NSwiaWF0IjoxNTkxODc3Mjk1LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.I3y3TR__yr3ucP98L6JdCfE4wFB5CucMCnRzK5MgCDg' \
    -H 'Content-Type: multipart/form-data' \
    -F 'file=@helloworld.tar;type=text/plain' \
    -F 'versionId=5ee21eaf02743900e7d446fd' \
    -F 'architecture=X86'

/api/v1/deploymentresource

Provides operations on DeploymentResource.

getDeploymentResourceByID

A GET request is used to access the DeploymentResource read.

URL

/api/v1/deploymentresource/{deploymentresourceid}

Request structure

GET /api/v1/deploymentresource/5ee21e9c02743900e7d446c8 HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 2004
Content-Type: application/json;charset=UTF-8

{"id":"5ee21e9c02743900e7d446c8","name":"Dell Edge Gateway 5000","deployedServices":["Machine Learning"],"model":"Dell Edge Gateway 5000","os":"Ubuntu 16","processor":{"coresNumber":2,"frequency":1.74,"processorType":"x86_64","model":"Intel(R) Atom(TM) CPU  E3827  @ 1.74GHz"},"memory":"2G","memoryCapacity":2,"memoryCurrent":0,"storage":"32GB Solid State Hard Drive (m .2 SATA form factor) 1.8 inch","storageCapacity":32,"storageCurrent":0,"wireless":"Wireless 802.11n LAN LBEE5ZZ1E N Radio Label","portsAndSlots":{"Micro SD port":1,"DSI display port":1,"Composite video port":1,"CSI camera port":1},"pciDetails":[{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register","bdf":"0000:00:00:0","pciclass":"Bridge"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series Graphics & Display","bdf":"0000:00:02:0","pciclass":"Display Controller"},{"vendor":"Intel Corporation","name":"Atom Processor E3800 Series SATA AHCI Controller","bdf":"0000:00:13:0","pciclass":"Mass Storage Controller"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx,Celeron N2000 Series USB xHCI","bdf":"0000:00:14:0","pciclass":"Serial Bus Controller"}],"usbDetails":[{"busNumber":"001","deviceNumber":"003","vendorID":"413c","productID":"301a","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"007","vendorID":"0403","productID":"6001","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"006","vendorID":"1286","productID":"2045","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"005","vendorID":"413c","productID":"81ba","detail":"Dell Computer Corp"}],"type":null,"status":"ACTIVE","createTime":1591877276698,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","imgUrl":null,"agentDetail":{"architecture":"ARM64","agentVersion":"v0.5","cpuPercentUsage":1.53638264728,"memoryPercentUsage":0.761168301,"memoryUsage":14241792,"storagePercentUsage":30.598756,"storageUsage":67965644500}}

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentresource/5ee21e9c02743900e7d446c8' -i -X GET

Response Fields

Path Type Description

id

String

ID of the deploymentResource, created by EAMT.

name

String

The name of the deploymentResource

deployedServices

Array

Service name list deployed on this device.

model

String

Device model.

os

String

Operation system info in this device

processor

Object

CPU info in this device.

processor.coresNumber

Number

CPU info coresNumber in this device.

processor.frequency

Number

CPU info frequency in this device.

processor.processorType

String

CPU info processorType in this device.

processor.model

String

CPU info model in this device.

memory

String

Memory description in this device.

memoryCapacity

Number

Memory capacity in this device.

memoryCurrent

Number

Memory current usage in this device.

storage

String

Hard disk storage info in this device.

storageCapacity

Number

Hard disk storage capacity in this device.

storageCurrent

Number

Hard disk current usage in this device.

wireless

String

Wireless info in this device.

portsAndSlots

Object

Ports and Slots info in this device.

pciDetails.[]

Array

PciDetails info in this device.

usbDetails.[]

Array

UsbDetails info in this device.

type

String

Device Type(reserved field).

status

String

Device status

createTime

Number

When this deploymentResource was created

updateTime

Number

Last update time.

userId

String

User Id who create this deploymentResource.

userName

String

User name who create this deploymentResource.

imgUrl

String

Thumbnails of this device.

agentDetail

Object

Agent information.

agentDetail.architecture

String

The device architecture, X86_64 or ARM64.

agentDetail.agentVersion

String

The agent version.

agentDetail.cpuPercentUsage

Number

The CPU usage of the agent.

agentDetail.memoryPercentUsage

Number

The memory usage of the agent.

agentDetail.memoryUsage

Number

The agent memory usage of this device.

agentDetail.storagePercentUsage

Number

The agent storage usage percent of this device.

agentDetail.storageUsage

Number

The agent storage usage of this device.

pciDetails.[].bdf

String

BDF

pciDetails.[].pciclass

String

PCIClass

pciDetails.[].vendor

String

vendor

pciDetails.[].name

String

name

usbDetails.[].busNumber

String

busNumber

usbDetails.[].deviceNumber

String

deviceNumber

usbDetails.[].vendorID

String

vendorID

usbDetails.[].productID

String

productID

usbDetails.[].detail

String

detail

getAllWithPage

A GET request is used to access the DeploymentResource read.

URL

/api/v1/deploymentresource/pagenumber/{pagenumber}/pagesize/{pagenumber}

Request structure

GET /api/v1/deploymentresource/pagenumber/1/pagesize/10 HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 20369

{"content":[{"id":"5ee21e9c02743900e7d446dd","name":"Dell Edge Gateway 5000","deployedServices":["Machine Learning"],"model":"Dell Edge Gateway 5000","os":"Ubuntu 16","processor":{"coresNumber":2,"frequency":1.74,"processorType":"x86_64","model":"Intel(R) Atom(TM) CPU  E3827  @ 1.74GHz"},"memory":"2G","memoryCapacity":2,"memoryCurrent":0,"storage":"32GB Solid State Hard Drive (m .2 SATA form factor) 1.8 inch","storageCapacity":32,"storageCurrent":0,"wireless":"Wireless 802.11n LAN LBEE5ZZ1E N Radio Label","portsAndSlots":{"Micro SD port":1,"DSI display port":1,"Composite video port":1,"CSI camera port":1},"pciDetails":[{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register","bdf":"0000:00:00:0","pciclass":"Bridge"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series Graphics & Display","bdf":"0000:00:02:0","pciclass":"Display Controller"},{"vendor":"Intel Corporation","name":"Atom Processor E3800 Series SATA AHCI Controller","bdf":"0000:00:13:0","pciclass":"Mass Storage Controller"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx,Celeron N2000 Series USB xHCI","bdf":"0000:00:14:0","pciclass":"Serial Bus Controller"}],"usbDetails":[{"busNumber":"001","deviceNumber":"003","vendorID":"413c","productID":"301a","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"007","vendorID":"0403","productID":"6001","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"006","vendorID":"1286","productID":"2045","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"005","vendorID":"413c","productID":"81ba","detail":"Dell Computer Corp"}],"type":null,"status":"ACTIVE","createTime":1591877276918,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","imgUrl":null,"agentDetail":{"architecture":"ARM64","agentVersion":"v0.5","cpuPercentUsage":1.53638264728,"memoryPercentUsage":0.761168301,"memoryUsage":14241792,"storagePercentUsage":30.598756,"storageUsage":67965644500}},{"id":"5ee21e9c02743900e7d446dc","name":"Dell Edge Gateway 5000","deployedServices":["Machine Learning"],"model":"Dell Edge Gateway 5000","os":"Ubuntu 16","processor":{"coresNumber":2,"frequency":1.74,"processorType":"x86_64","model":"Intel(R) Atom(TM) CPU  E3827  @ 1.74GHz"},"memory":"2G","memoryCapacity":2,"memoryCurrent":0,"storage":"32GB Solid State Hard Drive (m .2 SATA form factor) 1.8 inch","storageCapacity":32,"storageCurrent":0,"wireless":"Wireless 802.11n LAN LBEE5ZZ1E N Radio Label","portsAndSlots":{"Micro SD port":1,"DSI display port":1,"Composite video port":1,"CSI camera port":1},"pciDetails":[{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register","bdf":"0000:00:00:0","pciclass":"Bridge"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series Graphics & Display","bdf":"0000:00:02:0","pciclass":"Display Controller"},{"vendor":"Intel Corporation","name":"Atom Processor E3800 Series SATA AHCI Controller","bdf":"0000:00:13:0","pciclass":"Mass Storage Controller"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx,Celeron N2000 Series USB xHCI","bdf":"0000:00:14:0","pciclass":"Serial Bus Controller"}],"usbDetails":[{"busNumber":"001","deviceNumber":"003","vendorID":"413c","productID":"301a","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"007","vendorID":"0403","productID":"6001","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"006","vendorID":"1286","productID":"2045","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"005","vendorID":"413c","productID":"81ba","detail":"Dell Computer Corp"}],"type":null,"status":"ACTIVE","createTime":1591877276916,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","imgUrl":null,"agentDetail":{"architecture":"ARM64","agentVersion":"v0.5","cpuPercentUsage":1.53638264728,"memoryPercentUsage":0.761168301,"memoryUsage":14241792,"storagePercentUsage":30.598756,"storageUsage":67965644500}},{"id":"5ee21e9c02743900e7d446db","name":"Dell Edge Gateway 5000","deployedServices":["Machine Learning"],"model":"Dell Edge Gateway 5000","os":"Ubuntu 16","processor":{"coresNumber":2,"frequency":1.74,"processorType":"x86_64","model":"Intel(R) Atom(TM) CPU  E3827  @ 1.74GHz"},"memory":"2G","memoryCapacity":2,"memoryCurrent":0,"storage":"32GB Solid State Hard Drive (m .2 SATA form factor) 1.8 inch","storageCapacity":32,"storageCurrent":0,"wireless":"Wireless 802.11n LAN LBEE5ZZ1E N Radio Label","portsAndSlots":{"Micro SD port":1,"DSI display port":1,"Composite video port":1,"CSI camera port":1},"pciDetails":[{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register","bdf":"0000:00:00:0","pciclass":"Bridge"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series Graphics & Display","bdf":"0000:00:02:0","pciclass":"Display Controller"},{"vendor":"Intel Corporation","name":"Atom Processor E3800 Series SATA AHCI Controller","bdf":"0000:00:13:0","pciclass":"Mass Storage Controller"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx,Celeron N2000 Series USB xHCI","bdf":"0000:00:14:0","pciclass":"Serial Bus Controller"}],"usbDetails":[{"busNumber":"001","deviceNumber":"003","vendorID":"413c","productID":"301a","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"007","vendorID":"0403","productID":"6001","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"006","vendorID":"1286","productID":"2045","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"005","vendorID":"413c","productID":"81ba","detail":"Dell Computer Corp"}],"type":null,"status":"ACTIVE","createTime":1591877276915,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","imgUrl":null,"agentDetail":{"architecture":"ARM64","agentVersion":"v0.5","cpuPercentUsage":1.53638264728,"memoryPercentUsage":0.761168301,"memoryUsage":14241792,"storagePercentUsage":30.598756,"storageUsage":67965644500}},{"id":"5ee21e9c02743900e7d446da","name":"Dell Edge Gateway 5000","deployedServices":["Machine Learning"],"model":"Dell Edge Gateway 5000","os":"Ubuntu 16","processor":{"coresNumber":2,"frequency":1.74,"processorType":"x86_64","model":"Intel(R) Atom(TM) CPU  E3827  @ 1.74GHz"},"memory":"2G","memoryCapacity":2,"memoryCurrent":0,"storage":"32GB Solid State Hard Drive (m .2 SATA form factor) 1.8 inch","storageCapacity":32,"storageCurrent":0,"wireless":"Wireless 802.11n LAN LBEE5ZZ1E N Radio Label","portsAndSlots":{"Micro SD port":1,"DSI display port":1,"Composite video port":1,"CSI camera port":1},"pciDetails":[{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register","bdf":"0000:00:00:0","pciclass":"Bridge"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series Graphics & Display","bdf":"0000:00:02:0","pciclass":"Display Controller"},{"vendor":"Intel Corporation","name":"Atom Processor E3800 Series SATA AHCI Controller","bdf":"0000:00:13:0","pciclass":"Mass Storage Controller"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx,Celeron N2000 Series USB xHCI","bdf":"0000:00:14:0","pciclass":"Serial Bus Controller"}],"usbDetails":[{"busNumber":"001","deviceNumber":"003","vendorID":"413c","productID":"301a","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"007","vendorID":"0403","productID":"6001","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"006","vendorID":"1286","productID":"2045","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"005","vendorID":"413c","productID":"81ba","detail":"Dell Computer Corp"}],"type":null,"status":"ACTIVE","createTime":1591877276913,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","imgUrl":null,"agentDetail":{"architecture":"ARM64","agentVersion":"v0.5","cpuPercentUsage":1.53638264728,"memoryPercentUsage":0.761168301,"memoryUsage":14241792,"storagePercentUsage":30.598756,"storageUsage":67965644500}},{"id":"5ee21e9c02743900e7d446d9","name":"Dell Edge Gateway 5000","deployedServices":["Machine Learning"],"model":"Dell Edge Gateway 5000","os":"Ubuntu 16","processor":{"coresNumber":2,"frequency":1.74,"processorType":"x86_64","model":"Intel(R) Atom(TM) CPU  E3827  @ 1.74GHz"},"memory":"2G","memoryCapacity":2,"memoryCurrent":0,"storage":"32GB Solid State Hard Drive (m .2 SATA form factor) 1.8 inch","storageCapacity":32,"storageCurrent":0,"wireless":"Wireless 802.11n LAN LBEE5ZZ1E N Radio Label","portsAndSlots":{"Micro SD port":1,"DSI display port":1,"Composite video port":1,"CSI camera port":1},"pciDetails":[{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register","bdf":"0000:00:00:0","pciclass":"Bridge"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series Graphics & Display","bdf":"0000:00:02:0","pciclass":"Display Controller"},{"vendor":"Intel Corporation","name":"Atom Processor E3800 Series SATA AHCI Controller","bdf":"0000:00:13:0","pciclass":"Mass Storage Controller"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx,Celeron N2000 Series USB xHCI","bdf":"0000:00:14:0","pciclass":"Serial Bus Controller"}],"usbDetails":[{"busNumber":"001","deviceNumber":"003","vendorID":"413c","productID":"301a","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"007","vendorID":"0403","productID":"6001","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"006","vendorID":"1286","productID":"2045","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"005","vendorID":"413c","productID":"81ba","detail":"Dell Computer Corp"}],"type":null,"status":"ACTIVE","createTime":1591877276911,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","imgUrl":null,"agentDetail":{"architecture":"ARM64","agentVersion":"v0.5","cpuPercentUsage":1.53638264728,"memoryPercentUsage":0.761168301,"memoryUsage":14241792,"storagePercentUsage":30.598756,"storageUsage":67965644500}},{"id":"5ee21e9c02743900e7d446d8","name":"Dell Edge Gateway 5000","deployedServices":["Machine Learning"],"model":"Dell Edge Gateway 5000","os":"Ubuntu 16","processor":{"coresNumber":2,"frequency":1.74,"processorType":"x86_64","model":"Intel(R) Atom(TM) CPU  E3827  @ 1.74GHz"},"memory":"2G","memoryCapacity":2,"memoryCurrent":0,"storage":"32GB Solid State Hard Drive (m .2 SATA form factor) 1.8 inch","storageCapacity":32,"storageCurrent":0,"wireless":"Wireless 802.11n LAN LBEE5ZZ1E N Radio Label","portsAndSlots":{"Micro SD port":1,"DSI display port":1,"Composite video port":1,"CSI camera port":1},"pciDetails":[{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register","bdf":"0000:00:00:0","pciclass":"Bridge"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series Graphics & Display","bdf":"0000:00:02:0","pciclass":"Display Controller"},{"vendor":"Intel Corporation","name":"Atom Processor E3800 Series SATA AHCI Controller","bdf":"0000:00:13:0","pciclass":"Mass Storage Controller"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx,Celeron N2000 Series USB xHCI","bdf":"0000:00:14:0","pciclass":"Serial Bus Controller"}],"usbDetails":[{"busNumber":"001","deviceNumber":"003","vendorID":"413c","productID":"301a","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"007","vendorID":"0403","productID":"6001","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"006","vendorID":"1286","productID":"2045","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"005","vendorID":"413c","productID":"81ba","detail":"Dell Computer Corp"}],"type":null,"status":"ACTIVE","createTime":1591877276910,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","imgUrl":null,"agentDetail":{"architecture":"ARM64","agentVersion":"v0.5","cpuPercentUsage":1.53638264728,"memoryPercentUsage":0.761168301,"memoryUsage":14241792,"storagePercentUsage":30.598756,"storageUsage":67965644500}},{"id":"5ee21e9c02743900e7d446d7","name":"Dell Edge Gateway 5000","deployedServices":["Machine Learning"],"model":"Dell Edge Gateway 5000","os":"Ubuntu 16","processor":{"coresNumber":2,"frequency":1.74,"processorType":"x86_64","model":"Intel(R) Atom(TM) CPU  E3827  @ 1.74GHz"},"memory":"2G","memoryCapacity":2,"memoryCurrent":0,"storage":"32GB Solid State Hard Drive (m .2 SATA form factor) 1.8 inch","storageCapacity":32,"storageCurrent":0,"wireless":"Wireless 802.11n LAN LBEE5ZZ1E N Radio Label","portsAndSlots":{"Micro SD port":1,"DSI display port":1,"Composite video port":1,"CSI camera port":1},"pciDetails":[{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register","bdf":"0000:00:00:0","pciclass":"Bridge"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series Graphics & Display","bdf":"0000:00:02:0","pciclass":"Display Controller"},{"vendor":"Intel Corporation","name":"Atom Processor E3800 Series SATA AHCI Controller","bdf":"0000:00:13:0","pciclass":"Mass Storage Controller"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx,Celeron N2000 Series USB xHCI","bdf":"0000:00:14:0","pciclass":"Serial Bus Controller"}],"usbDetails":[{"busNumber":"001","deviceNumber":"003","vendorID":"413c","productID":"301a","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"007","vendorID":"0403","productID":"6001","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"006","vendorID":"1286","productID":"2045","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"005","vendorID":"413c","productID":"81ba","detail":"Dell Computer Corp"}],"type":null,"status":"ACTIVE","createTime":1591877276908,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","imgUrl":null,"agentDetail":{"architecture":"ARM64","agentVersion":"v0.5","cpuPercentUsage":1.53638264728,"memoryPercentUsage":0.761168301,"memoryUsage":14241792,"storagePercentUsage":30.598756,"storageUsage":67965644500}},{"id":"5ee21e9c02743900e7d446d6","name":"Dell Edge Gateway 5000","deployedServices":["Machine Learning"],"model":"Dell Edge Gateway 5000","os":"Ubuntu 16","processor":{"coresNumber":2,"frequency":1.74,"processorType":"x86_64","model":"Intel(R) Atom(TM) CPU  E3827  @ 1.74GHz"},"memory":"2G","memoryCapacity":2,"memoryCurrent":0,"storage":"32GB Solid State Hard Drive (m .2 SATA form factor) 1.8 inch","storageCapacity":32,"storageCurrent":0,"wireless":"Wireless 802.11n LAN LBEE5ZZ1E N Radio Label","portsAndSlots":{"Micro SD port":1,"DSI display port":1,"Composite video port":1,"CSI camera port":1},"pciDetails":[{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register","bdf":"0000:00:00:0","pciclass":"Bridge"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series Graphics & Display","bdf":"0000:00:02:0","pciclass":"Display Controller"},{"vendor":"Intel Corporation","name":"Atom Processor E3800 Series SATA AHCI Controller","bdf":"0000:00:13:0","pciclass":"Mass Storage Controller"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx,Celeron N2000 Series USB xHCI","bdf":"0000:00:14:0","pciclass":"Serial Bus Controller"}],"usbDetails":[{"busNumber":"001","deviceNumber":"003","vendorID":"413c","productID":"301a","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"007","vendorID":"0403","productID":"6001","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"006","vendorID":"1286","productID":"2045","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"005","vendorID":"413c","productID":"81ba","detail":"Dell Computer Corp"}],"type":null,"status":"ACTIVE","createTime":1591877276906,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","imgUrl":null,"agentDetail":{"architecture":"ARM64","agentVersion":"v0.5","cpuPercentUsage":1.53638264728,"memoryPercentUsage":0.761168301,"memoryUsage":14241792,"storagePercentUsage":30.598756,"storageUsage":67965644500}},{"id":"5ee21e9c02743900e7d446d5","name":"Dell Edge Gateway 5000","deployedServices":["Machine Learning"],"model":"Dell Edge Gateway 5000","os":"Ubuntu 16","processor":{"coresNumber":2,"frequency":1.74,"processorType":"x86_64","model":"Intel(R) Atom(TM) CPU  E3827  @ 1.74GHz"},"memory":"2G","memoryCapacity":2,"memoryCurrent":0,"storage":"32GB Solid State Hard Drive (m .2 SATA form factor) 1.8 inch","storageCapacity":32,"storageCurrent":0,"wireless":"Wireless 802.11n LAN LBEE5ZZ1E N Radio Label","portsAndSlots":{"Micro SD port":1,"DSI display port":1,"Composite video port":1,"CSI camera port":1},"pciDetails":[{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register","bdf":"0000:00:00:0","pciclass":"Bridge"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series Graphics & Display","bdf":"0000:00:02:0","pciclass":"Display Controller"},{"vendor":"Intel Corporation","name":"Atom Processor E3800 Series SATA AHCI Controller","bdf":"0000:00:13:0","pciclass":"Mass Storage Controller"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx,Celeron N2000 Series USB xHCI","bdf":"0000:00:14:0","pciclass":"Serial Bus Controller"}],"usbDetails":[{"busNumber":"001","deviceNumber":"003","vendorID":"413c","productID":"301a","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"007","vendorID":"0403","productID":"6001","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"006","vendorID":"1286","productID":"2045","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"005","vendorID":"413c","productID":"81ba","detail":"Dell Computer Corp"}],"type":null,"status":"ACTIVE","createTime":1591877276902,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","imgUrl":null,"agentDetail":{"architecture":"ARM64","agentVersion":"v0.5","cpuPercentUsage":1.53638264728,"memoryPercentUsage":0.761168301,"memoryUsage":14241792,"storagePercentUsage":30.598756,"storageUsage":67965644500}},{"id":"5ee21e9c02743900e7d446d4","name":"Dell Edge Gateway 5000","deployedServices":["Machine Learning"],"model":"Dell Edge Gateway 5000","os":"Ubuntu 16","processor":{"coresNumber":2,"frequency":1.74,"processorType":"x86_64","model":"Intel(R) Atom(TM) CPU  E3827  @ 1.74GHz"},"memory":"2G","memoryCapacity":2,"memoryCurrent":0,"storage":"32GB Solid State Hard Drive (m .2 SATA form factor) 1.8 inch","storageCapacity":32,"storageCurrent":0,"wireless":"Wireless 802.11n LAN LBEE5ZZ1E N Radio Label","portsAndSlots":{"Micro SD port":1,"DSI display port":1,"Composite video port":1,"CSI camera port":1},"pciDetails":[{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register","bdf":"0000:00:00:0","pciclass":"Bridge"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx Series Graphics & Display","bdf":"0000:00:02:0","pciclass":"Display Controller"},{"vendor":"Intel Corporation","name":"Atom Processor E3800 Series SATA AHCI Controller","bdf":"0000:00:13:0","pciclass":"Mass Storage Controller"},{"vendor":"Intel Corporation","name":"Atom Processor Z36xxx/Z37xxx,Celeron N2000 Series USB xHCI","bdf":"0000:00:14:0","pciclass":"Serial Bus Controller"}],"usbDetails":[{"busNumber":"001","deviceNumber":"003","vendorID":"413c","productID":"301a","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"007","vendorID":"0403","productID":"6001","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"006","vendorID":"1286","productID":"2045","detail":"Dell Computer Corp"},{"busNumber":"001","deviceNumber":"005","vendorID":"413c","productID":"81ba","detail":"Dell Computer Corp"}],"type":null,"status":"ACTIVE","createTime":1591877276899,"updateTime":0,"userId":"5d47ee5c3574a90007cb93e1","userName":"Jerry","imgUrl":null,"agentDetail":{"architecture":"ARM64","agentVersion":"v0.5","cpuPercentUsage":1.53638264728,"memoryPercentUsage":0.761168301,"memoryUsage":14241792,"storagePercentUsage":30.598756,"storageUsage":67965644500}}],"pageable":{"sort":{"sorted":true,"unsorted":false,"empty":false},"pageSize":10,"pageNumber":0,"offset":0,"paged":true,"unpaged":false},"totalPages":1,"totalElements":10,"last":true,"first":true,"sort":{"sorted":true,"unsorted":false,"empty":false},"numberOfElements":10,"size":10,"number":0,"empty":false}

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentresource/pagenumber/1/pagesize/10' -i -X GET

Response Fields

Path Type Description

content.[]

Array

An array of deploymentResource

pageable

Object

pageable parameters

last

Boolean

Whether the current page is the last one.

totalPages

Number

totalPages

totalElements

Number

totalElements

number

Number

number

size

Number

size

sort

Object

sort parameters

numberOfElements

Number

numberOfElements

first

Boolean

Whether the current page is the first one.

empty

Boolean

empty

content.[].id

String

ID of the deploymentResource, created by EAMT.

content.[].name

String

The name of the deploymentResource

content.[].deployedServices

Array

Service name list deployed on this device.

content.[].model

String

Device model.

content.[].os

String

Operation system info in this device

content.[].processor

Object

CPU info in this device.

content.[].processor.coresNumber

Number

CPU info coresNumber in this device.

content.[].processor.frequency

Number

CPU info frequency in this device.

content.[].processor.processorType

String

CPU info processorType in this device.

content.[].processor.model

String

CPU info model in this device.

content.[].memory

String

Memory description in this device.

content.[].memoryCapacity

Number

Memory capacity in this device.

content.[].memoryCurrent

Number

Memory current usage in this device.

content.[].storage

String

Hard disk storage info in this device.

content.[].storageCapacity

Number

Hard disk storage capacity in this device.

content.[].storageCurrent

Number

Hard disk current usage in this device.

content.[].wireless

String

Wireless info in this device.

content.[].portsAndSlots

Object

Ports and Slots info in this device.

content.[].pciDetails.[]

Array

PciDetails info in this device.

content.[].usbDetails.[]

Array

UsbDetails info in this device.

content.[].type

String

Device Type(reserved field).

content.[].status

String

Device status

content.[].createTime

Number

When this deploymentResource was created

content.[].updateTime

Number

Last update time.

content.[].userId

String

User Id who create this deploymentResource.

content.[].userName

String

User name who create this deploymentResource.

content.[].imgUrl

String

Thumbnails of this device.

content.[].agentDetail

Object

Agent information.

content.[].agentDetail.architecture

String

The device architecture, X86_64 or ARM64.

content.[].agentDetail.agentVersion

String

The agent version.

content.[].agentDetail.cpuPercentUsage

Number

The CPU usage of the agent.

content.[].agentDetail.memoryPercentUsage

Number

The memory usage of the agent.

content.[].agentDetail.memoryUsage

Number

The agent memory usage of this device.

content.[].agentDetail.storagePercentUsage

Number

The agent storage usage percent of this device.

content.[].agentDetail.storageUsage

Number

The agent storage usage of this device.

content.[].pciDetails.[].bdf

String

BDF

content.[].pciDetails.[].pciclass

String

PCIClass

content.[].pciDetails.[].vendor

String

vendor

content.[].pciDetails.[].name

String

name

content.[].usbDetails.[].busNumber

String

busNumber

content.[].usbDetails.[].deviceNumber

String

deviceNumber

content.[].usbDetails.[].vendorID

String

vendorID

content.[].usbDetails.[].productID

String

productID

content.[].usbDetails.[].detail

String

detail

pageable.sort.unsorted

Boolean

unsorted

pageable.sort.sorted

Boolean

sorted

pageable.sort.empty

Boolean

empty

pageable.offset

Number

offset

pageable.pageSize

Number

pageSize

pageable.pageNumber

Number

pageNumber

pageable.paged

Boolean

paged

pageable.unpaged

Boolean

unpaged

sort.unsorted

Boolean

unsorted

sort.sorted

Boolean

sorted

sort.empty

Boolean

empty

updateDeploymentResource

A PUT request is used to update a DeploymentResource.

URL

/api/v1/deploymentresource

Request structure

PUT /api/v1/deploymentresource HTTP/1.1
Content-Length: 417
Content-Type: application/json
Host: localhost:8080

{"id":"5ee21e9d02743900e7d446de","name":"NewEdgeDevice","deployedServices":null,"model":null,"os":null,"processor":null,"memory":null,"memoryCapacity":0,"memoryCurrent":0,"storage":null,"storageCapacity":0,"storageCurrent":0,"wireless":null,"portsAndSlots":null,"pciDetails":null,"usbDetails":null,"type":null,"status":null,"createTime":0,"updateTime":0,"userId":null,"userName":null,"imgUrl":null,"agentDetail":null}

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentresource' -i -X PUT \
    -H 'Content-Type: application/json' \
    -d '{"id":"5ee21e9d02743900e7d446de","name":"NewEdgeDevice","deployedServices":null,"model":null,"os":null,"processor":null,"memory":null,"memoryCapacity":0,"memoryCurrent":0,"storage":null,"storageCapacity":0,"storageCurrent":0,"wireless":null,"portsAndSlots":null,"pciDetails":null,"usbDetails":null,"type":null,"status":null,"createTime":0,"updateTime":0,"userId":null,"userName":null,"imgUrl":null,"agentDetail":null}'

removeDeploymentResource

A DELETE request is used to delete a deploymentResource.

URL

/api/v1/deploymentresource/{id}

Request structure

DELETE /api/v1/deploymentresource/5ee21e9d02743900e7d446e0 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3NywiaWF0IjoxNTkxODc3Mjc3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.IZoYf9Jt9e6vRJASHQyp1yN-0uSncdpPgXocDCTaB4s
Host: localhost:8080

Example response

HTTP/1.1 200 OK

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentresource/5ee21e9d02743900e7d446e0' -i -X DELETE \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3NywiaWF0IjoxNTkxODc3Mjc3LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.IZoYf9Jt9e6vRJASHQyp1yN-0uSncdpPgXocDCTaB4s'

agentUpgrade

A POST request is used to upgrade a deploymentResource agent.

URL

/api/v1/deploymentresource/{id}/upgrade

Request structure

POST /api/v1/deploymentresource/5cfdc1ee287434205f734b70/upgrade HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 24

5ee21e9d02743900e7d446df

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentresource/5cfdc1ee287434205f734b70/upgrade' -i -X POST

createDeploymentResourceStats

A POST request is used to create a deploymentResourceStats.

URL

/api/v1/deploymentresource/stats

Request structure

POST /api/v1/deploymentresource/stats HTTP/1.1
Content-Length: 163
Content-Type: application/json
Host: localhost:8080

{"deviceId":"5d2eea46fedc6e48084b727f","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000}

Request Fields

Path Type Description

deviceId

String

The Id of device which generates stats data.

cpuPercentUsage

Number

The CPU percent usage in the device.

memoryPercentUsage

Number

The memory percent usage in the device.

memoryUsage

Number

The memory usage,units is bytes

storagePercentUsage

Number

The hard disk percent storage in the device.

storageUsage

Number

The hard disk storage in the device,units is bytes

Example response

HTTP/1.1 201 Created
Location: http://localhost:8080/api/v1/deploymentresource/5ee21e9c02743900e7d446d3

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentresource/stats' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '{"deviceId":"5d2eea46fedc6e48084b727f","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000}'

getStatsByDeviceIdWithPage

A GET request is used to access the DeploymentResourceStats read.

URL

/api/v1/deploymentresource/stats/{deviceid}/pagenumber/{pagenumber}/pagesize/{pagesize}

Request structure

GET /api/v1/deploymentresource/stats/5cfdc1ee287434205f734b70/pagenumber/1/pagesize/10 HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 2429
Content-Type: application/json;charset=UTF-8

{"content":[{"id":"5ee21e9c02743900e7d446c9","deviceId":"5cfdc1ee287434205f734b70","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000,"createTime":0},{"id":"5ee21e9c02743900e7d446ca","deviceId":"5cfdc1ee287434205f734b70","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000,"createTime":0},{"id":"5ee21e9c02743900e7d446cb","deviceId":"5cfdc1ee287434205f734b70","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000,"createTime":0},{"id":"5ee21e9c02743900e7d446cc","deviceId":"5cfdc1ee287434205f734b70","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000,"createTime":0},{"id":"5ee21e9c02743900e7d446cd","deviceId":"5cfdc1ee287434205f734b70","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000,"createTime":0},{"id":"5ee21e9c02743900e7d446ce","deviceId":"5cfdc1ee287434205f734b70","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000,"createTime":0},{"id":"5ee21e9c02743900e7d446cf","deviceId":"5cfdc1ee287434205f734b70","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000,"createTime":0},{"id":"5ee21e9c02743900e7d446d0","deviceId":"5cfdc1ee287434205f734b70","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000,"createTime":0},{"id":"5ee21e9c02743900e7d446d1","deviceId":"5cfdc1ee287434205f734b70","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000,"createTime":0},{"id":"5ee21e9c02743900e7d446d2","deviceId":"5cfdc1ee287434205f734b70","cpuPercentUsage":0.45,"memoryPercentUsage":0.21,"memoryUsage":1024000,"storagePercentUsage":0.01,"storageUsage":1024000000,"createTime":0}],"pageable":{"sort":{"sorted":true,"unsorted":false,"empty":false},"pageSize":10,"pageNumber":0,"offset":0,"paged":true,"unpaged":false},"totalPages":1,"totalElements":10,"last":true,"first":true,"sort":{"sorted":true,"unsorted":false,"empty":false},"numberOfElements":10,"size":10,"number":0,"empty":false}

CURL request

$ curl 'http://localhost:8080/api/v1/deploymentresource/stats/5cfdc1ee287434205f734b70/pagenumber/1/pagesize/10' -i -X GET

Response Fields

Path Type Description

content.[]

Array

An array of deploymentResourceStats

pageable

Object

pageable parameters

last

Boolean

Whether the current page is the last one.

totalPages

Number

totalPages

totalElements

Number

totalElements

number

Number

number

size

Number

size

sort

Object

sort parameters

numberOfElements

Number

numberOfElements

first

Boolean

Whether the current page is the first one.

empty

Boolean

empty

content.[].deviceId

String

The Id of device which generates stats data.

content.[].cpuPercentUsage

Number

The CPU percent usage in the device.

content.[].memoryPercentUsage

Number

The memory percent usage in the device.

content.[].memoryUsage

Number

The memory usage,units is bytes

content.[].storagePercentUsage

Number

The hard disk percent storage in the device.

content.[].storageUsage

Number

The hard disk storage in the device,units is bytes

pageable.sort.unsorted

Boolean

unsorted

pageable.sort.sorted

Boolean

sorted

pageable.sort.empty

Boolean

empty

pageable.offset

Number

offset

pageable.pageSize

Number

pageSize

pageable.pageNumber

Number

pageNumber

pageable.paged

Boolean

paged

pageable.unpaged

Boolean

unpaged

sort.unsorted

Boolean

unsorted

sort.sorted

Boolean

sorted

sort.empty

Boolean

empty

/api/v1/messagetopic

Provides operations on DeploymentResource.

getMessageTopicByDeviceID

A GET request is used to access the DeploymentResourceTopic read.

URL

/api/v1/messagetopic/deviceid/{deviceid}

Request structure

GET /api/v1/messagetopic/deviceid/5cfdc1ee287434205f734b70 HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 229
Content-Type: application/json;charset=UTF-8

{"id":"5ee21ea002743900e7d446e6","deviceId":"5cfdc1ee287434205f734b70","userName":"Jerry","inboundTopic":"Jerry/5cfdc1ee287434205f734b70inbound","outboundTopic":"Jerry/5cfdc1ee287434205f734b70outbound","createTime":1591877280921}

CURL request

$ curl 'http://localhost:8080/api/v1/messagetopic/deviceid/5cfdc1ee287434205f734b70' -i -X GET

Response Fields

Path Type Description

id

String

Id of deploymentResourceTopic,created by EAMT.

deviceId

String

Device Id which associated with message topics.

userName

String

User name who created the deploymentResourceTopic.

inboundTopic

String

Inbound topic used to communicate with EAMT.

outboundTopic

String

Inbound topic used to communicate with EAMT.

createTime

Number

When this deploymentResourceTopic is created,in Millisecond.

getAllWithPage

A GET request is used to access the DeploymentResourceTopic read.

URL

/api/v1/messagetopic/pagenumber/{pagenumber}/pagesize/{pagesize}

Request structure

GET /api/v1/messagetopic/pagenumber/0/pagesize/10 HTTP/1.1
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 2619
Content-Type: application/json;charset=UTF-8

{"content":[{"id":"5ee21ea002743900e7d446e7","deviceId":"5cfdc1ee287434205f734b70","userName":"Jerry","inboundTopic":"Jerry/5cfdc1ee287434205f734b70inbound","outboundTopic":"Jerry/5cfdc1ee287434205f734b70outbound","createTime":1591877280957},{"id":"5ee21ea002743900e7d446e8","deviceId":"5cfdc1ee287434205f734b70","userName":"Jerry","inboundTopic":"Jerry/5cfdc1ee287434205f734b70inbound","outboundTopic":"Jerry/5cfdc1ee287434205f734b70outbound","createTime":1591877280959},{"id":"5ee21ea002743900e7d446e9","deviceId":"5cfdc1ee287434205f734b70","userName":"Jerry","inboundTopic":"Jerry/5cfdc1ee287434205f734b70inbound","outboundTopic":"Jerry/5cfdc1ee287434205f734b70outbound","createTime":1591877280961},{"id":"5ee21ea002743900e7d446ea","deviceId":"5cfdc1ee287434205f734b70","userName":"Jerry","inboundTopic":"Jerry/5cfdc1ee287434205f734b70inbound","outboundTopic":"Jerry/5cfdc1ee287434205f734b70outbound","createTime":1591877280963},{"id":"5ee21ea002743900e7d446eb","deviceId":"5cfdc1ee287434205f734b70","userName":"Jerry","inboundTopic":"Jerry/5cfdc1ee287434205f734b70inbound","outboundTopic":"Jerry/5cfdc1ee287434205f734b70outbound","createTime":1591877280964},{"id":"5ee21ea002743900e7d446ec","deviceId":"5cfdc1ee287434205f734b70","userName":"Jerry","inboundTopic":"Jerry/5cfdc1ee287434205f734b70inbound","outboundTopic":"Jerry/5cfdc1ee287434205f734b70outbound","createTime":1591877280965},{"id":"5ee21ea002743900e7d446ed","deviceId":"5cfdc1ee287434205f734b70","userName":"Jerry","inboundTopic":"Jerry/5cfdc1ee287434205f734b70inbound","outboundTopic":"Jerry/5cfdc1ee287434205f734b70outbound","createTime":1591877280966},{"id":"5ee21ea002743900e7d446ee","deviceId":"5cfdc1ee287434205f734b70","userName":"Jerry","inboundTopic":"Jerry/5cfdc1ee287434205f734b70inbound","outboundTopic":"Jerry/5cfdc1ee287434205f734b70outbound","createTime":1591877280966},{"id":"5ee21ea002743900e7d446ef","deviceId":"5cfdc1ee287434205f734b70","userName":"Jerry","inboundTopic":"Jerry/5cfdc1ee287434205f734b70inbound","outboundTopic":"Jerry/5cfdc1ee287434205f734b70outbound","createTime":1591877280967},{"id":"5ee21ea002743900e7d446f0","deviceId":"5cfdc1ee287434205f734b70","userName":"Jerry","inboundTopic":"Jerry/5cfdc1ee287434205f734b70inbound","outboundTopic":"Jerry/5cfdc1ee287434205f734b70outbound","createTime":1591877280968}],"pageable":{"sort":{"sorted":true,"unsorted":false,"empty":false},"pageSize":10,"pageNumber":0,"offset":0,"paged":true,"unpaged":false},"totalPages":1,"totalElements":10,"last":true,"first":true,"sort":{"sorted":true,"unsorted":false,"empty":false},"numberOfElements":10,"size":10,"number":0,"empty":false}

CURL request

$ curl 'http://localhost:8080/api/v1/messagetopic/pagenumber/0/pagesize/10' -i -X GET

Response Fields

Path Type Description

content.[]

Array

An array of deploymentResourceTopic

pageable

Object

pageable parameters

last

Boolean

last

totalPages

Number

totalPages

totalElements

Number

totalElements

number

Number

number

size

Number

size

sort

Object

sort parameters

numberOfElements

Number

numberOfElements

first

Boolean

first

empty

Boolean

empty

content.[].id

String

Id of deploymentResourceTopic,created by EAMT.

content.[].deviceId

String

Device Id which associated with message topics.

content.[].userName

String

User name who created the deploymentResourceTopic.

content.[].inboundTopic

String

Inbound topic used to communicate with EAMT.

content.[].outboundTopic

String

Inbound topic used to communicate with EAMT.

content.[].createTime

Number

When this deploymentResourceTopic is created,in Millisecond.

pageable.sort.unsorted

Boolean

unsorted

pageable.sort.sorted

Boolean

sorted

pageable.sort.empty

Boolean

empty

pageable.offset

Number

offset

pageable.pageSize

Number

pageSize

pageable.pageNumber

Number

pageNumber

pageable.paged

Boolean

paged

pageable.unpaged

Boolean

unpaged

sort.unsorted

Boolean

unsorted

sort.sorted

Boolean

sorted

sort.empty

Boolean

empty

/api/v1/deviceregistry

edge device register to EAMT.

device registration

A POST request is used to register device to EAMT.

URL

/api/v1/deviceregistry

Request structure

POST /api/v1/deviceregistry HTTP/1.1
Content-Type: application/json
Content-Length: 19
Host: localhost:8080

{"name":"MXC-2300"}

Request Fields

Path Type Description

name

String

The name of the deploymentResource

Example response

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 24

5ee21ea102743900e7d446f3

CURL request

$ curl 'http://localhost:8080/api/v1/deviceregistry' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '{"name":"MXC-2300"}'

/api/v1/task

Tasks in EAMT.

getTaskById

A GET request is used to query a task by task id.

URL

/api/v1/task/{id}

Request structure

GET /api/v1/task/5ee21e9f02743900e7d446e4 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3OSwiaWF0IjoxNTkxODc3Mjc5LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.NRlw1WoyRM4mRyVycbxbgOSXs-0qZUTFusHjfpEQHqA
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Length: 170
Content-Type: application/json;charset=UTF-8

{"id":"5ee21e9f02743900e7d446e4","name":"example_task_name","percentage":0,"status":"CREATED","owner":"Jerry","message":"task_message_test","createTime":0,"context":null}

CURL request

$ curl 'http://localhost:8080/api/v1/task/5ee21e9f02743900e7d446e4' -i -X GET \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKZXJyeSIsImlzcyI6Ik5lYnVsYSIsImV4cCI6MTU5MTg4NDQ3OSwiaWF0IjoxNTkxODc3Mjc5LCJ1c2VySWQiOiI1ZDQ3ZWU1YzM1NzRhOTAwMDdjYjkzZTEifQ.NRlw1WoyRM4mRyVycbxbgOSXs-0qZUTFusHjfpEQHqA'

Response Fields

Path Type Description

id

String

The id of the task.

name

String

The name of the task.

percentage

Number

The percentage of the task.

status

String

The status of the task.

context

Null

The context of the task.

owner

String

The person to whom this task belongs.

message

String

The task message content.

createTime

Number

When this version is created, in millisecond.