curl -i -X POST "https://api.box.com/2.0/shield_information_barrier_segment_restrictions" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"type": "shield_information_barrier_segment_restriction",
"shield_information_barrier_segment": {
"id": "1910967",
"type": "shield_information_barrier_segment"
},
"restricted_segment": {
"id": "1910967",
"type": "shield_information_barrier_segment"
}
}'client.shield_information_barrier_segment_restrictions.create_shield_information_barrier_segment_restriction(
CreateShieldInformationBarrierSegmentRestrictionShieldInformationBarrierSegment(
id=segment_id,
type=CreateShieldInformationBarrierSegmentRestrictionShieldInformationBarrierSegmentTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT,
),
CreateShieldInformationBarrierSegmentRestrictionRestrictedSegment(
id=segment_to_restrict_id,
type=CreateShieldInformationBarrierSegmentRestrictionRestrictedSegmentTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT,
),
type=CreateShieldInformationBarrierSegmentRestrictionType.SHIELD_INFORMATION_BARRIER_SEGMENT_RESTRICTION,
)await client.shieldInformationBarrierSegmentRestrictions.createShieldInformationBarrierSegmentRestriction(
{
restrictedSegment: {
id: segmentToRestrictId,
type: 'shield_information_barrier_segment' as CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField,
} satisfies CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField,
shieldInformationBarrierSegment: {
id: segmentId,
type: 'shield_information_barrier_segment' as CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField,
} satisfies CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField,
type: 'shield_information_barrier_segment_restriction' as CreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField,
} satisfies CreateShieldInformationBarrierSegmentRestrictionRequestBodyInput,
);try await client.shieldInformationBarrierSegmentRestrictions.createShieldInformationBarrierSegmentRestriction(requestBody: CreateShieldInformationBarrierSegmentRestrictionRequestBody(restrictedSegment: CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField(id: segmentToRestrictId, type: CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField.shieldInformationBarrierSegment), shieldInformationBarrierSegment: CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField(id: segmentId, type: CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField.shieldInformationBarrierSegment), type: CreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField.shieldInformationBarrierSegmentRestriction))client.getShieldInformationBarrierSegmentRestrictions().createShieldInformationBarrierSegmentRestriction(new CreateShieldInformationBarrierSegmentRestrictionRequestBody.Builder(new CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField.Builder().id(segmentId).type(CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT).build(), new CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField.Builder().id(segmentToRestrictId).type(CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT).build()).type(CreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT_RESTRICTION).build())await client.ShieldInformationBarrierSegmentRestrictions.CreateShieldInformationBarrierSegmentRestrictionAsync(requestBody: new CreateShieldInformationBarrierSegmentRestrictionRequestBody(restrictedSegment: new CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField() { Id = segmentToRestrictId, Type = CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField.ShieldInformationBarrierSegment }, shieldInformationBarrierSegment: new CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField() { Id = segmentId, Type = CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField.ShieldInformationBarrierSegment }, type: CreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField.ShieldInformationBarrierSegmentRestriction));{
"shield_information_barrier_segment": {
"id": "1910967",
"type": "shield_information_barrier_segment"
},
"restricted_segment": {
"id": "1910967",
"type": "shield_information_barrier_segment"
},
"type": "shield_information_barrier_segment_restriction",
"id": "11446498",
"shield_information_barrier": {
"id": "11446498",
"type": "shield_information_barrier"
},
"created_at": "2020-06-26T18:44:45.869Z",
"created_by": {
"id": "11446498",
"type": "user"
},
"updated_at": "2020-07-26T18:44:45.869Z",
"updated_by": {
"id": "11446498",
"type": "user"
}
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}Shield情報バリアのセグメント制限を作成
Shield情報バリアのセグメント制限オブジェクトを作成します。
curl -i -X POST "https://api.box.com/2.0/shield_information_barrier_segment_restrictions" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"type": "shield_information_barrier_segment_restriction",
"shield_information_barrier_segment": {
"id": "1910967",
"type": "shield_information_barrier_segment"
},
"restricted_segment": {
"id": "1910967",
"type": "shield_information_barrier_segment"
}
}'client.shield_information_barrier_segment_restrictions.create_shield_information_barrier_segment_restriction(
CreateShieldInformationBarrierSegmentRestrictionShieldInformationBarrierSegment(
id=segment_id,
type=CreateShieldInformationBarrierSegmentRestrictionShieldInformationBarrierSegmentTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT,
),
CreateShieldInformationBarrierSegmentRestrictionRestrictedSegment(
id=segment_to_restrict_id,
type=CreateShieldInformationBarrierSegmentRestrictionRestrictedSegmentTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT,
),
type=CreateShieldInformationBarrierSegmentRestrictionType.SHIELD_INFORMATION_BARRIER_SEGMENT_RESTRICTION,
)await client.shieldInformationBarrierSegmentRestrictions.createShieldInformationBarrierSegmentRestriction(
{
restrictedSegment: {
id: segmentToRestrictId,
type: 'shield_information_barrier_segment' as CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField,
} satisfies CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField,
shieldInformationBarrierSegment: {
id: segmentId,
type: 'shield_information_barrier_segment' as CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField,
} satisfies CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField,
type: 'shield_information_barrier_segment_restriction' as CreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField,
} satisfies CreateShieldInformationBarrierSegmentRestrictionRequestBodyInput,
);try await client.shieldInformationBarrierSegmentRestrictions.createShieldInformationBarrierSegmentRestriction(requestBody: CreateShieldInformationBarrierSegmentRestrictionRequestBody(restrictedSegment: CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField(id: segmentToRestrictId, type: CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField.shieldInformationBarrierSegment), shieldInformationBarrierSegment: CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField(id: segmentId, type: CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField.shieldInformationBarrierSegment), type: CreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField.shieldInformationBarrierSegmentRestriction))client.getShieldInformationBarrierSegmentRestrictions().createShieldInformationBarrierSegmentRestriction(new CreateShieldInformationBarrierSegmentRestrictionRequestBody.Builder(new CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField.Builder().id(segmentId).type(CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT).build(), new CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField.Builder().id(segmentToRestrictId).type(CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT).build()).type(CreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT_RESTRICTION).build())await client.ShieldInformationBarrierSegmentRestrictions.CreateShieldInformationBarrierSegmentRestrictionAsync(requestBody: new CreateShieldInformationBarrierSegmentRestrictionRequestBody(restrictedSegment: new CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField() { Id = segmentToRestrictId, Type = CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField.ShieldInformationBarrierSegment }, shieldInformationBarrierSegment: new CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField() { Id = segmentId, Type = CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField.ShieldInformationBarrierSegment }, type: CreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField.ShieldInformationBarrierSegmentRestriction));{
"shield_information_barrier_segment": {
"id": "1910967",
"type": "shield_information_barrier_segment"
},
"restricted_segment": {
"id": "1910967",
"type": "shield_information_barrier_segment"
},
"type": "shield_information_barrier_segment_restriction",
"id": "11446498",
"shield_information_barrier": {
"id": "11446498",
"type": "shield_information_barrier"
},
"created_at": "2020-06-26T18:44:45.869Z",
"created_by": {
"id": "11446498",
"type": "user"
},
"updated_at": "2020-07-26T18:44:45.869Z",
"updated_by": {
"id": "11446498",
"type": "user"
}
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}承認
The access token received from the authorization server in the OAuth 2.0 flow.
ボディ
このメンバーのShieldバリアのセグメント制限のタイプ。
shield_information_barrier_segment_restriction "shield_information_barrier_segment_restriction"
リクエストされたShield情報バリアのセグメントのtypeとid。
Show child attributes
Show child attributes
制限されたShield情報バリアのセグメントのtypeとid。
Show child attributes
Show child attributes
Shield情報バリアオブジェクトのBase版の表示。
Show child attributes
Show child attributes
レスポンス
新しく作成されたShield情報バリアのセグメント制限オブジェクトを返します。
Shield情報バリアオブジェクトのセグメント制限のStandard版の表示。
リクエストされたShield情報バリアのセグメントのtypeとid。
Show child attributes
Show child attributes
制限されたShield情報バリアのセグメントのtypeとid。
Show child attributes
Show child attributes
Shield情報バリアのセグメント制限。
shield_information_barrier_segment_restriction "shield_information_barrier_segment_restriction"
Shield情報バリアのセグメント制限の一意の識別子。
"11446498"
Shield情報バリアオブジェクトのBase版の表示。
Show child attributes
Show child attributes
このShield情報バリアのセグメント制限オブジェクトが作成された日時を示すISO日時文字列。
"2020-06-26T18:44:45.869Z"
このShield情報バリアのセグメント制限を作成したユーザー。
Show child attributes
Show child attributes
このShield情報バリアのセグメント制限が更新された日時を示すISO日時文字列。
"2020-07-26T18:44:45.869Z"
このShield情報バリアのセグメント制限を更新したユーザー。
Show child attributes
Show child attributes
このページは役に立ちましたか?
