-
When we try to create a course, we are getting validation error "Metadata programs should be one of: [Nipun Bharat (FLN), Adult Education, Vocational Education, CWSN, Virtual Labs]" {"id":"api.hierarchy.update","ver":"1.0","ts":"2023-05-10T06:57:19.689Z","params":{"resmsgid":"e820d390-eeff-11ed-999c-e79edbde7d8c","msgid":null,"status":"failed","err":"CLIENT_ERROR","errmsg":"Metadata programs should be one of: [Nipun Bharat (FLN), Adult Education, Vocational Education, CWSN, Virtual Labs]"},"responseCode":"CLIENT_ERROR","result":{}} Here the value in the array is not program but it is verticals. {"code":"verticals","dataType":"list","description":"Verticals","editable":true,"inputType":"nestedselect","renderingHints":{"class":"sb-g-col-lg-1"},"label":"Verticals","name":"Verticals","placeholder":"Select Verticals","required":false,"visible":true,"range":["Nipun Bharat (FLN)","Adult Education","Vocational Education","CWSN","Virtual Labs"]}, {"code":"programs","dataType":"list","description":"Programs","editable":true,"inputType":"nestedselect","renderingHints":{"class":"sb-g-col-lg-1"},"label":"Programs","name":"Programs","placeholder":"Select Programs","required":false,"visible":true,"range":["NISHTHA 2.0","NISHTHA 3.0","Bhasha Sangam"]} PATCH Request URL: https://diksha.gov.in/action/content/v3/hierarchy/update {"id":"api.hierarchy.update","ver":"1.0","ts":"2023-05-10T06:57:19.689Z","params":{"resmsgid":"e820d390-eeff-11ed-999c-e79edbde7d8c","msgid":null,"status":"failed","err":"CLIENT_ERROR","errmsg":"Metadata programs should be one of: [Nipun Bharat (FLN), Adult Education, Vocational Education, CWSN, Virtual Labs]"},"responseCode":"CLIENT_ERROR","result":{}} Can you please shed some light why it is validating programs against the verticals? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@amitpriyadarshi do look at this .. this look like a form configuration issue |
Beta Was this translation helpful? Give feedback.
-
This issue is fixed now. In Object category Definition of the test channel "0123221758376673287017", the range of Programs have been wrong set to verticals range values.
API documentation: |
Beta Was this translation helpful? Give feedback.
This issue is fixed now. In Object category Definition of the test channel "0123221758376673287017", the range of Programs have been wrong set to verticals range values.
As recommended by maheshkumargangula, category definition was corrected using Object Category Definition Update API. It works fine now(Thanks to Mahesh)
API documentation:
http://docs.sunbird.org/latest/apis/objectcategory/#operation/Update%20Object%20Category%20Definition