Subject Json Format on Rest API

Hi,

I want to make a call onto the REST API to create some documents but I am unsure what format I should provide for the subjects (the only examples I can find online are empty lists, like the one below).

“properties”: {

        "dc:title": "title",
        "dc:description":"Description",
        "dc:subjects": []          
}

Can you please provide me with the format to populate subjects?

Thanks, Lynn

0 votes

1 answers

1711 views

ANSWER



Hello,

the dc:subjects property is an array of string, so you just have to use the JSON array notation like

"dc:subject":["art","litterature"]

If you want to see what is the correct representation for other types, you can change the data in nuxeo DM and query the doc with the REST API : then you'll get the correct format

0 votes