Jira Cloud fields and work types
Jira summary field: set and read via the REST API
summary is the one-line title of a work item, a required plain string with the system key summary. It is set in fields.summary on POST /rest/api/3/issue and on PUT /rest/api/3/issue/{issueIdOrKey}. Unlike description it takes a plain string, not an Atlassian Document, and an empty string is rejected.
Endpoints
| Method | Path | What it does |
|---|---|---|
POST | /rest/api/3/issue | Creates a work item with fields.summary. |
PUT | /rest/api/3/issue/{issueIdOrKey} | Changes fields.summary on an existing work item. |
GET | /rest/api/3/issue/{issueIdOrKey}/editmeta | Lists summary as required and settable. |
Examples
POST /rest/api/3/issue
Creates a sub-task with a plain-string summary. The response gives only the id, key and URL.
curl
curl -X POST \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"fields": {
"project": {
"key": "ZZREF"
},
"issuetype": {
"name": "Sub-task"
},
"parent": {
"key": "{issueIdOrKey}"
},
"summary": "Sub-task example"
}
}' \
'https://your-domain.atlassian.net/rest/api/3/issue'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.post(
'https://your-domain.atlassian.net/rest/api/3/issue',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
json={'fields': {'project': {'key': 'ZZREF'},
'issuetype': {'name': 'Sub-task'},
'parent': {'key': '{issueIdOrKey}'},
'summary': 'Sub-task example'}},
)
print(r.status_code, r.text)Response: HTTP 201
{
"id": "10787",
"key": "ZZREF-8",
"self": "https://your-domain.atlassian.net/rest/api/3/issue/10787"
}Sent to Atlassian Cloud on .
PUT /rest/api/3/issue/{issueIdOrKey}
Tries to clear the summary on an existing work item.
curl
curl -X PUT \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"fields": {
"summary": ""
}
}' \
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=summary'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.put(
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=summary',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
params={'returnIssue': 'true', 'fields': 'summary'},
json={'fields': {'summary': ''}},
)
print(r.status_code, r.text)Response: HTTP 400
{
"errorMessages": [],
"errors": {
"summary": "You must specify a summary of the issue."
}
}Response headers
X-Ratelimit-Limit: 300
X-Ratelimit-Remaining: 299Sent to Atlassian Cloud on .
GET /rest/api/3/issue/{issueIdOrKey}/editmeta
Shows how the edit metadata describes the field: required, a string schema and one operation.
curl
curl \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/editmeta'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.get(
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/editmeta',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)Response: HTTP 200
{
"fields": {
"summary": {
"required": true,
"schema": {
"type": "string",
"system": "summary"
},
"name": "Summary",
"key": "summary",
"operations": [
"set"
]
}
}
}Sent to Atlassian Cloud on .
GET /rest/api/3/issue/{issueIdOrKey}
Reads a parent with the subtasks field. Each child shows its summary as a string.
curl
curl -G \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
--data-urlencode 'fields=subtasks' \
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.get(
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
params={'fields': 'subtasks'},
)
print(r.status_code, r.text)Response: HTTP 200
{
"key": "ZZREF-6",
"fields": {
"subtasks": [
{
"key": "ZZREF-8",
"fields": {
"summary": "Sub-task example"
}
}
]
}
}Sent to Atlassian Cloud on .
POST /rest/api/3/search/jql
Asks a search for the summary only. The result reads back as a plain string in fields.summary.
curl
curl -X POST \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"jql": "project = ZZREF AND cf[10162] ~ \"Checkout\"",
"fields": [
"summary"
],
"maxResults": 2
}' \
'https://your-domain.atlassian.net/rest/api/3/search/jql'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.post(
'https://your-domain.atlassian.net/rest/api/3/search/jql',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
json={'jql': 'project = ZZREF AND cf[10162] ~ "Checkout"',
'fields': ['summary'],
'maxResults': 2},
)
print(r.status_code, r.text)Response: HTTP 200
{
"issues": [
{
"key": "ZZREF-6",
"fields": {
"summary": "Fields reference test issue"
}
}
]
}Sent to Atlassian Cloud on .
PUT /rest/api/3/issue/{issueIdOrKey}
Sends null as the summary.
curl
curl -X PUT \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"fields": {
"summary": null
}
}' \
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=summary'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.put(
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=summary',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
params={'returnIssue': 'true', 'fields': 'summary'},
json={'fields': {'summary': None}},
)
print(r.status_code, r.text)Response: HTTP 400
{
"errorMessages": [],
"errors": {
"summary": "Operation value must be a string"
}
}Sent to Atlassian Cloud on .
PUT /rest/api/3/issue/{issueIdOrKey}
Sends a summary of 256 characters.
curl
curl -X PUT \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"fields": {
"summary": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}' \
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=summary'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.put(
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=summary',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
params={'returnIssue': 'true', 'fields': 'summary'},
json={'fields': {'summary': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'}},
)
print(r.status_code, r.text)Response: HTTP 400
{
"errorMessages": [],
"errors": {
"summary": "Summary can't exceed 255 characters."
}
}Sent to Atlassian Cloud on .
How it behaves
- Setting fields.summary to an empty string on PUT answered 400 with errors.summary set to the text You must specify a summary of the issue (sys-summary-empty).
- The edit metadata lists summary with required true, schema type string and the single operation set (editmeta-zz).
- Summary travels as a JSON string in both directions. Create took a string and subtasks, search and issue reads returned one (issue-create-subtask, issue-parent-subtasks, jql-cf-id).
- null is refused with 400 and Operation value must be a string, so summary cannot be cleared that way (sys-summary-null).
- A 256-character value answered 400 with Summary can't exceed 255 characters (sys-summary-long).
Pitfalls
- Do not wrap the summary in an Atlassian Document. That format belongs to description and environment, and summary stays a string.
- Empty and null are both refused, with different messages. Validate the text and its length (255 characters) before the call.
- Setting a summary on update does not need the whole work item. Send only fields.summary and the other fields stay as they were.
Questions and answers
How long can a summary be?
Yes. A value of 256 characters answered 400 with Summary can't exceed 255 characters.
Does summary accept Atlassian Document Format?
No. The field schema is a plain string and every request and response in these examples uses one.