opportunity-project-pairs
Retrieves a list of opportunity-project pairs that match the provided criteria within the context of the requesting user’s company.
Resource Information
Method and URI | GET https://developer.api.autodesk.com/construction/buildingconnected/v2/opportunity-project-pairs |
Authentication Context | user context required |
Required OAuth Scopes | data:read |
Data Format | JSON |
Request
Headers
Authorization* string | Must be Bearer <token> , where <token> is obtained via a three-legged OAuth flow. |
Request
Query String Parameters
filter[projectId] string | The ID of a project with which the objects returned in the response must be associated. |
filter[opportunityId] string | The ID of an opportunity that must be part of the opportunity-project pair returned in the response. |
filter[updatedAt] string | The required range of dates and times during which the last update must have been made to the objects returned in the response, in ISO 8601 format.
A single date and time takes this format: |
limit int | The maximum number of records that the endpoint may return per page.
Note that a returned page may contain fewer records than the limit under either of these conditions:
Default value: |
Response
HTTP Status Code Summary
200 OK | OK |
400 Bad Request | The parameters of the requested operation are invalid. |
401 Unauthorized | The provided bearer token is not valid. |
403 Forbidden | The user or service represented by the bearer token does not have permission to perform this operation. |
404 Not Found | The requested resource could not be found. |
429 Too Many Requests | Rate limit exceeded; wait some time before retrying. The ‘Retry-After’ header might provide the amount of the time to wait. |
500 Internal Server Error | An unknown error occurred on the server. |
Response
Body Structure (200)
pagination object | The pagination details of a response. |
limit int | The maximum number of records to return per page.
Note that a returned page may contain fewer records than the limit under either of these conditions:
|
cursorState string | An opaque cursor token that identifies where the next page of paginated results should start. It’s returned in each paginated response so that it can be provided in the next request to continue paginated results. If a paginated response contains no cursorState value, there are no further pages to return.
Omit this parameter to initiate a paginated request or to restart pagination. |
nextUrl string | The URL path that returns the next page of data. |
results array: object | |
id string | The unique ID of the opportunity-project pair.
Max length: 24 |
createdBy string | The unique user ID of the BuildingConnected user that created the pair.
Max length: 24 |
createdAt datetime: ISO 8601 | The date and time that the pair was created, in ISO 8601 format. |
updatedAt datetime: ISO 8601 | The date and time that the pair was last updated, in ISO 8601 format. |
opportunityId string | The unique ID of the opportunity in the pair. |
projectId string | The unique ID of the project in the pair.
Max length: 24 |
fileSyncingError string | Indicates whether an error has occured in the syncing and describes the error content. |
shouldRelinkGroup boolean | Indicates whether the pair needs to be relinked. This is relevant for grouped opportunities where there may be multiple paired projects within the group.
For more information about this scenario, see PATCH opportunity-project-pairs. Possible values:
|
fileStatus enum:string | The processing status of files being transferred to the project from the linked opportunity.
Possible values: QUEUED , IN_PROGRESS , SUCCESS , FAILED |
Example
OK
Request
curl -v 'https://developer.api.autodesk.com/construction/buildingconnected/v2/opportunity-project-pairs?filter[updatedAt]=2020-05-01T06:00:00.000Z..' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
Response
{
"pagination": {
"limit": 100,
"cursorState": "eyJsaW1pdCI6MjUsIm9mZnNldCI6MjV9",
"nextUrl": ""
},
"results": [
{
"id": "5fcdcd0b3db0876c66921a3a",
"createdBy": "5d8104b87e392d56e1e4b4ca",
"createdAt": "2020-12-07T18:00:00.000Z",
"updatedAt": "2020-12-07T18:00:00.000Z",
"opportunityId": "5fcdcd0b3db0876c66925fb1",
"projectId": "5fcdcd0b3db0876c669253c8",
"fileSyncingError": null,
"shouldRelinkGroup": false,
"fileStatus": "IN_PROGRESS"
}
]
}