Going Stellar

Home/Atlassian REST API reference

Jira and Confluence Cloud REST API

Jira editmeta: which fields a work item can edit

GET /rest/api/3/issue/{issueIdOrKey}/editmeta lists the fields the calling user can edit on that work item, with required, schema, operations and, for some fields, allowedValues. It answers what the Edit endpoint will accept before you send the request.

Endpoints

MethodPathWhat it does
GET/rest/api/3/issue/{issueIdOrKey}/editmetaReturns the edit screen fields visible to and editable by the user.

Examples

GET /rest/api/3/issue/{issueIdOrKey}/editmeta

Read the editable fields of one work item. The excerpt shows summary, the issue type with its allowed values, and labels.

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"
   ]
  },
  "issuetype": {
   "name": "Issue Type",
   "required": true,
   "operations": [],
   "allowedValues": [
    {
     "id": "10081",
     "name": "Task",
     "subtask": false
    },
    {
     "id": "10082",
     "name": "Story",
     "subtask": false
    }
   ]
  },
  "labels": {
   "required": false,
   "schema": {
    "type": "array",
    "items": "string",
    "system": "labels"
   },
   "name": "Labels",
   "key": "labels",
   "autoCompleteUrl": "https://your-domain.atlassian.net/rest/api/1.0/labels/10766/suggest?query=",
   "operations": [
    "add",
    "set",
    "remove"
   ]
  }
 }
}

Response headers

X-Ratelimit-Limit: 350
X-Ratelimit-Remaining: 348

Sent to Atlassian Cloud on .

PUT /rest/api/3/issue/{issueIdOrKey}

An id that is not in editmeta is refused by the edit call.

curl

curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "customfield_99999": "x"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'fields': {'customfield_99999': 'x'}},
)
print(r.status_code, r.text)

Response: HTTP 400

{
 "errorMessages": [],
 "errors": {
  "customfield_99999": "Field 'customfield_99999' cannot be set. It is not on the appropriate screen, or unknown."
 }
}

Sent to Atlassian Cloud on .

PUT /rest/api/3/issue/{issueIdOrKey}

Labels list add, set and remove in editmeta, so an update with add and remove succeeds.

curl

curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "update": {
    "labels": [
      {
        "add": "gamma"
      },
      {
        "remove": "alpha"
      }
    ]
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=labels'

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=labels',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'labels'},
    json={'update': {'labels': [{'add': 'gamma'}, {'remove': 'alpha'}]}},
)
print(r.status_code, r.text)

Response: HTTP 200

{
 "expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
 "id": "10766",
 "self": "https://your-domain.atlassian.net/rest/api/3/issue/10766",
 "key": "WEB-55",
 "fields": {
  "labels": [
   "beta",
   "gamma"
  ]
 }
}

Sent to Atlassian Cloud on .

How it behaves

  • The response is an object with one key, fields, mapping each field id to required, schema, name, key and operations.
  • issuetype appears with operations: [] (not editable through this call) and lists the allowed issue types under allowedValues.
  • summary and reporter are flagged required: true; labels is required: false with operations add, set and remove.
  • Custom fields appear under their customfield_ ids with the display name beside them.

Pitfalls

  • editmeta is per work item and per user. A field missing from it can still exist on the work item but be hidden by screen, permission or workflow settings.
  • A required: true flag describes the field, not a need to resend it. The summary edit in the examples worked without sending reporter.
  • An empty operations array means the field shows up but is not changed through the edit call.
  • Use createmeta, not editmeta, to build a create body. The two lists differ.

Questions and answers

Why is a field I can see in the UI missing?

The spec lists several conditions: the field must be on the screen, visible in the field configuration, valid in context, and the workflow step must be editable.

Does editmeta support expand?

No expand parameter appears in the spec for this endpoint. It takes overrideScreenSecurity and overrideEditableFlag for privileged app users only.

Sources

  1. The Jira Cloud platform REST API v3 (Atlassian Developer)
  2. Get edit issue metadata (Jira REST API v3)

Markdown version · All REST API pages