Resource: Script Runs ( /api/scriptruns )

Script Runs collection resource.

Root Relation: ScriptRuns

This resource supports the following methods: GET

Methods

GET


Retrieves all (or a subset) of script runs that are visible to the user.

This method supports the TQL query parameters tql, $top, $take and $inlinecount. See TQL Topic for more details.

Required Permissions

  • TestManagement/View

Supported Expansions

For more details on expansions, please see the Expand help topic.

Status Codes

These are the expected status codes returned by the service - in addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

StatusDescription
200 - OKReturned if the request was completed successfully.
403 - ForbiddenReturned if ET would not complete request (normally due to a validation failure or you don't have the necessary permissions to complete the request).

Example - GET (filtered by TQL Query)

Retrieves script runs matching a TQL query.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
tqlStatus = PassedThe TQL query to execute.
$top5The maximum number of results to return (defaults to 25).
$skip0The number of results to skip before return the $top number of results matching the query.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Skip": 0,
  "Top": 5,
  "Total": 1,
  "Items": [
    {
      "Id": "4070df37-8cbb-409e-9517-978f48c1caec",
      "ActualDuration": "",
      "ScriptId": "90279aec-42e9-4b6a-8587-1635791af670",
      "ScriptVersion": 2,
      "AssignmentId": "f7b2ffbb-4634-4c26-ba12-a14d00851374",
      "CreatedAt": "2013-02-23T21:45:00Z",
      "LastUpdatedAt": "2013-02-23T22:30:00Z",
      "CreatedById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "CreatedBy": "joeb",
      "RunById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "RunBy": "joeb",
      "LastUpdatedById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "LastUpdatedBy": "joeb",
      "Status": "Passed",
      "Expands": [
        "Assignment",
        "FieldControls",
        "FieldValues",
        "StepResults"
      ],
      "Self": "http://localhost/api/scriptrun/4070df37-8cbb-409e-9517-978f48c1caec"
    }
  ],
  "Self": "http://localhost/api/api/scriptruns?tql=Status=Passed"
}

Status Code

200 - OK

Example - GET (no filter)

Retrieves all script runs

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
$top5The maximum number of results to return (defaults to 25).
$skip0The number of results to skip before return the $top number of results matching the query.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Skip": 0,
  "Top": 5,
  "Total": 2,
  "Items": [
    {
      "Id": "2cd6f2e7-df0d-4aa8-9e48-a14d00851623",
      "ActualDuration": "5 minutes",
      "ScriptId": "90279aec-42e9-4b6a-8587-1635791af670",
      "ScriptVersion": 1,
      "AssignmentId": "f7b2ffbb-4634-4c26-ba12-a14d00851374",
      "CreatedAt": "2013-02-18T21:45:00Z",
      "LastUpdatedAt": "2013-02-22T20:30:00Z",
      "CreatedById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "CreatedBy": "joeb",
      "RunById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "RunBy": "joeb",
      "LastUpdatedById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "LastUpdatedBy": "joeb",
      "Status": "Failed",
      "Expands": [
        "Assignment",
        "FieldControls",
        "FieldValues",
        "StepResults"
      ],
      "Self": "http://localhost/api/scriptrun/2cd6f2e7-df0d-4aa8-9e48-a14d00851623"
    },
    {
      "Id": "4070df37-8cbb-409e-9517-978f48c1caec",
      "ActualDuration": "",
      "ScriptId": "90279aec-42e9-4b6a-8587-1635791af670",
      "ScriptVersion": 2,
      "AssignmentId": "f7b2ffbb-4634-4c26-ba12-a14d00851374",
      "CreatedAt": "2013-02-23T21:45:00Z",
      "LastUpdatedAt": "2013-02-23T22:30:00Z",
      "CreatedById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "CreatedBy": "joeb",
      "RunById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "RunBy": "joeb",
      "LastUpdatedById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "LastUpdatedBy": "joeb",
      "Status": "Passed",
      "Expands": [
        "Assignment",
        "FieldControls",
        "FieldValues",
        "StepResults"
      ],
      "Self": "http://localhost/api/scriptrun/4070df37-8cbb-409e-9517-978f48c1caec"
    }
  ],
  "Self": "http://localhost/api/api/scriptruns"
}

Status Code

200 - OK

  • No labels