Get a Project Phase

GET/project-phases/{id} — Use this method to retrieve the project phase with the specified internal ID.

Parameters

Path parameters

Path parameter

Required / Optional

Description

Type

{id}

Required

The internal ID of the project phase.

Note:

The project phase record with the internal ID {id} must have the task classification field set to Phase in OpenAir.

integer

Query string parameter

Path parameter

Required / Optional

Description

Type

expand

Optional

A comma-separated list of attributes available for expansion. The comma-separated list may include spaces (or %20 in the URL encoded string).

string

fields

Optional

A comma-separated list of attributes to include in the response. If not specified, the response includes all attributes for the project phase returned. Response Data Modifiers.

string

filterSetId

Optional

The internal ID of the filter set to be applied.

  • When specified, the response includes only data that is available when the specified filter set is active in OpenAir. The filter set with the specified internal ID must exist and must be associated with the user who authorized the application as per the access token.

  • Otherwise and by default, the primary filter set associated with the user who authorized the application is applied.

integer

Response definitions

A successful request returns a JSON object with the following properties:

Property

Description

data

An array containing the project phase requested. See Returned Data.

included

An array of expanded objects, if the expand parameter was set in the request.

See Referenced Objects and Expansion.

meta

An object containing information about objects referenced by internal ID in the data array (object type and internal ID).

See Referenced Objects and Expansion.

message

A string containing a brief message about the status of your request — e.g. “Success”.

A failed request returns a JSON object with the following properties:

Property

Description

message

A string containing a brief message about the status of your request — e.g. “ProjectPhase #237 not found”.

Note:

The project task record with the internal ID {id} must have the task classification field set to Phase in OpenAir. If the project task record corresponds to a milestone or a phase, the API return an error with message “ProjectPhase #{id} not found”.

Sample request

            GET /rest/v1/project-phases/2674 HTTP/1.1
Host: company-id.app.openair.com
Authorization: Bearer <OAuth2_access_token> 

          

In the example, <OAuth2_access_token> is the OAuth 2.0 access token obtained for the client application connecting to OpenAir. See Authentication.

Sample response

            {
    "data": [
        {
            "priority": 5,
            "defaultCategoryOnPhase5": "5",
            "isReadyForRecognition": false,
            "plannedHours": 121,
            "predecessorsType": "",
            "id": 5232,
            "updated": "2022-01-24 08:23:30",
            "seq": 4,
            "name": "Initiation",
            "customerId": 71,
            "defaultCategoryOnPhase1": "3",
            "customerName": "Internal",
            "predecessors": "",
            "predecessorsLag": "",
            "calculatedStarts": "2020-09-21",
            "calculatedFinishes": "2020-10-02",
            "currency": "USD",
            "projectId": 299,
            "percentComplete": 0,
            "defaultCategoryOnPhase2": "1",
            "isClosed": false,
            "attachments": [],
            "created": "2022-01-20 09:32:21",
            "defaultCategoryOnPhase4": "3",
            "parentId": 0,
            "idNumber": 5,
            "defaultCategoryOnPhase": "5"
         }
    ],
    "message": "success"
}