Sample - Asana API
GET/time_periods

List time periods

Lists time periods for a workspace, optionally constrained by a start and end date. Supply workspace to identify the workspace, and use start_on and end_on to limit the returned date range. Use opt_fields to request additional properties for each time period.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

4 parameters
start_onstringoptional
Start of the date range in ISO 8601 date format.
end_onstringoptional
End of the date range in ISO 8601 date format.
workspacestringrequired
The globally unique identifier of the workspace whose time periods to retrieve.
opt_fieldsarray<string>optional
Additional properties to include for each returned time period, supplied as a comma-separated list. Allowed values are the documented time period property names, including nested parent fields.

6 status codes
200Returns an object containing an array of time period records in `data`; a `next_page` object can be included when additional results are available.
dataarray<object>optional
next_pageobjectoptional
*Conditional*. This property is only present when a limit query parameter is provided in the request. When making a paginated request, the API will return a number of results as specified by the limit parameter. If more results exist, then the response will contain a next_page attribute, which will include an offset, a relative path attribute, and a full uri attribute. If there are no more pages available, next_page will be null and no offset will be provided. Note that an offset token will expire after some time, as data may have changed.
400Returned when `workspace` is missing or a parameter is missing or malformed.
errorsarray<object>optional
401Returned when a valid authentication token was not provided.
errorsarray<object>optional
403Returned when the authenticated user does not have access to the workspace or time periods.
errorsarray<object>optional
404Returned when the request does not identify a known action or the workspace or requested resource does not exist.
errorsarray<object>optional
500Returned when a server-side problem prevents the time periods from being retrieved.
errorsarray<object>optional

Error handling

A 400 is returned when workspace is missing or a parameter is malformed. A 401 is returned without a valid authentication token, and a 403 is returned when the authenticated user cannot access the workspace. A 404 indicates that the workspace or requested resource does not exist, while a 500 indicates a server-side failure; start_on and end_on must be ISO 8601 dates.