Call the GET /api/v1/models/permissions endpoint to query the list of authorizable or authorized models and their permission details in the current workspace.
Prerequisites
An API key has been created and configured as the environment variable DASHSCOPE_API_KEY. For more information, see Configure an API key in environment variables.
Request
- HTTP method: GET
-
Request URL
Replace
{WorkspaceId}with your workspace ID.Region
Endpoint
China (Beijing)
https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/models/permissions -
Authentication
Set
Authorization: Bearer {API_KEY}in the request header.
Request parameters
All parameters are passed through the query string.
Parameter | Type | Required | Description |
|---|---|---|---|
name | String | No | Fuzzy search by model name. Performs fuzzy matching against |
model | String | No | Exact match by model ID. Performs exact matching against |
page_no | Integer | No | Page number, a positive integer starting from 1. Default value: |
page_size | Integer | No | Number of entries per page, ranging from 1 to 200 (maximum 200). Default value: |
authorization_scope | String | No | Authorization scope filter. Valid values:
Default value: |
action | String | No | Permission action dimension. Valid values: |
Response parameters
Parameter | Type | Description |
|---|---|---|
request_id | String | The request ID. Example: |
code | String | Error code. |
message | String | Error message. |
success | Boolean | Whether the call succeeded. Example: |
output.total | Number | Total number. Example: |
output.page_no | Number | Page number. Example: |
output.page_size | Number | Number of entries per page. Example: |
output.permissions | Array[Object] | Permission list. See the sample response. |
output.model | String | The model ID. Example: |
output.name | String | Display name of the model. Example: |
output.permissions[].permissions | Object | Permission details. Example:
|