Rest API - Metadata for Jira 4.0 and 4.1
You can create/read/update/delete metadata value via UI or the following Rest API
Version 1.0
APIs
Base path for the Rest API: Jira_Base_Url/rest/metadata/1.0
e.g. get all metadata for project JM (as project-admin): https://jira.atlassian.internal/rest/metadata/1.0/project/JM?includeHidden=true
/component/{projectkey}/{identifier}
GET
get all metadata for a given object (e.g. version/component) as object array
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
includeHidden | query | no | will include the hidden metadata values, if the user has the permission to edit (create/update) metadata values | >boolean |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | Array[ JiraMetadata ] |
PUT
create / update metadata as object array
Request
**Content-Type: ** application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
JiraMetadata | body | yes | the to change metadata object array | Array[ JiraMetadata ] |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | Array[ JiraMetadata ] |
400 | the specified version/component can't be loaded | |
403 | User has no permission to create / update metadata |
/component/{projectkey}/{identifier}/{key}
GET
get the specified metadata
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation |
PUT
create / update one metadata
Request
**Content-Type: ** application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string | |
JiraMetadata | body | yes | the to change metadata |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | |
400 | the given key doesn't match to the key of the JiraMetadata object, the specified version/component can't be loaded or something went wrong while loading the saved metadata | |
403 | User has no permission to create / update metadata | |
500 | something went wrong while saving the metadata |
DELETE
delete the specified metadata
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** text/plain
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
400 | the specified version/component can't be loaded | |
403 | User has no permission to create / update metadata | |
404 | there is no metadata object with the given key |
/component/{projectkey}/{identifier}/{key}/value
GET
get the specified metadata value
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** text/plain
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation |
/group/{identifier}
GET
get all metadata for a given object (e.g. project/group/user) as object array
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
includeHidden | query | no | will include the hidden metadata values, if the user has the permission to edit (create/update) metadata values | >boolean |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | Array[ JiraMetadata ] |
PUT
create / update metadata as object array
Request
**Content-Type: ** application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
JiraMetadata | body | yes | the to change metadata object array | Array[ JiraMetadata ] |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | Array[ JiraMetadata ] |
403 | User has no permission to create / update metadata |
/group/{identifier}/{key}
GET
get the specified metadata
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation |
PUT
create / update one metadata
Request
**Content-Type: ** application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string | |
JiraMetadata | body | yes | the to change metadata |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | |
400 | the given key doesn't match to the key of the JiraMetadata object or something went wrong while loading the saved metadata | |
403 | User has no permission to create / update metadata | |
500 | something went wrong while saving the metadata |
DELETE
delete the specified metadata
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** text/plain
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
403 | User has no permission to create / update metadata | |
404 | there is no metadata object with the given key |
/group/{identifier}/{key}/value
GET
get the specified metadata value
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** text/plain
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation |
/project/{identifier}
GET
get all metadata for a given object (e.g. project/group/user) as object array
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
includeHidden | query | no | will include the hidden metadata values, if the user has the permission to edit (create/update) metadata values | >boolean |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | Array[ JiraMetadata ] |
PUT
create / update metadata as object array
Request
**Content-Type: ** application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
JiraMetadata | body | yes | the to change metadata object array | Array[ JiraMetadata ] |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | Array[ JiraMetadata ] |
403 | User has no permission to create / update metadata |
/project/{identifier}/{key}
GET
get the specified metadata
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation |
PUT
create / update one metadata
Request
**Content-Type: ** application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string | |
JiraMetadata | body | yes | the to change metadata |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | |
400 | the given key doesn't match to the key of the JiraMetadata object or something went wrong while loading the saved metadata | |
403 | User has no permission to create / update metadata | |
500 | something went wrong while saving the metadata |
DELETE
delete the specified metadata
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** text/plain
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
403 | User has no permission to create / update metadata | |
404 | there is no metadata object with the given key |
/project/{identifier}/{key}/value
GET
get the specified metadata value
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** text/plain
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation |
/user/{identifier}
GET
get all metadata for a given object (e.g. project/group/user) as object array
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
includeHidden | query | no | will include the hidden metadata values, if the user has the permission to edit (create/update) metadata values | >boolean |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | Array[ JiraMetadata ] |
PUT
create / update metadata as object array
Request
**Content-Type: ** application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
JiraMetadata | body | yes | the to change metadata object array | Array[ JiraMetadata ] |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | Array[ JiraMetadata ] |
403 | User has no permission to create / update metadata |
/user/{identifier}/{key}
GET
get the specified metadata
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation |
PUT
create / update one metadata
Request
**Content-Type: ** application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string | |
JiraMetadata | body | yes | the to change metadata |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | |
400 | the given key doesn't match to the key of the JiraMetadata object or something went wrong while loading the saved metadata | |
403 | User has no permission to create / update metadata | |
500 | something went wrong while saving the metadata |
DELETE
delete the specified metadata
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** text/plain
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
403 | User has no permission to create / update metadata | |
404 | there is no metadata object with the given key |
/user/{identifier}/{key}/value
GET
get the specified metadata value
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
identifier | path | yes | the project/group/user identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** text/plain
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation |
/version/{projectkey}/{identifier}
GET
get all metadata for a given object (e.g. version/component) as object array
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
includeHidden | query | no | will include the hidden metadata values, if the user has the permission to edit (create/update) metadata values | >boolean |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | Array[ JiraMetadata ] |
PUT
create / update metadata as object array
Request
**Content-Type: ** application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
JiraMetadata | body | yes | the to change metadata object array | Array[ JiraMetadata ] |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | Array[ JiraMetadata ] |
400 | the specified version/component can't be loaded | |
403 | User has no permission to create / update metadata |
/version/{projectkey}/{identifier}/{key}
GET
get the specified metadata
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation |
PUT
create / update one metadata
Request
**Content-Type: ** application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string | |
JiraMetadata | body | yes | the to change metadata |
Response
**Content-Type: ** application/json
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation | |
400 | the given key doesn't match to the key of the JiraMetadata object, the specified version/component can't be loaded or something went wrong while loading the saved metadata | |
403 | User has no permission to create / update metadata | |
500 | something went wrong while saving the metadata |
DELETE
delete the specified metadata
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** text/plain
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
400 | the specified version/component can't be loaded | |
403 | User has no permission to create / update metadata | |
404 | there is no metadata object with the given key |
/version/{projectkey}/{identifier}/{key}/value
GET
get the specified metadata value
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
projectkey | path | yes | the project key | >string | |
identifier | path | yes | the version/component identifier | >string | |
key | path | yes | the user-defined key of the metadata | >string |
Response
**Content-Type: ** text/plain
Status Code | Reason | Response Model |
------------- | ------------- | ---------------- |
200 | successful operation |
Json-Objects
JiraMetadata
name | type | required | description | example |
---|---|---|---|---|
key | string | required | the userdefined key of the metadata | |
group | string | optional | ||
value | string | optional | ||
hidden | boolean | optional |