Updated on 2024-12-04 GMT+08:00

Setting a Shared Link

Function

This API is used to add a shared link.

URI

POST /v3/{project_id}/connections/share

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

To obtain this value, see Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

X-Language

No

String

Language.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

shared_conn_id

Yes

String

ID of a shared link.

expired_time

No

String

Expiration time.

users

Yes

Array of ShareConnUserInfo objects

User.

Table 4 ShareConnUserInfo

Parameter

Mandatory

Type

Description

user_id

Yes

String

User ID.

user_name

Yes

String

Username.

Response Parameters

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum length: 8 characters

Maximum length: 36 characters

error_msg

String

Error message.

Minimum length: 2 characters

Maximum length: 512 characters

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum length: 8 characters

Maximum length: 36 characters

error_msg

String

Error message.

Minimum length: 2 characters

Maximum length: 512 characters

Example Request

Setting a shared link

POST https://{{endpoint}}/v3/{{project_id}}/connections/share 
{ 
  "shared_conn_id": "ee64e597-4f25-486f-bba1-0c850b3b59d6", 
  "users": [ 
    { 
      "user_id": "0852a89ae180d5401f5ac00271a4a02e", 
      "user_name": "username" 
    } 
  ], 
  "expired_time": "2023-05-03T10:30:00.200Z" 
}

Example Response

None

Status Codes

Status Code

Description

200

Success

400

Bad request

500

Internal server error

Error Codes

See Error Codes.