This site will undergo a maintenance outage on Saturday, 13 September beginning at 2:30 AM Central/1 PM IST for a platform upgrade. The downtime will be ~three hours.

REST v.2 phases


Phases enable steps to be categorized across multiple requests. Categories such as Approval, Setup, Deployment, and Clean Up could be applied to individual steps and used later as a grouping mechanism for reporting and analysis.

Note

This API command is supported only for version 5.0.03 and later.

GET /v2/phases

Returns phases that are not archived. 

Common attributes

  • format — Ensure to include an accept header or add .json to the last path element
  • token — Your API Token for authentication

Errors caused

  • ERROR 403 Forbidden — When the token is invalid
  • ERROR 404 Not Found — When no records are found

Examples

To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:

curl command input
curl -i -H "accept: application/json" -X GET http://[rails_host]/v2/phases?token=[api_token]
Sample output
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge,chrome=1
ETag: "9c0e0b919d404497d28a227f8eb9276c"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 82fb98703665f7355c78b64f6a50a690
X-Runtime: 0.015000
Date: Tue, 05 Dec 2017 14:07:34 GMT
X-Rack-Cache: miss
Vary: Origin
Referrer-Policy: origin-when-cross-origin
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: DENY
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked

{
  "data": [
      {
        "id": 4,
        "name": "Phase 4",
        "position": 3
      },
      {
        "id": 3,
        "name": "Phase 2",
        "position": 2
      },
      {
        "id": 2,
        "name": "Phase 1",
        "position": 1
      }
  ],
  "total_records": 0
}

GET /v2/phases/[phase_ID]/runtime_phases

Returns details of runtime phases for a specifed phase ID.

Common attributes

  • id—Numerical unique ID for phase
  • format—Ensure to include an accept header or add .json to the last path element
  • token—Your API Token for authentication

Errors caused

  • ERROR 403 Forbidden — When the token is invalid
  • ERROR 422 Unprocessable entity — When validation fails, objects and errors are returned

Examples

To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:

curl command input
curl -i -H "accept: application/json" -X GET http://[rails_host]/v2/phases/[phase_id]/runtime_phases?token=[api_token]
Sample output
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge,chrome=1
ETag: "74e130975b856ed578a43198d2922fbb"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: c86ecdcfa6e4ce2771d013c255266399
X-Runtime: 0.015000
Date: Fri, 08 Dec 2017 21:10:56 GMT
X-Rack-Cache: miss
Vary: Origin
Referrer-Policy: origin-when-cross-origin
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: DENY
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked

{
  "data": [
      {
        "id": 1,
        "name": "1",
        "position": 1
      }
  ],
  "total_records": 0
}

Related topics

REST-API-version-2

Using-REST-API

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*