Get a user's enrollments
Resource URL
URL: user/enrollments
Parameters
string username | Username |
string password | Password |
string userId | Trainingportal internal ID of the user |
string userExternalId optional | External ID of the user. Either userId or userExternalId must be filled |
string language | Language, available values are: |
Return value
The method returns a list of enrollments the user has. Each item in the list has the following properties:
courseName | Name of course |
enrollmentReferenceId | Reference for the enrollment. Used for getting course certificate |
courseId | Trainingportal ID for the course |
courseExternalId | External ID for the course |
completionDate | yyyy-MM-dd - the date when course was completed. Empty value indicates, that the course is not yet completed |
validUntilDate | yyyy-MM-dd - if a course has validity period, than this indicates the time it expires |
certificateAvailable | Whether a certificate is available. Possible values are: true / false |
enrollmentStatus | Status of the enrollment.
|
Example request
URL | |
POST DATA | userExternalId=a001&language=en&username=username&password=secret |
{ "enrollments": [
{ "courseName":"ABC Test",
"enrollmentReferenceId":"aasd-1234-zcvqwer-qasdfasdf",
"courseId":1234,
"courseExternalId":"aaa001",
"completionDate": "2011-05-10",
"enrollmentStatus": "APPROVED",
"validUntil": null,
"certificateAvailable": true
},
{ "courseName":"CDE Test"
"enrollmentReferenceId":"aaqfqwsd-1234-2werff-vbdfr",
"courseId":1235,
"courseExternalId":"aaa002",
"completionDate": null,
"enrollmentStatus": "APPROVED",
"validUntil": null,
"certificateAvailable": false
}
]
}