|
||
TimeStation API v0.1 (Beta) |
Overview With the TimeStation API you can easily access your TimeStation data from other applications. The current version of the API (v0.1) provides access to all the TimeStation reports in CSV and XLS formats. REST The TimeStation API is organized around REST, a simple request format which uses an HTTP GET or POST action. The REST endpoint URL for the TimeStation API is https://api.mytimestation.com/v0.1/ Authentication The TimeStation API uses the api_key query string parameter to authenticate each request. TimeStation accounts can have a different API key for each application. To request an api_key for your account, please send an eMail to Support@MyTimeStation.com . Example: https://api.mytimestation.com/v0.1/reports/?api_key=4uahz4f7cvj29x63ew65vw3yf9p8rpeg All requests to the TimeStation API must be sent using HTTPS. Requests sent using plain HTTP will fail. Errors TimeStation uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with TimeStation's servers. 200 OK - Everything worked as expected. 400 Bad Request - Often missing a required parameter. 401 Unauthorized - No valid API key provided. 402 Request Failed - Parameters were valid but request failed. 404 Not Found - The requested item doesn't exist. 500, 502, 503, 504 Server errors - something went wrong on TimeStation's end. Not all errors map cleanly onto HTTP response codes, however. When an error occurs and more details are available about this error, that information can be found in the JSON response body as seen in the example below: {"error":{"errorCode":"400", "errorText":"api_key parameter missing"}} Versioning When we make API changes that may affect compatibility with earlier versions we publish a new version of the API. The latest API version is v1.2, this document is for version 0.1 which is an older version. The API version is reflected in the REST endpoint URL. You can find the documentation for other versions of the API below: Rate Limiting To ensure optimal performance for all API users, there's a limit of 5,000 API requests per TimeStation account per day. Reports The reports method allows you to execute a TimeStation report and receive the report output in either CSV or XLS format. Common Parameters All requests to the reports method require the following parameters
Example: https://api.mytimestation.com/v0.1/reports/?api_key=4uahz4f7cvj29x63ew65vw3yf9p8rpeg&id=37&exportformat=csv In addition to common parameters, each report may require specific additional parameters. See the table below for the list of parameters available for each report. Available Reports The following reports are available by calling the reports method
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Terms of Service | Privacy Policy | Developer API | Contact us Copyright © 2011-2024 TimeStation, LLC. All Rights Reserved. |