Andrew_Smith
Andrew_Smith

Reputation: 1

{Clockify API} Removing user access from a project

I am currently in the process of configuring API collections for Clockify in Postman, and then integrating them into OutSystems.

However, I am facing an issue with revoking access to users from a project. I have gone through the documentation, but I could only find information on how to add users to a project and update their membership.

Can someone guide me on how to remove access to a user from a project?

For updating/giving access to a project, you use the following:

[PATCH] https://api.clockify.me/api/v1/workspaces/{WorkspaceId}/projects/{ProjectId}/memberships

I was feeling luckily and simply tried:

[DELETE] https://api.clockify.me/api/v1/workspaces/{WorkspaceId}/projects/{ProjectId}/memberships

And then adding the "userId" in the request but did not work.

Upvotes: 0

Views: 92

Answers (1)

Andrew_Smith
Andrew_Smith

Reputation: 1

Following some iterative testing, it became evident that filling in a membership UserId is mandatory in Clockify. In other words, a project must have a user assigned to it, leaving this field empty is not permissible. As a solution, I developed a new functionality that automatically assigns Clockify Workspace Admin access when a user is removed from a project. From my extensive testing, the implementation appears to function smoothly without any issues.

Upvotes: 0

Related Questions