...
Find below an request to enable relational metadata to asset linked to a collection form with Name( text
) & Keywords( list
) etc., fields.
(Note: Please make sure before adding a new field in the form, all the properties must be available in the pre-defined schema. Otherwise, the system will throw an error message. And it’ll not allow saving the relational metadata at the API level.)
Please check
Here is the below link before adding a new/existing field:
schema link: https://github.com/Sunbird-Ed/creation-portal/blob/release-4.7.0/kp_schemas/relationalmetadata/1.0/schema.json
Request Body:
Code Block | ||
---|---|---|
| ||
{ "request": { "objectCategoryDefinition": { "forms": { "relationalMetadata": { "templateName": "", "required": [], "properties": [ { "code": 'relName', "dataType": 'text', "description": 'Name of the content', "editable": true, "inputType": 'text', "label": 'Title', "name": 'Title', "placeholder": 'Title', "renderingHints": { "class": 'sb-g-col-lg-1 required' }, "required": true, "visible": true, "validations": [ { "type": 'maxLength', "value": '120', "message": 'Input is Exceeded' }, { "type": 'required', "message": 'Title is required' } ] }, { "code": 'keywords', "visible": true, "editable": true, "dataType": 'list', "name": 'Keywords', "renderingHints": { "class": 'sb-g-col-lg-1' }, "description": 'Keywords for the content', "inputType": 'keywords', "label": 'Keywords', "placeholder": 'Input the keyword and PRESS enter', "required": false, "validations": [] } ] } } } } } |
...