Solved
Assets API: Unable to Create Content Fragment via post request.
I am trying to create content fragment using Assets API via POST request. Here's how my JSON looks like:
{
"class": [
"assets/asset"
],
"properties": {
"description": "Content Cateogry: Mutation-Example-02",
"title": "Mutation-Example-02",
"contentFragment": true,
"createdBy": "shivam_sahil@optum.com",
"elementsOrder": [
"title",
"uri"
],
"elements": {
"title": {
"variationsOrder": [],
"translatable": true,
":type": "string",
"variations": {},
"dataType": "string",
"title": "Title",
"multiValue": false,
"value": "Mutation Example"
},
"uri": {
"variationsOrder": [],
"translatable": true,
":type": "string",
"variations": {},
"dataType": "string",
"title": "URI",
"multiValue": false,
"value": "health-resources/mutation-example-02"
}
},
"name": "Mutation-Example-02"
}
}
Endpoint:
However this fails with 500 internal server error. Can someone tell me the right structure of JSON?
I am having content fragment model category as shown below:
title: string (Text Field)
uri: string (Text Field)