Esadax CLI and REST API: Project Members Management

Author:Fraser Lennox
Updated:Apr 6, 2025

The Esadax CLI and REST API provide robust tools for managing project members, allowing you to add, list, and remove users from your projects. This article walks through the key endpoints and functionalities available.

Authentication

Before interacting with the Esadax API, ensure you have valid authentication credentials:

  • Token: Obtain a Bearer token from Esadax to authenticate your requests.
  • Authorization Header: Include the Authorization: Bearer <TOKEN> header in your requests.

Project Members Endpoints

1. Add a New Member

To add a member to a project, use the POST method on the endpoint:

await fetch("https://api.esadax.com/v1/projects/{idOrName}/members", {
  method: "post",
  headers: { Authorization: "Bearer <TOKEN>" },
  body: JSON.stringify({
    // Member details (e.g., email, username)
  }),
});

2. List Project Members

Retrieve a list of all members in a project using the GET method:

fetch("https://api.esadax.com/v1/projects/{idOrName}/members", {
  headers: { Authorization: "Bearer <TOKEN>" },
  params: {
    // Optional parameters (e.g., `limit`, `search`, `since`, `until`)
  },
});

3. Remove a Member

Delete a specific member from a project using the DELETE method:

fetch("https://api.esadax.com/v1/projects/{idOrName}/members/{uid}", {
  method: "delete",
  headers: { Authorization: "Bearer <TOKEN>" },
});

Additional Endpoints

  • Projects: Manage projects and their configurations.
  • Secrets: Rotate or manage API secrets associated with your project.

Error Handling

All endpoints return appropriate HTTP status codes. Ensure you handle errors by checking the response status code and status message.

Conclusion

The Esadax CLI and REST API provide a flexible and secure way to manage project members. Always ensure proper authentication and permissions when interacting with these endpoints.