I am trying to automate Project creation from an Automation Rule.
The GET REST API returns 200 response code, however, the "POST" API is returning 500
what am I missing?
http method POST - https://jira-xyz.atlassian.net/rest/api/3/project
Headers-
authorization: Basic setsdkjfkjhdxtjydfgl
Content-Type : application/json
custom data -
{
"notificationScheme": 10021,
"description": "Cloud migration initiative",
"leadAccountId": "569565786957",
"url": "https://jira-xyzabc.atlassian.net",
"avatarId": 10200,
"issueSecurityScheme": 10001,
"projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-simplified-process-control",
"name": "Example",
"permissionScheme": 10011,
"assigneeType": "PROJECT_LEAD",
"projectTypeKey": "business",
"key": "EX",
"categoryId": 10120
}
@surya manne hi and welcome to the community!
On the post method you use this URL https://jira-xyz.atlassian.net/rest/api/3/project, but inside your date you use this one https://jira-xyzabc.atlassian.net
Could that possibly be the problem?
@Alex Koxaras _Relational_ Thanks for the response
I get the same 500 response as well while using " https://jira-xyz.atlassian.net" inside the data
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @surya manne
I've successfully managed to create a project via REST API, using the following code, which is suitable for me:
{
"notificationScheme": 10000,
"description": "Cloud migration initiative",
"url": "https://koxaras.atlassian.net",
"avatarId": 10200,
"issueSecurityScheme": 10000,
"leadAccountId": "5f9fb7c1c2e5390077abf628",
"projectTemplateKey": "com.pyxis.greenhopper.jira:gh-simplified-basic",
"name": "Example",
"permissionScheme": 10000,
"projectTypeKey": "software",
"key": "EX",
"categoryId": 10000
}
In the example below, I change the project type to that of a kanban.
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.
Does any of these domain you are using exists? It seems that I can't find any of these two.
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.
On the basic authorization, did you embed as well your email address with the api token you created?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, basic authorization with email address and API Token (Base64 encoded)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well. that's strange then. It seems that you've done everything correct and for a odd reason it doesn't work! I would probably contact Atlassian's support, if you are on a paid plan. From my side I can only tell you that I've manage to do it. If you however are willing to share some more info (like token, schemes id etc) I could try to experiment a bit. That's up to you.
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.
Hi @surya manne ,
Here is a reference for creating a project API call:
Have you tried to use curl to call the API based on your params to see if it works?
Cheers,
Joy [Auotmation for Jira]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joy
Same thing.
curl for POST does not work, however, curl GET works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.