Hello,
I am trying to get metadata of available fields in a Cloud platform using /rest/api/2/field
. I am interested particularly in the Parent field. I get the following result:
{
"id": "parent",
"key": "parent",
"name": "Parent",
"custom": false,
"orderable": false,
"navigable": true,
"searchable": false,
"clauseNames": [
"parent"
]
}
However, I don’t see the schema
property like the TimeSpent field for example:
{
"id": "timespent",
"key": "timespent",
"name": "Time Spent",
"custom": false,
"orderable": false,
"navigable": true,
"searchable": false,
"clauseNames": [
"timespent"
],
"schema": {
"type": "number",
"system": "timespent"
}
}
is this normal?
Thank you for your response.
I can get the parent’s schema
if I use /api/2/issue/createmeta
. Is there any explanation behind this behaviour?
You seem to jumbling up lots of different things. The metadata
of the parent Issue type has nothing to do with the schema
of the Field called Parent.
You might want to spend some time re-reading the REST API documentation, especially stuff about Issue parent / child relationships, to better understand the objects that you are interacting with and their purpose.
Have fun on your learning journey.
I think I was not clear enough. By metadata
I meant the API result/info of available fields, in particular, the field Parent .
If I can rephrase my question, according to the doc, both /field and /createmeta (given the projectkey and issuetypeId parameters) will returns “fields”, let’s ignore the rules/context for now. Is the Parent field returned by /field
the same Parent field returned by /createmeta
?
If not, could you please point me to the doc where they explain the difference?