The following requests relate to retrieving custom Course fields via the Litmos API.
Note: All requests must be Authenticated.
Get All course custom fields
Lists all Custom Fields that appear for all courses and their attrabutes
Request Uri
GET /coursecustomfields
Response Body
<CourseCustomFields>
<CourseCustomField>
<CustomFieldId>string [max length 50]</CustomFieldId>
<Label>string</Label>
<DefaultValue></DefaultValue>
<Mandatory>true/false</Mandatory>
<VisibleToLearner>true/false</VisibleToLearner>
<Type></Type>
<Dropdown>
<DropdownId></DropdownId
<DropdownValue></DropdownValue>
</CourseCustomField>
<CourseCustomField>
<CustomFieldId>string [max length 50]</CustomFieldId>
<Label>string</Label>
<DefaultValue></DefaultValue>
<Mandatory>true/false</Mandatory>
<VisibleToLearner>true/false</VisibleToLearner>
<Type></Type>
<Dropdown/>
</CourseCustomField>
...
</CourseCustomFields>
Get Course custom field details based on custom field Id
Retrieve a single Custom Field that appears for all courses and the Custom Field's attributes.
Request Uri
GET coursecustomfields/{CustomFieldId}
Response Body
<CourseCustomField>
<CustomFieldId>string [max length 50]</CustomFieldId>
<Label>string</Label>
<DefaultValue>string</DefaultValue>
<Mandatory>true/false</Mandatory>
<VisibleToLearner>true/false</VisibleToLearner>
<Type>String</Type>
<Dropdown/>
</CourseCustomField>
Get custom fields for a course
To fetch the custom filed value updated inside the course you have to use this API: https://api.litmos.com/v1.svc/courses/COURSEID/coursecustomfields?source=MY_APP
You have to add the course ID(<Id>T9gK1QMskPA1</Id>) in the above URL, which can be captured using this API: (https://api.litmos.com/v1.svc/courses?source=MY_APP&search=courseName)
Below is the sample response body
<parameter>
<fieldname>Organization Name</fieldname>
<value>NCR</value>
</parameter>
<parameter>
<fieldname>Domain Name</fieldname>
<value>Litmos Commerce</value>
</parameter>
</ArrayOfparameter>
Request Uri
GET courses/{CourseId}/coursecustomfields
Request Body
Comments
0 comments
Article is closed for comments.