All Products
Search
Document Center

:CreateDataServiceApiAuthority

更新時間:May 08, 2024

Grants the access permissions on an API in DataService Studio.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

CreateDataServiceApiAuthority

The operation that you want to perform. Set the value to CreateDataServiceApiAuthority.

TenantId

Long

No

1004

The tenant ID.

ProjectId

Long

Yes

10003

The workspace ID.

ApiId

Long

Yes

10001

The API ID.

AuthorizedProjectId

Long

Yes

10002

The ID of the workspace to which the access permissions on the API are granted.

EndTime

Long

Yes

1600531564

The end time of the validity period of the access permissions. The time must be a UNIX timestamp. Unit: seconds. Example: 1600531564, which indicates 2020-09-20 00:06:04 (UTC+8).

Response parameters

Parameter

Type

Example

Description

Success

Boolean

true

Indicates whether the request was successful.

RequestId

String

0000-ABCD-EF****

The request ID.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateDataServiceApiAuthority
&ApiId=10001
&AuthorizedProjectId=10002
&EndTime=1600531564
&ProjectId=10003
&RegionId=cn-shanghai
&TenantId=1004
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<RequestId>0000-ABCD-EFo****</RequestId>
<Success>true</Success>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "0000-ABCD-EFo****",
  "Success" : true
}

Error codes

HTTP status code

Error code

Error message

Description

429

Throttling.Api

The request for this resource has exceeded your available limit.

The number of requests for the resource has exceeded the upper limit.

429

Throttling.System

The DataWorks system is busy. Try again later.

The DataWorks system is busy. Try again later.

429

Throttling.User

Your request is too frequent. Try again later.

Excessive requests have been submitted within a short period of time. Try again later.

500

InternalError.System

An internal system error occurred. Try again later.

An internal error has occurred. Try again later.

500

InternalError.UserId.Missing

An internal system error occurred. Try again later.

An internal error has occurred. Try again later.

For a list of error codes, see Service error codes.