Box Developer Documentation
Latest version

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

TypeScript Gen
await client.shieldInformationBarrierSegmentMembers.createShieldInformationBarrierSegmentMember(
  {
    shieldInformationBarrierSegment: {
      id: segment.id!,
      type: 'shield_information_barrier_segment' as CreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentTypeField,
    } satisfies CreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentField,
    user: new UserBase({ id: getEnvVar('USER_ID') }),
  } satisfies CreateShieldInformationBarrierSegmentMemberRequestBody,
);
Python Gen
client.shield_information_barrier_segment_members.create_shield_information_barrier_segment_member(
    CreateShieldInformationBarrierSegmentMemberShieldInformationBarrierSegment(
        id=segment.id,
        type=CreateShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField.SHIELD_INFORMATION_BARRIER_SEGMENT.value,
    ),
    UserBase(id=get_env_var("USER_ID")),
)
.NET Gen
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"))));
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`);

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"
  }
}