How to hit the Jira API

Jira Cloud's REST API lives at https://<site>.atlassian.net/rest/api/3. Issue text uses Atlassian Document Format, a JSON structure, rather than plain strings.

Authentication

Jira Cloud uses Basic auth with your Atlassian email as the username and an API token as the password — curl's -u, PostTaco's Auth tab. Create a token at id.atlassian.com. {{JIRA_SITE}} is the part before .atlassian.net.

Full reference: https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/

Get the current user

curl https://{{JIRA_SITE}}.atlassian.net/rest/api/3/myself \
  -u {{JIRA_EMAIL}}:{{JIRA_API_TOKEN}}
Run in PostTaco

Create an issue

project is a project key like ENG.

curl -X POST https://{{JIRA_SITE}}.atlassian.net/rest/api/3/issue \
  -u {{JIRA_EMAIL}}:{{JIRA_API_TOKEN}} \
  -H "Content-Type: application/json" \
  -d '{"fields": {"project": {"key": "{{PROJECT_KEY}}"}, "issuetype": {"name": "Task"}, "summary": "Created from PostTaco"}}'
Run in PostTaco