Resource: Execution Packages ( /api/executionpackages )

Execution Packages collection resource

Root Relation: ExecutionPackages

Methods

GET


Retrieves all (or a subset) of execution packages that are visible.

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.

Example - GET (filtered by TQL Query)

Retrieves all packages matching a TQL query.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
tqlName ~ 'Report'The TQL query to execute.
$top5Maximum number of results to return (defaults to 25).
$skip0Number 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": "d009c056-6025-4a5e-a3b9-fc0fa8cf1f2e",
      "ProjectId": "944aa658-8067-42cf-a6a6-ce71535a73bc",
      "Name": "Reports",
      "Stereotype": "Package",
      "OrderNumber": 0,
      "Expands": [
        "Children",
        "Parent",
        "Project"
      ],
      "Self": "http://localhost/api/executionpackage/d009c056-6025-4a5e-a3b9-fc0fa8cf1f2e",
      "Links": [
        {
          "Href": "http://localhost/api/executionpackage/d009c056-6025-4a5e-a3b9-fc0fa8cf1f2e/children",
          "Rel": "Children"
        },
        {
          "Href": "http://localhost/api/project/944aa658-8067-42cf-a6a6-ce71535a73bc",
          "Rel": "Project"
        }
      ]
    }
  ],
  "Self": "http://localhost/api/api/executionpackages?tql=Name~'Report'&$top=5&$skip=0"
}

Status Code

200 - OK

Example - GET (no TQL query)

Retrieves all packages, across all projects.

Request Headers

KeyValueDescription
Acceptapplication/json

Response Headers

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

Response Body

{
  "Skip": 0,
  "Top": 25,
  "Total": 2,
  "Items": [
    {
      "Id": "d009c056-6025-4a5e-a3b9-fc0fa8cf1f2e",
      "ProjectId": "944aa658-8067-42cf-a6a6-ce71535a73bc",
      "Name": "Reports",
      "Stereotype": "Package",
      "OrderNumber": 0,
      "Expands": [
        "Children",
        "Parent",
        "Project"
      ],
      "Self": "http://localhost/api/executionpackage/d009c056-6025-4a5e-a3b9-fc0fa8cf1f2e",
      "Links": [
        {
          "Href": "http://localhost/api/executionpackage/d009c056-6025-4a5e-a3b9-fc0fa8cf1f2e/children",
          "Rel": "Children"
        },
        {
          "Href": "http://localhost/api/project/944aa658-8067-42cf-a6a6-ce71535a73bc",
          "Rel": "Project"
        }
      ]
    },
    {
      "Id": "7c8ffe51-c584-41d6-8739-8dbd56d5770f",
      "ProjectId": "944aa658-8067-42cf-a6a6-ce71535a73bc",
      "Name": "Data Import",
      "Stereotype": "Package",
      "OrderNumber": 0,
      "Expands": [
        "Children",
        "Parent",
        "Project"
      ],
      "Self": "http://localhost/api/executionpackage/7c8ffe51-c584-41d6-8739-8dbd56d5770f",
      "Links": [
        {
          "Href": "http://localhost/api/executionpackage/7c8ffe51-c584-41d6-8739-8dbd56d5770f/children",
          "Rel": "Children"
        },
        {
          "Href": "http://localhost/api/project/944aa658-8067-42cf-a6a6-ce71535a73bc",
          "Rel": "Project"
        }
      ]
    }
  ],
  "Self": "http://localhost/api/api/executionpackages"
}

Status Code

200 - OK

POST


Create a new execution package.

Required Permissions

  • TestManagement/ManageExecution

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
201 - CreatedReturned if the request was completed successfully.
403 - ForbiddenReturned if the user does not have permission to create execution packages in the target project.

Example - POST (top-level package)

Create a new package (at root of project).

Request Headers

KeyValueDescription
Acceptapplication/json

Request Body

{
  "Name": "New Package",
  "ProjectId": "4545fe95-e9c2-40e9-8f4a-3f000d14526f"
}

Response Headers

KeyValueDescription
Locationhttp://localhost/api/executionpackage/4bb709c2-e0e7-4af3-9f60-a045016a9610
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "ProjectId": "944aa658-8067-42cf-a6a6-ce71535a73bc",
  "Name": "New Package",
  "Stereotype": "Package",
  "OrderNumber": 0,
  "Expands": [
    "Children",
    "Parent",
    "Project"
  ],
  "Self": "http://localhost/api/executionpackage/4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "Links": [
    {
      "Href": "http://localhost/api/executionpackage/4bb709c2-e0e7-4af3-9f60-a045016a9610/children",
      "Rel": "Children"
    },
    {
      "Href": "http://localhost/api/project/944aa658-8067-42cf-a6a6-ce71535a73bc",
      "Rel": "Project"
    }
  ]
}

Status Code

201 - Created

Example - POST (child of existing package)

Create a new package (as child of existing package).

Request Headers

KeyValueDescription
Acceptapplication/json

Request Body

{
  "Name": "New Child Package",
  "ParentId": "9bfeb244-06a6-4440-b6b6-a8bcc0847673"
}

Response Headers

KeyValueDescription
Locationhttp://localhost/api/executionpackage/4bb709c2-e0e7-4af3-9f60-a045016a9610
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "ParentId": "9bfeb244-06a6-4440-b6b6-a8bcc0847673",
  "Name": "New Child Package",
  "Stereotype": "Package",
  "OrderNumber": 0,
  "Expands": [
    "Children",
    "Parent",
    "Project"
  ],
  "Self": "http://localhost/api/executionpackage/4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "Links": [
    {
      "Href": "http://localhost/api/executionpackage/4bb709c2-e0e7-4af3-9f60-a045016a9610/children",
      "Rel": "Children"
    },
    {
      "Href": "http://localhost/api/executionpackage/9bfeb244-06a6-4440-b6b6-a8bcc0847673",
      "Rel": "Parent"
    }
  ]
}

Status Code

201 - Created

  • No labels