To retrieve a single Organization of a User, please make a GET request to the following URL:
| HTTP Method | URL |
|---|
| GET | https://industrial.api.ubidots.com/api/v2.0/users/<user_key>/organizations/<organization_key>/ |
| Parameter | Type | Use |
|---|
| user_key | String | The id or username of the User, username should use the prefix ~ |
| organization_key | String | The id or label of the Organization, label should use the prefix ~ |
| Parameter | Type | Use | Description |
|---|
| token | String | Authentication | Authorization Token can optionally be sent as a query parameter. |
$ curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/users/~john-doe/organizations/~my-third-customer/' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73'
{
"url": "https://industrial.api.ubidots.com/api/v2.0/organizations/62b4eb3519cd98007bf410bf",
"id": "62b4eb3519cd98007bf410bf",
"label": "my-third-customer",
"name": "Cliente1",
"createdAt": "2022-06-23T22:37:41.840643Z",
"role": {
"url": "https://industrial.api.ubidots.com/api/v2.0/roles/viewer",
"label": "viewer",
"name": "Viewer",
"createdAt": "2022-06-02T13:06:50.616480Z"
}
}
{
"code": 401002,
"message": "Incorrect authentication credentials."
}
{
"code": 404001,
"message": "The request was not found.",
"detail": "The request was not found."
}
Returns the Organization Object (summary fields) with the role the User has in it. Returns 404 if the User is not assigned to that Organization.