Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create an issue through Web API?

Win October 28, 2023

Hi there,

I'm new to Jira, can I create an issue through Web API?

I need advice.

many thanks

Win

2 answers

2 accepted

2 votes
Answer accepted
vftjhj sdsfnhfh October 28, 2023

Creating an issue through a web API depends on the specific API and platform you are working with. I'll provide a generic example using HTTP requests, but keep in mind that the details may vary based on the API you're interacting with.

Assuming you are working with a RESTful API, you typically use the HTTP methods (POST, PUT, etc.) to interact with resources. Here's a basic example using the `curl` command in a terminal:

```bash
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -d '{"title":"New Issue","description":"This is a new issue"}' https://api.example.com/issues
```

In this example:

- `POST` is the HTTP method used to create a new resource.
- `-H "Content-Type: application/json"` sets the content type to JSON.
- `-H "Authorization: Bearer YOUR_ACCESS_TOKEN"` is optional and would be used if the API requires authentication. Replace `YOUR_ACCESS_TOKEN` with the actual access token.
- `-d '{"title":"New Issue","description":"This is a new issue"}'` is the data you're sending. Modify it to fit the structure expected by the API you are working with.
- `https://api.example.com/issues` is the endpoint where you are making the request. Replace it with the actual URL of the API endpoint.

Remember to check the documentation of the specific API you're working with for details on the required payload structure, authentication, and the endpoint URL.

If you are working with a different type of API (SOAP, GraphQL, etc.), the process would be different. Please provide more details about the API you're working with if you need more specific assistance.

Win October 28, 2023

Hi

I’m now using the free version, am I also elligible to use the API?

Robert Wen_Cprime_
Community Champion
October 30, 2023

Yes.  You can use the API on any plan.

1 vote
Answer accepted
Robert Wen_Cprime_
Community Champion
October 28, 2023

Hello @Win ! Welcome to the Atlassian Community!

Yes, you can create issues through the Jira Cloud REST API.  Documentation is here.

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-post

Win October 29, 2023

thanks everyone!.. good day to all of you

Suggest an answer

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

Atlassian Community Events