Petition Details
- Base URL: {host}/ASMSAPI/
- URI: api/v9/user/{Id}/usercompanies
- Type: GET
- Required headings: content-type: application/json
- X-Authorization: Bearer {token}
URL Description
- {host}: It represents the domain of the environment in which the API is located.
- ASMSAPI/: Fixed API prefix.
- URI: Specific endpoint for the request.
⚐ EXAMPLE URL:
https://{host}/ASMSAPI/api/v9/user/{Id}/usercompanies
Parameters:
Name | Data type | Obligatory | Description |
---|---|---|---|
Id | Int | yes | User ID |
Body of the petition: N/A
Answer
{
"totalItems": 2,
"content": [
{
"companytId": 1,
"companyName": "Empresa AT",
"projects": [
{
"projectId": 4,
"projectName": "Soporte"
}
]
},
{
"companytId": 6,
"companyName": "Empresa4",
"projects": [
{
"projectId": 4,
"projectName": "Soporte"
}
]
}
]
}
⚐ Note: The request returns the company associated with the user consulted and the project to which it belongs.
Parameters
Name | Data type | Description |
---|---|---|
companyId | Int | Company Identifier |
companyName | String | Company Name |
projects | List | List of projects related to the company |
projects.projectId | Int | Project ID related to the company |
projects.projectName | String | Name of the project related to the company |
Exceptions:
Exit | Description |
---|---|
exceptionMessage : “InvalidClientUser”,message : “FailureGetUserCompanies”,operation : “GetUserCompanies”,serviceName : “User” |
The queried user does not exist or is not defined as a client |