Hi all,
I try to use API to add a user as a member of a project, but I can’t find the way to do this, even with documentation, because syntax isn’t full. (they don’t explain how to define access_level, ansd without this parameter we can’t use API)
See below :
Add project team member
POST /projects/:id/members
Parameters:
id (required) - The ID or NAMESPACE/PROJECT_NAME of a project
user_id (required) - The ID of a user to add
access_level (required) - Project access level
The POST line doesn’t contain how to specify access_level.
I tried folowing request without access_level parameter, but of course it does not works:
curl --header “PRIVATE-TOKEN: AZERTY” --request POST “http://server.com/api/v3/projects/devs%2Fcom/members/2”
(return anything)
and if i try “Edit” with PUT, I have this :
curl --header “PRIVATE-TOKEN: AZERTY” --request PUT “http://server.com/api/v3/projects/devs%2Fcom/members/2”
returns {“message”:“400 (Bad request) "access_level" not given”}
Did anyone know correct POST syntax ?