Updated on 2023-04-26 GMT+08:00

Processing an Invitation

Function

Processing an Invitation

URI

POST /v2/{project_id}/notification/handle

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID obtained from IAM. Generally, a project ID contains 32 characters.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Account token.

Minimum: 1

Maximum: 32768

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

channel_name

Yes

String

Channel in the invitation.

status

Yes

String

Invitation status.

Enumeration values:

  • agreed

  • reject

invitor_info

Yes

HandleNotificationInvitor object

Inviting party information.

invitee_info

No

HandleNotificationInvitee object

Invitee information. This parameter is required when an invitation is accepted.

invited_orgs

No

Array of HandleNotificationOrg objects

Organizations joining the consortium. This parameter is required when an invitation is accepted.

Table 4 HandleNotificationInvitor

Parameter

Mandatory

Type

Description

invitor_bcs_id

Yes

String

BCS service ID of the inviting party.

invitor_bcs_name

Yes

String

BCS service name of the inviting party.

invitor_project_id

Yes

String

Project ID of the inviting party.

invitor_user_id

Yes

String

Tenant ID of the inviting party. Log in to the BCS console as an inviting party, click the account name, and click My Credentials > API Credentials to obtain the Account ID.

Table 5 HandleNotificationInvitee

Parameter

Mandatory

Type

Description

invitee_bcs_id

Yes

String

BCS service ID of the invitee.

invitee_bcs_name

Yes

String

BCS service name of the invitee. This parameter is required when an invitation is accepted.

invitee_project_id

Yes

String

Project ID of the invitee.

invitee_user_id

Yes

String

Tenant ID of the invitee. Log in to the BCS console as an invitee, click the account name, and click My Credentials > API Credentials to obtain the Account ID.

Table 6 HandleNotificationOrg

Parameter

Mandatory

Type

Description

name

Yes

String

Organization that is used to join the consortium.

Response Parameters

Status code: 200

Table 7 Response body parameters

Parameter

Type

Description

result

String

Result of a successful request.

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 8

Maximum: 36

error_msg

String

Error message.

Minimum: 2

Maximum: 512

Status code: 401

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 8

Maximum: 36

error_msg

String

Error message.

Minimum: 2

Maximum: 512

Status code: 403

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 8

Maximum: 36

error_msg

String

Error message.

Minimum: 2

Maximum: 512

Status code: 404

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 8

Maximum: 36

error_msg

String

Error message.

Minimum: 2

Maximum: 512

Status code: 500

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 8

Maximum: 36

error_msg

String

Error message.

Minimum: 2

Maximum: 512

Example Requests

{
  "channel_name" : "channel",
  "invited_orgs" : [ {
    "name" : "organization"
  } ],
  "invitor_info" : {
    "invitor_user_id" : "051dded56100d4f90fe6c01d7d7a9240",
    "invitor_bcs_id" : "6a9062bb-6aaf-a1cc-1756-7f45f9e0ea11",
    "invitor_project_id" : "051dded75a80d4fb2f38c01d64a5789e",
    "invitor_bcs_name" : "invitor-xxx"
  },
  "invitee_info" : {
    "invitee_user_id" : "051ddda48580d3371fc6c014ba7175b5",
    "invitee_bcs_id" : "6a9062bb-6aaf-a1cc-1756-7f45f9e0ea11",
    "invitee_project_id" : "051dded75a80d4fb2f38c01d64a5789e",
    "invitee_bcs_name" : "invitee-xxx"
  },
  "status" : "reject"
}

Example Responses

Status code: 200

Ok

{
  "result" : "success"
}

Status code: 400

Bad Request

{
  "error_code" : "BCS.4006014",
  "error_msg" : "Invalid Parameter quotasType : ecs"
}

Status code: 401

Unauthorized

{
  "error_code" : "BCS.4010401",
  "error_msg" : "Incorrect token or token resolution failed"
}

Status code: 403

Forbidden

{
  "error_code" : "BCS.4030403",
  "error_msg" : "No permissions to request this method"
}

Status code: 404

Not Found

{
  "error_code" : "BCS.4040404",
  "error_msg" : "Not Found:the url is not found"
}

Status code: 500

InternalServerError

{
  "error_code" : "BCS.5000500",
  "error_msg" : "Internal Server Error"
}

Status Codes

Status Code

Description

200

Ok

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

InternalServerError

Error Codes

See Error Codes.