I am using ScriptRunner to try to manipulate Asset objects. I want to get the list of Attributes defined in my schema. When I run the following code, I get back the Scheme information:
get("${base()}/objectschema/2")
.header('Authorization',auth())
.header('Content-Type', 'application/json')
.asObject(Map)
This results in (identifiers are removed intentionally)
{
"workspaceId": "******",
"globalId": "*****:2",
"id": "2",
"name": "****",
"objectSchemaKey": "****",
"status": "Ok",
"description": "",
"created": "2023-10-18T19:54:31.806Z",
"updated": "2023-10-18T19:54:31.808Z",
"objectCount": 5911,
"objectTypeCount": 8,
"canManage": false,
"idAsInt": 2
} Adding "attributes" to the end of the call as such return a null body
get("${base()}/objectschema/2/attributes")
.header('Authorization',auth())
.header('Content-Type', 'application/json')
.asObject(Map) What am I doing wrong?