Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.
×Hi Developers.,
Atlassian recently updated the REST API fro the team filed in jira cloud .
i want to develop a python script to create team ,
when I try to curl with API token getting 401 error
Following the Create a Team REST API docs, I was able to successfully create a team by simply replacing the required values, along with passing my email and API Token as credentials.
curl --request POST \
--url 'https://{sitename}.atlassian.net/gateway/api/public/teams/v1/org/{orgId}/teams/' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
-u {EMAIL}:{API_TOKEN} \
--data '{
"description": "<string>",
"displayName": "<string>",
"siteId": "<string>",
"teamType": "OPEN"
}'
Here are some links that could help as references on how to get those values:
One way of getting a 401 error is when my credentials are incorrect, ie, email and/or API Token, so I'd suggest reviewing the auth docs, particularly on generating the API Token from here.
Using CURL, I've tested that both the Simple Example (outlined in the code above) and Supply basic auth headers methods would work.
You could also try calling a different REST API to narrow down if the issue is specific to the Create a Team API.
Thank you so much for you’re response.
i have tried above one but getting some 401 headers error
is there any python snippet available.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.