Skip to content

REST: Settings and build related api

Svyatoslav Reyentenko edited this page Feb 5, 2013 · 19 revisions

List settings

Path: /rest/settings

Type: GET

Request parameters

Parameter Type Description
prefix String Prefix of the setting key name, starts with genesis.system for system settings and genesis.plugin for plugins

Example

Request:

GET http://localhost:8080/rest/settings?prefix=genesis.system.beat.period.ms

Response body:

{
   "links" : [
      {
         "rel" : "self",
         "href" : "http://localhost:8081/rest/settings",
         "methods" : [
            "get",
            "put"
         ],
         "type" : "application/vnd.griddynamics.genesis.ConfigProperty+json"
      }
   ],
   "items" : [
      {
         "restartRequired" : true,
         "value" : "1000",
         "name" : "genesis.system.beat.period.ms",
         "propertyType" : {
            "name" : "text"
         },
         "description" : "Workflow execution actors heartbeats period in milliseconds",
         "readOnly" : false
      }
   ]
}

Update setting

Path: /rest/settings/(key)

Type: PUT

Request body: consists form a single JSON map contains the following entries:

Entry name Type Mandatory Description
value String Y New value of the setting

Example:

Request

PUT http://localhost:8080/rest/settings/genesis.plugin.jclouds.credential

Request body:

{"value":"cred"}

Response body:

    {
     "serviceErrors":{},
     "variablesErrors":{},
     "compoundServiceErrors":[],
     "compoundVariablesErrors":[],
     "isSuccess":true,
     "isNotFound":false
    }

Since 1.3: multiple settings update in a single request

Path: /rest/settings

Type: PUT

Request body: consists from a single JSON map with one entry for each changed setting(may set several properties at once):

Entry name Type Mandatory Description
property(setting) name String Y New value of the setting

Example:

Request

PUT http://localhost:8080/rest/settings

Request body:

{"genesis.plugin.jclouds.credential":"cred", "genesis.plugin.jclouds.provider" : "gdnova"}

Response body:

    {
     "serviceErrors":{},
     "variablesErrors":{},
     "compoundServiceErrors":[],
     "compoundVariablesErrors":[],
     "isSuccess":true,
     "isNotFound":false
    }

Return all changed settings to default values:

Path: /rest/settings

Type: DELETE

Request parameters

Parameter Type Description
prefix String Prefix of the setting key name, starts with genesis.system for system settings and genesis.plugin for plugins

Example:

Request

DELETE http://localhost:8080/rest/settings?prefix=genesis.plugin.jclouds.credential

Response body:

   {
    "serviceErrors":{},
    "variablesErrors":{},
    "compoundServiceErrors":[],
    "compoundVariablesErrors":[],
    "isSuccess":true,
    "isNotFound":false
   }

Build information discovery

Information about genesis distribution package

Path: /core-details.json

Type: GET

Example response:

{
    "build": {
        "time": "05.02.2013 @ 00:14:31 MSK",
        "version": "2.0.0-SNAPSHOT"
    },
    "revision": {
        "short": "5ffa1c1",
        "long": "5ffa1c1d58b12bcfb1efea271455cfecf26d5582",
        "time": "04.02.2013 @ 15:55:12 MSK",
        "branch": "5ffa1c1d58b12bcfb1efea271455cfecf26d5582"
    }
}
Clone this wiki locally