Resource: Script Package Children ( /api/scriptpackage/{id}/children )

Script Package resource

This resource supports the following methods: GET

Methods

GET


Retrieves the children of the script package.

This method supports the OData parameters $filter, $top, $take, $orderby and $inlinecount. See OData Topic for more details.

Required Permissions

  • TestManagement/ManageScripts/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 the user does not have permission to create script packages in the target project.
404 - NotFoundReturned if the package does not exist.

Example - GET

An example of getting all child packages for the package.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}4bb709c2-e0e7-4af3-9f60-a045016a9610The GUID Identifier of the package to get children for.

Response Headers

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

Response Body

{
  "Items": [
    {
      "Id": "2d33ee96-7634-4363-891f-d90a15709bb9",
      "ParentId": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
      "Name": "Cycle 1",
      "OrderNumber": 1,
      "Expands": [
        "Children",
        "Parent",
        "Project"
      ],
      "Self": "http://localhost/api/scriptpackage/2d33ee96-7634-4363-891f-d90a15709bb9",
      "Links": [
        {
          "Href": "http://localhost/api/scriptpackage/2d33ee96-7634-4363-891f-d90a15709bb9/children",
          "Rel": "Children"
        },
        {
          "Href": "http://localhost/api/scriptpackage/4bb709c2-e0e7-4af3-9f60-a045016a9610",
          "Rel": "Parent"
        }
      ]
    },
    {
      "Id": "ed07f8a1-3ffa-4f25-bc28-0dae55650205",
      "ParentId": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
      "Name": "Cycle 2",
      "OrderNumber": 2,
      "Expands": [
        "Children",
        "Parent",
        "Project"
      ],
      "Self": "http://localhost/api/scriptpackage/ed07f8a1-3ffa-4f25-bc28-0dae55650205",
      "Links": [
        {
          "Href": "http://localhost/api/scriptpackage/ed07f8a1-3ffa-4f25-bc28-0dae55650205/children",
          "Rel": "Children"
        },
        {
          "Href": "http://localhost/api/scriptpackage/4bb709c2-e0e7-4af3-9f60-a045016a9610",
          "Rel": "Parent"
        }
      ]
    }
  ]
}

Status Code

200 - OK

  • No labels