Get competence attachments for a user
Resource URL
URL: competenceUser/attachments
Parameters
string username | Username |
string password | Password |
int userId | Unique identifier of the user |
string userExternalId | Unique external identifier of the user. Either userId or userExternalId must be filled. |
int competenceId optional | Unique identifier of the competence |
int competenceExternalId optional | Unique external identifier of the competence. Either competenceId or competenceExternalIdmust be filled. |
Return value
The method returns a list of attachments. Each item in the list has the following properties:
attachmentType | COMPETENCE_CERTIFICATE or OTHER |
mimetype | content mimetype |
attachmentByteArray | base64-encoded binary content of the attachment file |
Example request
URL | https://www.trainingportal.no/mintra/rest/competenceUser/attachments |
POST DATA | userId1&competenceId=2&username=username&password=secret |
{"attachments":
[{
"attachmentType": "COMPETENCE_CERTIFICATE",
"mimetype": "application/pdf",
"attachmentByteArray": "base64-encoded binary content"
}, {
"attachmentType": "OTHER",
"mimetype": "application/x-zip-compressed",
"attachmentByteArray": "base64-encoded binary content"
}]
}