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.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

jira team

kammani chandra sekhar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2024

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

1 answer

1 accepted

0 votes
Answer accepted
Sadiq Satriya August 23, 2024

Hi @kammani chandra sekhar

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.

 

kammani chandra sekhar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 23, 2024

Hi @Sadiq Satriya 

 

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events