Skip to main content

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​

ParameterTypeRequiredDescription
typeStringYesPermission type: datasource, database, sensitiveColumn, tableView, table, or view.
datasourceObjectYesTarget data source object. See the fields below.
databasesArray<String>NoDatabase list.
schemasArray<String>NoSchema list.
tablesArray<Object>NoTable objects. See the fields below.
viewsArray<Object>NoView objects. See the fields below.
sensitiveColumnsArray<Object>NoSensitive-column objects. See the fields below.
permissionsObjectNoPermission configuration. See the structure below.
reasonStringNoApplication reason.
daysIntegerNoValidity period in days.
sensitiveLevelIntegerNoSensitivity level.
endDateTimeStringNoPermission end time in ISO 8601 format, for example 2026-08-30T10:00:00Z.
approversArray<Object>NoApprover objects. See the fields below.
refusalStringNoRefusal reason.

datasource object​

ParameterTypeRequiredDescription
datasource.datasourceIdStringYesData source ID.
datasource.nameStringNoData source name.

tables and views objects​

ParameterTypeRequiredDescription
databaseStringYesDatabase name.
schemaStringNoSchema name.
nameStringYesTable or view name.

sensitiveColumns object​

ParameterTypeRequiredDescription
databaseStringYesDatabase name.
schemaStringNoSchema name.
tableStringYesTable name.
columnStringYesColumn 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​

ParameterTypeRequiredDescription
accountIdStringYesApprover account ID.
accountNameStringNoApprover account name.
specifyApproverBooleanNoWhether this approver is specified.
selfApprovalBooleanNoWhether self-approval is allowed.
statusStringNoApproval 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​

ParameterTypeDescription
successBooleanWhether the request succeeded.
requestIdStringRequest ID.
dataStringID of the new permission application.

Success response​

{"success": true, "requestId": "<requestId>", "data": "<applyId>"}