Collections

A resource collection is a set of resource instances. For example, the defects collection contains resources that represent defects.

Overview

A resource collection is a set of resource instances. For example, the defects collection contains resources that represent defects.

  • Resource collections may contain 0->N resource instances.

  • An entity collection is resource collection of entities (see instances).

  • A resource collection is identified using the following syntax: 

    <scheme name>:<authority>/api/shared_spaces/<space_id>/workspaces/<workspace_id>/<resource_collection>

    Workspace level permissions are applied.

    <scheme name>:<authority>/api/shared_spaces/<space_id>/<resource_collection>

    Space level permissions are applied.

Back to top

URIs

The URI formats for the workspace, shared space, and site levels are:

https://<server>:<port>/api/shared_spaces/<space_id>/workspaces/{workspace_id}/<entity_collection>

https://<server>:<port>/api/shared_spaces/<space_id>/<entity_collection>

Using the defects collection

https://<server>:<port>/api/shared_spaces/<space_id>/workspaces/<workspace_id>/defects

For the syntax for specifying parameters in URIs, see Variables and values.

Note:

Throughout this document, the example URIs are abbreviated, without the server and port context.

http://<server>:<port>/api/shared_spaces/<space_id>/workspaces/<workspace_id>/<entities>

Becomes:

.../api/shared_spaces/<space_id>/workspaces/<workspace_id>/<entities>

Back to top

Supported request methods

Resource collection supports the following HTTP request methods:

Method

Description

Supports...

GET

Retrieve the data

Supports: Filtering, field selection, sorting, and pagination.

POST

Create new entities

 

PUT

Update existing entities

Supports: Filtering.

DELETE

Delete existing entities

Supports: Delete by filter.

Back to top

Actions on collections

Back to top

See also: