Get a user's organization units
Resource URL
URL: user/organizationUnits
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 |
Return value
The method returns a list of organization units the user belongs to. Each item in the list has the following properties:
name | Name of the unit |
externalId | External ID of the unit |
status | ACTIVE, INACTIVE or NEEDS_CONFIRMATION |
Example request
URL | https://www.trainingportal.no/mintra/rest/user/organizationUnits |
POST DATA | userExternalId=a001&username=username&password=secret |
{
"organizationUnits": [
{ "name":"Technical",
"externalId":"tech001",
"status":"ACTIVE"
},
{ "name":"HR",
"externalId":"hr001",
"status":"NEEDS_CONFIRMATION"
}
]
}