콘텐츠로 이동

역할 생성

POST
/api/core/organization/{organizationId}/roles
curl --request POST \
--url https://www.easterad.com/api/core/organization/example/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "description": "example", "type": "ORGANIZATION_ROLE_TYPE_SYSTEM", "statements": [ "example" ] }'
organizationId
required
string
Media typeapplication/json
object
name
required
string
>= 1 characters <= 50 characters
description
string
<= 200 characters
type
Any of:
string
Allowed value: ORGANIZATION_ROLE_TYPE_SYSTEM
statements
required
Array<string>

성공

Media typeapplication/json
object
_id
required
string
name
required
string
description
string
type
required
Any of:
string
Allowed value: ORGANIZATION_ROLE_TYPE_SYSTEM
statements
required
Array<string>
createdAt
required
string
/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]{1,9})?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])$/
updatedAt
string
/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]{1,9})?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])$/
Example
{
"type": "ORGANIZATION_ROLE_TYPE_SYSTEM"
}

오류 — 공통 오류 응답. 인증 단계 오류 코드는 문서의 “인증” 페이지를 참조.

Media typeapplication/json
object
statusCode
required
number
code
required

BadRequest | Unauthorized | Forbidden | NotFound | Conflict | TooManyRequests | InternalServerError | ServiceUnavailable

string
message
required
string
reason

선택 상세 사유. 예: CREATIVE_NOT_READY

string
assetId

관련 소재 ID (선택)

string
Examplegenerated
{
"statusCode": 1,
"code": "example",
"message": "example",
"reason": "example",
"assetId": "example"
}