Tried to create project via REST API on Postman
POST - (mysite)rest/api/3/project
{
"notificationScheme": 10021,
"description": "Example Project description",
"leadAccountId":"xxxxxx@gmail.com",
"url": "https://rika.atlassian.net/",
"projectTemplateKey": "com.atlassian.servicedesk:simplified-it-service-desk",
"avatarId": 10200,
"issueSecurityScheme": 10001,
"name": "Example",
"permissionScheme": 10011,
"assigneeType": "UNASSIGNED",
"projectTypeKey": "service_desk",
"key": "EX",
"categoryId": 10120
}
returned with error;
{ "errorMessages": [], "errors": { "projectLead": "You must specify a valid project lead." }}
tried to change leadAccountID with lead but still not working
please advise how to fix this
Hello @Rika Mandasari
Can you change the leadaccountID parameter by "lead" and put the username of the project lead and not his mail account (unless the username is the mail adress)
Hope this helps
Hi,
I did change to "lead" and put the user name but it returned another error said;
{
"errorMessages": [
"'accountId' must be the only user identifying query parameter in GDPR strict mode."
],
"errors": {}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this :
lead : "accountid"
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.
You can use this api to get your account id or got to your profile and look at the url you should have something like this
atlassian.net/jira/people/558548:0f98599f-1633-4h65-9428-d8c30p65a2f8
I'm not sure but the Id come after the ":"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did try;
lead":"5dba4d4dd0d0d60c2e06ac6d",
{
"errorMessages": [
"'accountId' must be the only user identifying query parameter in GDPR strict mode."
],
"errors": {}
}
then I tried this too;
"accountId":"5dba4d4dd0d0d60c2e06ac6d",
{
"errorMessages": [
"Unrecognized field \"accountId\" (Class com.atlassian.jira.rest.v2.issue.project.ProjectInputBean), not marked as ignorable\n at [Source: org.apache.catalina.connector.CoyoteInputStream@4d00eb7f; line: 4, column: 16] (through reference chain: com.atlassian.jira.rest.v2.issue.project.ProjectInputBean[\"accountId\"])"
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just tried this and it's work fine
{ "notificationScheme": 10000,
"description": "Example Project description",
"leadAccountId" : "557058:0f94727f-1649-4c66-9538-a8c29b64a2f8",
"url": "http://atlassian.com",
"projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-simplified-process-control",
"avatarId": 10200,
"issueSecurityScheme": 10001,
"name": "Example",
"permissionScheme": 10011,
"assigneeType": "PROJECT_LEAD",
"projectTypeKey": "business",
"key": "EX"
}
In your url profile take everything after the last "/", this is your account id
atlassian.net/jira/people/578058:0f2151515-2548-5n55-9538-a8125882f8
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi thanks for responding,
Got another different error 500
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Error 500 means the json data is not valid.
I try this code in python and it works fine, i'm not familiar with postman :
import requestsfrom requests.auth import HTTPBasicAuthimport json
url = "https://yourURL.atlassian.net/rest/api/3/project"
auth = HTTPBasicAuth("username", "api_token")
headers = { "Accept": "application/json", "Content-Type": "application/json"}
payload = json.dumps(
{ "notificationScheme": 10000,
"description": "Example Project description",
"leadAccountId" : "yourID",
"url": "http://atlassian.com",
"projectTemplateKey": "com.atlassian.servicedesk:simplified-it-service-desk", "avatarId": 10200,
"issueSecurityScheme": 10001,
"name": "Example", "permissionScheme": 10011,
"assigneeType": "PROJECT_LEAD",
"projectTypeKey": "service_desk",
"key": "EX"} )
response = requests.request( "POST", url, data=payload, headers=headers, auth=auth)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
This code is provided by the cloud api documentation :
Hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Team,
Am trying to assign a ticket from the jenkins to jira using jira pipeline steps
jiraAssignIssue idOrKey: "TEST-3", site: 'jira', userName: "banuchandra"
when am trying above code getting below error
Error Code: 400
Error Message: {"errorMessages":["'accountId' must be the only user identifying query parameter in GDPR strict mode."],"errors":{}}
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.