12/5/2023 0 Comments Basecamp 3 integrationsIf the resource hasn't changed since your last request, you'll get a 304 Not Modified response with no body, saving you the time and bandwidth of sending something you already have. On subsequent requests, submit them back to us as If-None-Match and If-Modified-Since, respectively. When you first request a resource, store these values. Most API responses will include an ETag or Last-Modified header. You must use HTTP freshness headers to speed up your application and lighten the load on our servers. The Basecamp 4 API also provides the X-Total-Count header, which displays the total number of resources in the collection you are fetching. If the Link header is blank, that's the last page. Here's an example response header from requesting the third page of messages: Follow this convention to retrieve the next page of data-please don't build the pagination URLs yourself! The Basecamp 4 API follows the RFC5988 convention of using the Link header to provide URLs for the next page. In most cases, we use a geared pagination ratio with 15 results on page 1, 30 on page 2, 50 on 3, and then 100 on 4 and above. The number of requests that'll appear on each page is variable. Most collection APIs paginate their results. You'll receive a 415 Unsupported Media Type response code if you don't include the Content-Type header. Alternatively you can send Accept: application/json. This means that you have to send the Content-Type header Content-Type: application/json charset=utf-8 when you're POSTing or PUTing data into Basecamp. The style is no root element and snake_case for object keys. User-Agent: Fabian's Ingenious Integration you don't include a User-Agent header, you'll get a 400 Bad Request response.Here are examples of acceptable User-Agent headers: We use this information to get in touch if you're doing something wrong (so we can warn you before you're blacklisted) or something awesome (so we can congratulate you). A link to your application or your email address.You must include a User-Agent header with both: Read the authentication guide to get started. OAuth 2.0 allows users to authorize your application to use Basecamp on their behalf without having to copy/paste API tokens or touch sensitive login information. In cURL, it looks like this:Ĭurl -s -H "Authorization: Bearer $ACCESS_TOKEN " | json_pp AuthenticationĪs mentioned above, to authenticate you must use OAuth 2.0. To make a request for all the projects on your account, append the projects index path to the base URL to form something like. The path is prefixed with the account ID, but no /api/v1 API prefix.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |