opportunities/{opportunityId}/comments
Retrieves a list of comments associated with the specified opportunity.
To access the “Opportunity Comment” data, the user making the request must be a verified employee of the company owning the opportunity and must be associated with an office that has a Pro subscription to Bid Board. The opportunity comments can only be accessed via the API if the office, identified by the ‘owningOfficeId’ for the opportunity, has a Bid Board Pro subscription. Contact your sales representative to gain access to the BuildingConnected API.
Resource Information
Method and URI | GET https://developer.api.autodesk.com/construction/buildingconnected/v2/opportunities/{opportunityId}/comments |
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
URI Parameters
opportunityId string | The ID of the opportunity. To find the opportunity ID, call GET opportunities |
Request
Query String Parameters
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. |
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: |
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: |
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 | The list of comments associated with the Opportunity. |
id string | The ID of the comment.
Max length: 24 |
opportunityId string | The ID of this opportunity associated with the comment.
Max length: 24 |
createdAt datetime: ISO 8601 | The date and time the comment was created, in ISO 8601 format. |
createdBy string | The ID of the user who created the comment. |
updatedAt datetime: ISO 8601 | The date and time the comment was last updated, in ISO 8601 format. |
content string | The content of the comment. Note that this may include HTML content, for example, <b></b> or & . |
userName string | The name of the user who added the comment. |
Example
OK
Request
curl -v 'https://developer.api.autodesk.com/construction/buildingconnected/v2/opportunities/:opportunityId/comments?filter[updatedAt]=2020-05-01T06:00:00.000Z..' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
Response
{
"pagination": {
"limit": 100,
"cursorState": "eyJsaW1pdCI6MjUsIm9mZnNldCI6MjV9",
"nextUrl": ""
},
"results": [
{
"id": "5c3f0a5c9ca3dda548312ea5",
"opportunityId": "5c3f0a5c9ca3dda548312ea5",
"createdAt": "2020-01-13T17:20:29.492Z",
"createdBy": "",
"updatedAt": "2020-01-15T17:20:29.492Z",
"content": "<p>This is a <i>styled</i> comment</p>",
"userName": ""
}
]
}