Querying the Application Organization List
Function
This API is used to query the list of organizations that are authorized to access an application.
Constraints
null
URI
GET /api/v2/tenant/applications/{application_id}/organizations
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
application_id |
Yes |
String |
Application ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
Yes |
Integer |
Page number. |
limit |
Yes |
Integer |
Number of data records on each page. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Authorization |
Yes |
String |
Authentication credential. The value is "Bearer {access_token}". access_token is obtained by calling the API for obtaining an access credential. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Long |
Total number of application organizations. |
organizations |
Array of ApplicationOrg objects |
Organization list. |
Parameter |
Type |
Description |
---|---|---|
org_id |
String |
Application organization ID. |
org_code |
String |
Application organization code. |
name |
String |
Application organization name. |
parent_id |
String |
Parent organization ID. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error details. |
Example Requests
Query the organization list in an application by application ID in the pagination mode. The first 100 data records are returned. If the number of data records is less than 100, all data records are returned.
GET https://{domain_name}/api/v2/tenant/applications/{application_id}/organizations?offset=0&limit=100 Authorization: Bearer 334963fc-1e4a-473b-9096-52a929140...
Example Responses
Status code: 200
Request successful.
{ "total" : 1, "organizations" : [ { "org_id" : "20210623103520050-C5AF-DD1A97...", "org_code" : "10000", "name" : "Headquarter", "parent_id" : null }, { "org_id" : "20210619175409400-BFA4-63FA63...", "org_code" : "10001", "name" : "Development Group", "parent_id" : "20210623103520050-C5AF-DD1A97..." } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Request successful. |
400 |
Invalid parameter. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot