The most common API types discussed in the search results are REST, GraphQL, SOAP, and gRPC.
Each API type has its own strengths and use cases:
REST APIs are widely adopted and flexible, using standard HTTP methods for data operations.
GraphQL provides more precise control over data fetching and is growing in popularity.
SOAP is more rigid but offers built-in security features, often used in enterprise environments.
gRPC is mentioned as a fast option for distributed systems.
Choose an API type based on your specific project needs, existing tech stack, and developer preferences.
Consider factors like flexibility, performance, security, and ecosystem support when selecting an API type.
REST is often a good choice for simpler APIs or when you're new to API design.
GraphQL can be beneficial for complex, nested data structures or highly interactive frontends.
SOAP may be suitable for enterprise-scale distributed systems requiring detailed responses and error handling.
Based on the search results provided, it appears that the official Harvest API does not have native webhook support. Here are the key points to consider:
The official Harvest API documentation does not mention webhooks.
The Harvest API is described as a REST API that allows programmatic interaction with Harvest accounts for tracking time, logging expenses, creating projects, etc.
The API supports various HTTP methods (GET, POST, PATCH) for making requests and retrieving data.
While webhooks are not natively supported, there are third-party integration options available:
Zapier offers integrations between Harvest and webhooks. This allows you to set up workflows where Harvest events can trigger webhooks or vice versa.
For example, one popular template is "Start a Harvest timer from a webhook".
It's worth noting that the search results primarily focus on the Harvest API itself and third-party integrations, rather than native webhook support.
In summary, the official Harvest API does not appear to have native webhook support. However, you can use third-party services like Zapier to create webhook-like functionality by integrating Harvest with webhook services. This allows you to set up automated workflows based on Harvest events or trigger Harvest actions from external webhooks.
Here are the key points about the API rate limits for the Harvest API:
Harvest provides the following headers to help track rate limit status [2]:
By adhering to these rate limits and following best practices, you can ensure smooth integration with the Harvest API while avoiding potential disruptions due to exceeding the allowed request rates.
Based on the search results provided, here is the answer to your question:
The most recent version of the Harvest API is V2.
Key points to consider:
Harvest API V2 is a REST API that allows programmatic interaction with Harvest accounts.
It supports various operations like tracking time, logging expenses, creating projects, and more.
The API uses OAuth2 or Personal Access Tokens for authentication.
API requests require specific headers, including Authorization, Harvest-Account-Id, and User-Agent.
Responses are formatted in JSON and use standard HTTP response codes.
Code example for making a GET request to the Harvest API V2:
curl https://api.harvestapp.com/v2/tasks?page=2&per_page=10 \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Harvest-Account-Id: $ACCOUNT_ID" \ -H "User-Agent: MyApp ([email protected])"
Best practices:
Always include a User-Agent header with your application name and contact information.
Use appropriate HTTP methods (GET, POST, PATCH) depending on the operation.
When submitting data, use either JSON format or form data, and specify the Content-Type header accordingly.
Handle rate limiting and respect the API's usage limits.
Securely store and manage your API access tokens.
It's important to note that while the search results also mention a Harvest API from Greenhouse, this appears to be a different product. The question specifically asks about the Harvest API, which refers to the time tracking and project management tool by Harvest, not the recruiting tool by Greenhouse.
To get a developer account for Harvest and create an API integration, you'll need to follow these steps:
If you don't already have one, sign up for a Harvest account at https://www.getharvest.com/.
Once logged in to your Harvest account:
For quick API access and testing:
If you're building an integration for other users:
For both Personal Access Tokens and OAuth2 Applications:
Based on the search results, here is a list of data models you can interact with using the Harvest API, along with what is possible for each:
Client
Client Contacts
Invoices
Invoice Item Categories
Estimates
Estimate Item Categories
Expenses
Expense Categories
Projects
Project User Assignments
Project Task Assignments
Roles
Tasks
Time Entries
Users
For each of these data models, you can typically perform CRUD (Create, Read, Update, Delete) operations using the Harvest API. The API allows you to interact with these models programmatically, enabling you to automate various tasks and integrate Harvest data with other systems.
Additionally, the Harvest API provides access to various reports, including:
When working with the API, keep in mind the following: