Create a Permission Application
Create a permission application for a data source, database, table, view, or sensitive column. This API does not require administrator permissions, but AccessKey authentication is required.
Endpoint: /openapi/v1/permission/apply/create
Method: POST
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | Permission type: datasource, database, sensitiveColumn, tableView, table, or view. |
| datasource | Object | Yes | Target data source object. See the fields below. |
| databases | Array<String> | No | Database list. |
| schemas | Array<String> | No | Schema list. |
| tables | Array<Object> | No | Table objects. See the fields below. |
| views | Array<Object> | No | View objects. See the fields below. |
| sensitiveColumns | Array<Object> | No | Sensitive-column objects. See the fields below. |
| permissions | Object | No | Permission configuration. See the structure below. |
| reason | String | No | Application reason. |
| days | Integer | No | Validity period in days. |
| sensitiveLevel | Integer | No | Sensitivity level. |
| endDateTime | String | No | Permission end time in ISO 8601 format, for example 2026-08-30T10:00:00Z. |
| approvers | Array<Object> | No | Approver objects. See the fields below. |
| refusal | String | No | Refusal reason. |
datasource object
| Parameter | Type | Required | Description |
|---|---|---|---|
| datasource.datasourceId | String | Yes | Data source ID. |
| datasource.name | String | No | Data source name. |
tables and views objects
| Parameter | Type | Required | Description |
|---|---|---|---|
| database | String | Yes | Database name. |
| schema | String | No | Schema name. |
| name | String | Yes | Table or view name. |
sensitiveColumns object
| Parameter | Type | Required | Description |
|---|---|---|---|
| database | String | Yes | Database name. |
| schema | String | No | Schema name. |
| table | String | Yes | Table name. |
| column | String | Yes | Column name. |
permissions object
The key in permissions is the permission type that matches type; the value is an array of permission actions. For example: {"database": ["Readonly"]}.
approvers object
| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | String | Yes | Approver account ID. |
| accountName | String | No | Approver account name. |
| specifyApprover | Boolean | No | Whether this approver is specified. |
| selfApproval | Boolean | No | Whether self-approval is allowed. |
| status | String | No | Approval status. |
Request example
{
"type": "database",
"datasource": {
"datasourceId": "<datasourceId>",
"name": "example-datasource"
},
"databases": ["example_db"],
"permissions": {
"database": ["Readonly"]
},
"reason": "Need read access",
"endDateTime": "2026-08-30T10:00:00Z"
}
Response parameters
| Parameter | Type | Description |
|---|---|---|
| success | Boolean | Whether the request succeeded. |
| requestId | String | Request ID. |
| data | String | ID of the new permission application. |
Success response
{"success": true, "requestId": "<requestId>", "data": "<applyId>"}