Skip to content
Svyatoslav Reyentenko edited this page Jan 21, 2013 · 1 revision

Environments

Path: /projects/1/envs/1
Method: GET

User that can only view environment:

{

      "id" : 1
      ....
      "links" : [
          {"href": "/projects/1/envs/1", "rel": "self", "type":"application/vnd.griddynamics.genesis.EnvironmentDetails+json"}
          {"href": "/projects/1/envs/1/history", "rel":"collection", "type":"application/vnd.griddynamics.genesis.WorkflowHistory"}
      ]
}

User that can modify environment:

{

      "id" : 1
      ....
      "links" : [
          {"href": "/projects/1/envs/1", "rel": "self", "methods": ["get","put","delete"], "type":"application/vnd.griddynamics.genesis.EnvironmentDetails+json"}
          {"href": "/projects/1/envs/1/history", "rel":"collection", "type":"application/vnd.griddynamics.genesis.WorkflowHistory"}
          {"href": "/projects/1/envs/1/actions", "rel":"collection",  "methods" : ["post"]}
      ]
}

Most probably, actions attribute of EnvironmentDetails object should be separated in its own REST resource for better consistency.

Probably that servers and vms elements of EvironmentDetails also deserves its own rest calls.

Clone this wiki locally