@IanAtJMP - I think you have two errors in your REST call: Firstly, you need to check your APIv1 request. I think you need to add an additional "/labels" path parameter to get a list of labels for your category: <#-- APIv1 request: <a href="https://community-stage.jmp.com/restapi/vc/categories/id/[id]/labels/labels" target="_blank">https://community-stage.jmp.com/restapi/vc/categories/id/[id]/labels/labels</a> -->
<#assign someLabels = restadmind("/${context}/id/${contextId}/labels/labels?restapi.response_format=json") /> Take a look into the developers docs and APIv1 reference. Secondly, to access the labels from the API response you need to access the labels object of the response. Your request will return something similar the example below: {
"response": {
"status": "success",
"labels": {
"label": [
{
"type": "label",
"href": "/labels/id/1985",
"text": {
"type": "string",
"$": "Festnetz | Internet | Fernsehen"
},
"id": {
"type": "int",
"$": 1985
}
},
{
"type": "label",
"href": "/labels/id/1982",
"text": {
"type": "string",
"$": "Sonstiges"
},
"id": {
"type": "int",
"$": 1982
}
},
}
]
}
} The have access to the label values, you have to access your Freemarker variable like this: <#assign labels = someLabels.labels.label /> Be aware to add checks for empty responses or lists. Otherwise you will get Freemarker errors for accessing non-existing objects.
... View more