Rest API: Adding a user to a project

Wednesday, October 12, 2022
Avatar

I've been trying to use the rest API to add a user to a project he is not member of but have not succeeded so far.

I have a system administrator user and in Spiraplan can add any user to a project.

When i try to use my user to authenticate via the rest API to add my own user to a new project i get a response of unauthorized

So with the username and api-key of user 194 i do a post to
"projects/" + projects + "/users" with a project I am not member of

with as data the user 194 and a project role and the project id

But when i do this I get a unautherized

 

I also tried to get the users in a project I am member of and this works but if i try to get the users of a project I am not member of this does not work.

Can you help me figure out what is going wrong?

2 Replies
Wednesday, October 12, 2022
Avatar
re: wvolders Wednesday, October 12, 2022

Please could you send us a support ticket with the full API body and also how you are authenticating.

 

Wednesday, October 12, 2022
Avatar
re: inflectra.david Wednesday, October 12, 2022

Will send a support ticket.
Authentication is via username/api-key in header

Statistics
  • Started: Wednesday, October 12, 2022
  • Last Reply: Wednesday, October 12, 2022
  • Replies: 2
  • Views: 380