Skip to content
Svyatoslav Reyentenko edited this page Jan 21, 2013 · 3 revisions

Projects request

Path: /rest/projects

Method: GET

Example request:

GET /rest/projects
  • As a user that can create new projects:
{
    "items" : [
        {
            "isDeleted" : false,
            "creator" : "genesis",
            "creationTime" : 1358762290469,
            "name" : "foo",
            "id" : 1,
            "description" : "",
            "projectManager" : "bar",
            "links" : [
                { 
                    "href" : "/rest/projects/1",
                    "rel":"self",
                    "type":"application/vnd.griddynamics.genesis.Project+json"
                }
            ]
        }
    ],
    "links" : [
        {
            "href" : "/rest/projects",
            "rel" : "self",
            "type":"application/vnd.griddynamics.genesis.Project+json",
            "methods": ["get", "post"]
        }
    ]
}
  • As a user that can not create new projects:
{
    "items" : [
        {
            "isDeleted" : false,
            "creator" : "genesis",
            "creationTime" : 1358762290469,
            "name" : "foo",
            "id" : 1,
            "description" : "",
            "projectManager" : "bar",
            "links" : [
                { 
                    "href" : "/rest/projects/1",
                    "rel":"self",
                    "type":"application/vnd.griddynamics.genesis.Project+json"
                }
            ]
        }
    ],
    "links" : [
        {
            "href" : "/rest/projects",
            "rel" : "self",
            "type":"application/vnd.griddynamics.genesis.Project+json"
        }
    ]
}

Project request

Path: /rest/projects/(id)

Method: GET

Parameter: id - project id

Example

GET /rest/projects/1
  • User has permissions to modify project and list and create environments in it
{
   "isDeleted" : false,
   "creator" : "genesis",
   "creationTime" : 1358762290469,
   "name" : "foo",
   "id" : 1,
   "description" : "",
   "projectManager" : "bar",
   "links" : [
        {"href" : "/ptojects/1/envs", "rel" : "collection", "methods" : ["get","post"], "type" : "application/vnd.griddynamics.genesis.Environment+json"},
        {"href": "/project/1/settings", "rel" : "collection", "type" : "application/vnd.griddynamics.genesis.Link+json"},
        {"href": "/projects/1", "rel" : "self", "methods" : ["get","put","delete"]}
   ]
}
  • User cannot modify project, but can read settings and list and create environments in it:
{
   "isDeleted" : false,
   "creator" : "genesis",
   "creationTime" : 1358762290469,
   "name" : "foo",
   "id" : 1,
   "description" : "",
   "projectManager" : "bar",
   "links" : [
        {"href" : "/ptojects/1/envs", "rel" : "collection", "methods" : ["get","post"], "type" : "application/vnd.griddynamics.genesis.Environment+json"},
        {"href": "/project/1/settings", "rel" : "collection", "type" : "application/vnd.griddynamics.genesis.Link+json"},
        {"href": "/projects/1", "rel" : "self"}
   ]
}
  • User can list and create environments in project:
{
   "isDeleted" : false,
   "creator" : "genesis",
   "creationTime" : 1358762290469,
   "name" : "foo",
   "id" : 1,
   "description" : "",
   "projectManager" : "bar",
   "links" : [
        {"href" : "/ptojects/1/envs", "rel" : "collection", "methods" : ["get","post"], "type" : "application/vnd.griddynamics.genesis.Environment+json"},
        {"href": "/projects/1", "rel" : "self"}
   ]
}
  • User can only list environments in project:
{
   "isDeleted" : false,
   "creator" : "genesis",
   "creationTime" : 1358762290469,
   "name" : "foo",
   "id" : 1,
   "description" : "",
   "projectManager" : "bar",
   "links" : [
        {"href" : "/ptojects/1/envs", "rel" : "collection", "type" : "application/vnd.griddynamics.genesis.Environment+json"},
        {"href": "/projects/1", "rel" : "self"}
   ]
}
Clone this wiki locally