Create shield information barrier segment member

post
https://api.box.com/2.0
/shield_information_barrier_segment_members

Creates a new shield information barrier segment member.

Request

bearer [ACCESS_TOKEN]
application/json

Request Body

stringin bodyoptional
"shield_information_barrier_segment_member"

-| A type of the shield barrier segment member.

Value is always shield_information_barrier_segment_member

A base representation of a shield information barrier object

The type and id of the requested shield information barrier segment.

"432554"

The ID reference of the requesting shield information barrier segment.

"shield_information_barrier_segment"

The type of the shield barrier segment for this member.

Value is always shield_information_barrier_segment

User (Base) objectin body

User to which restriction will be applied.

Response

Returns a new shield information barrier segment member object.

application/jsonClient error

Returns an error if the shield information barrier or segment was not found.

application/jsonClient error

An unexpected client error.

post
Create shield information barrier segment member
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

Node
const barrierSegmentMember = await client.shieldInformationBarrierSegmentMembers.create({
	shield_information_barrier_segment: {
		id: '234',
		type: 'shield_information_barrier_segment'
	},
	user: {
		id: '456',
		type: 'user'
	}
});
console.log(`Shield information barrier segment member id ${barrierSegmentMember.id} created`);
TypeScript (Beta)
await client.shieldInformationBarrierSegmentMembers.createShieldInformationBarrierSegmentMember(
  {
    shieldInformationBarrierSegment: {
      id: segment.id!,
      type: 'shield_information_barrier_segment' as CreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentTypeField,
    } satisfies CreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentField,
    user: {
      id: getEnvVar('USER_ID'),
      type: 'user' as UserBaseTypeField,
    } satisfies UserBase,
  } satisfies CreateShieldInformationBarrierSegmentMemberRequestBody
);
Python (Beta)
client.shield_information_barrier_segment_members.create_shield_information_barrier_segment_member(shield_information_barrier_segment=CreateShieldInformationBarrierSegmentMemberShieldInformationBarrierSegment(id=segment.id, type=CreateShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT.value), user=UserBase(id=get_env_var('USER_ID'), type=UserBaseTypeField.USER.value))
.NET (Beta)
await client.ShieldInformationBarrierSegmentMembers.CreateShieldInformationBarrierSegmentMemberAsync(requestBody: new CreateShieldInformationBarrierSegmentMemberRequestBody(shieldInformationBarrierSegment: new CreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentField(id: NullableUtils.Unwrap(segment.Id), type: CreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentTypeField.ShieldInformationBarrierSegment), user: new UserBase(id: Utils.GetEnvVar(name: "USER_ID"), type: UserBaseTypeField.User))).ConfigureAwait(false)

Response Example

{
  "id": "11446498",
  "type": "shield_information_barrier_segment_member",
  "created_at": "2020-06-26T18:44:45.869Z",
  "created_by": {
    "id": "11446498",
    "type": "user"
  },
  "shield_information_barrier": {
    "id": "11446498",
    "type": "shield_information_barrier"
  },
  "shield_information_barrier_segment": {
    "id": "432554",
    "type": "shield_information_barrier_segment"
  },
  "updated_at": "2020-07-26T18:44:45.869Z",
  "updated_by": {
    "id": "11446498",
    "type": "user"
  },
  "user": {
    "id": "11446498",
    "type": "user"
  }
}