Using Swagger to query the API
All eHour's endpoints are documented in Swagger, an interactive user interface that allows developers to query the API directly from the browser. In this article, we'll walk you through how to use Swagger to get a list of all users.
Steps to Use Swagger
- Open your browser and navigate to https://ehourapp.com/api/doc
- Click the "Authorize" button to enter your API key in the "Value" field.
- All endpoints are grouped by entity: team, user, client, project, task, assignment, report, etc.
- Navigate to the User group and click the /api/v1/users endpoint to expand its details and view its parameters.
- Click "Try it out!".
- Enter a query to filter the list of users or leave it empty to return all users.
- Click "Execute"
- Review the API response.