Obtaining All Service Principals
Function
This API is used to obtain all service principals.
Authorization Information
No identity policy-based permission required for calling this API.
URI
GET /v5/service-principals
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
limit |
No |
Integer |
Number of records displayed on each page. The value ranges from 1 to 200. The default value is 100. Minimum: 1 Maximum: 200 Default: 100 |
|
marker |
No |
String |
Pagination marker. The value contains 4 to 400 characters, including only letters, digits, and the following special characters: +/=-_ Minimum: 4 Maximum: 400 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Language |
No |
String |
Language of the returned message. The value can be zh-cn or en-us and is zh-cn by default. Default: zh-cn |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
service_principals |
Array of ServicePrincipalMetadata objects |
List of service principals. |
|
page_info |
PageInfo object |
Pagination information. |
|
Parameter |
Type |
Description |
|---|---|---|
|
service_principal |
String |
Service principal, which starts with service. and is followed by a string of 1 to 56 characters containing only letters, digits, and hyphens (-). |
|
service_catalog |
String |
Cloud service name. Minimum: 1 Maximum: 64 |
|
display_name |
String |
Service principal name for display. |
|
description |
String |
Service principal description. |
|
Parameter |
Type |
Description |
|---|---|---|
|
next_marker |
String |
If this parameter exists, there are subsequent items that are not displayed in the current response body. The value can be used as the pagination marker parameter for the next request to obtain information about the next page. This API can be repeatedly called until this field does not exist. |
|
current_count |
Integer |
Number of items returned on this page. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
Obtaining all service principals
GET https://{endpoint}/v5/service-principals
Example Responses
Status code: 200
Successful
{
"service_principals" : [ {
"service_principal" : "service.xxx",
"service_catalog" : "XXX",
"display_name" : "display_name",
"description" : "description"
} ],
"page_info" : {
"next_marker" : "marker",
"current_count" : 1
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successful |
|
400 |
Bad request |
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