Not able add terms with children property in a framework #180
Closed
ramkumar-pacewisdom
started this conversation in
Bugs
Replies: 1 comment 7 replies
-
@ramkumar-pacewisdom In the above request, you are trying to create child terms as part of parent teams creation, which is wrong. Please create child teams independently using the same API and add them as children as shown below request. Step 1: Create child terms first Create child teams using the below Request
Step 2: Create parent term and add childerns to it.
|
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prerequisites
I have searched for existing issues that already report this problem, without success.
Current Behaviour
I'm trying to add terms in framework with children properties, it should return success status. But it's throwing 500 internal server error.
Expected Behaviour
While the user adding the terms in framework using "terms create" API end point, It should return success status.
Steps to Reproduce
API Endpoints used in create/upload flow
CURL
curl --location --request POST 'https://dev.sunbirded.org/api/framework/v1/term/create?framework=<FRAMEWORK_ID>&category=<CATEGORY_ID>' \ --header 'Content-Type: application/json' \ --header '<TOKEN> \ --header 'X-Channel-Id: <CHANNEL_ID>' \ --data '{ "request": { "term": { "code": "Other Curriculum Subjects", "name": "Other Curriculum Subjects", "label":"Other Curriculum Subjects", "description": "Other Curriculum Subjects", "children": [ { "code": "ST_Physical Education", "name": "Physical Education", "label": "Physical Education", "description": "Physical Education" }, { "code": "ST_Economics", "name": "Economics", "label": "Economics", "description": "Economics" }, { "code": "ST_Mathematics", "name": "Mathematics", "label": "Mathematics", "description": "Mathematics" }, { "code": "ST_Accountancy", "name": "Accountancy", "label": "Accountancy", "description": "Accountancy" }, { "code": "ST_Business Studies", "name": "Business Studies", "label": "Business Studies", "description": "Business Studies" }, { "code": "ST_Psychology", "name": "Psychology", "label": "Psychology", "description": "Psychology" }, { "code": "ST_Education", "name": "Education", "label": "Education", "description": "Education" } ] } } } '
Error Response
{ "id": "api.term.create", "ver": "1.0", "ts": "2024-01-19T03:50:10.528Z", "params": { "resmsgid": "d7f35600-b67d-11ee-b7cc-a7f3aa45b5e1", "msgid": null, "status": "failed", "err": "ERR_SERVER_ERROR", "errmsg": "Internal Server Error" }, "responseCode": "SERVER_ERROR", "result": {} }
Additional Information
Reference document for Framework creation : https://project-sunbird.atlassian.net/l/cp/DQ8cAQVX
Tested on Google Chrome: Version 119.0.6045.199 (Official Build) (arm64)
can someone help on this.
cc: @kiranharidas187
Beta Was this translation helpful? Give feedback.
All reactions