These filters all operate as query parameters:Īll filters accept multiple values, which can be passed in by using multiple query parameters with the same name: The documentation indicates which endpoints support which filters. This can make it easier to process the results if the client is only looking for specific resources, and it can also speed up the response. It is possible to filter the results on endpoints that return a list of resources. Clients can access verbose properties by adding Verbose=true to the request query parameters. The endpoints with a verbose mode, and which additional fields are available, are indicated in the documentation. Some endpoints have a verbose mode which returns additional fields and related resources, but which may take longer to execute. These legacy ID values will be deprecated in the future but, for now, are included to help migrate from older API versions. Simply add CTLegacyScramble=true to the request query parameters to access the LegacyID field. Resource IDs will be in the format of a modern entity scramble (starting with a 4), but the legacy short scramble IDs (starting with a 2) are also available where indicated by the documentation. In order to guarantee compatibility, all dates should be in the format YYYY-MM-DD (e.g. ![]() Some requests make use of dates, either in the URL or in the body of a POST/PATCH request. Currently the only supported content type is application/json, resulting in the following header: For example, get a list of people from your ClickTime account by making the request below, substituting " API_TOKEN" with your actual API token you received from the request above.Īll requests should include an appropriate Content-Type header. The example requests above will return various information including the API token you can use to make subsequent requests to other endpoints. Tokens can also be manually invalidated and regenerated using the “My Preferences” page or the “Me/ResetAuthToken” endpoint. These tokens may be subject to invalidation for other reasons, but won't expire solely based on time. Alternatively, a token can be obtained using Basic authentication against the “Me” endpoint as described above. The token itself can be obtained by logging in to the web application, going to "My Preferences", and clicking on the "Authentication Token" tab. H 'Authorization: Basic ENCODED_STRING' \Ĭlients can use a custom per-user authentication token by sending an Authorization header in the following format: Authorization: Token Make a request like the one below but replacing "ENCODED_STRING" with the encoded string you created in the previous step.Build a string in the form of EMAIL:PASSWORD in which "EMAIL" is your email address as it's listed in ClickTime and "PASSWORD" is your ClickTime password.Make a request like the one below but replacing "EMAIL" with your email address as it's listed in ClickTime and "PASSWORD" with your ClickTime password.Īlternatively, you can also do the following to avoid entering your email and password in clear text: ![]() ![]() The POST /Me/ResetAuthToken endpoint only supports basic access authentication.Ĭlients can authenticate themselves with their username and password using basic HTTP authentication against the “Me” endpoint in order to obtain a token.The GET /Me endpoint additionally supports basic access authentication so you can retrieve your API token.The only exceptions to this rule are as follows: Most API endpoints only support authentication via token. Our v2 REST API was selected as one of the top APIs in the Business software category by API World in 2019. Supports filtering and pagination of results.Makes exclusive use of JSON for request and response bodies.As a result, we now have a REST API that: It is not an iteration on our existing APIs, but rather a redesign intended to follow RESTful principles. The v2 REST API offers programmatic access to common ClickTime functions. This guide provides a general overview of the REST v2 API Please see here for comprehensive documentation
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |