Segments

Segments are grid UI settings that can be shared with other users. They are like a custom view. For example, one may set up a transaction grid to show specific columns and sort a certain way, and share it with others in their organization.

Retrieve a user's Segments

Retrieve a user's UI Segments.

Request
Security:
query Parameters
limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

sort
Array of strings

The collection items sort field and order (prefix with "-" for descending sort).

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

q
string

The partial search of the text fields.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200

Segments were retrieved successfully.

403

Access forbidden.

get/grid-segments
Request samples
curl -i -X GET \
  'https://api-sandbox.rebilly.com/organizations/unknown/grid-segments?limit=1000&offset=0&sort=string&filter=string&q=string' \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Create a new UI Segment

Create a new Segment for oneself or to share with others within the organization.

Request
Security:
header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Segment resource.

data
required
object

An object containing schema to set up the UI for the segment. This schema is built and consumed by the frontend. It includes such information as Segment name, UI settings, etc.

isStarred
boolean

Toggle whether this Segment is starred by the current user.

isVisible
boolean

Toggle whether this Segment is visible to the current user.

userIds
Array of strings unique

A list of user id's with whom to share, used if scope is set to shared.

scope
required
string

If private, then only the owner/creator can view this Segment. If set to public, then it's shared with anyone in the owner's organization. If set to shared, then it is only shared with specific users as specified in the userIds field.

Enum: "private" "public" "shared"
systemId
string

If the Segment is based off of a system Segment, this will be the id of the system Segment from which it was derived. The scope must be private when providing this in the request.

Responses
201

Segment was created successfully.

403

Access forbidden.

422

Invalid data was sent.

post/grid-segments
Request samples
application/json
{
  • "data": { },
  • "isStarred": true,
  • "isVisible": true,
  • "userIds": [
    ],
  • "scope": "private",
  • "systemId": "string"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "owner": {
    },
  • "data": { },
  • "isStarred": true,
  • "isVisible": true,
  • "users": [
    ],
  • "scope": "private"
}

Retrieve a specific Segment

Retrieve a specific UI Segment.

Request
Security:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200

Segment was retrieved successfully.

403

Access forbidden.

404

Resource was not found.

get/grid-segments/{id}
Request samples
curl -i -X GET \
  https://api-sandbox.rebilly.com/organizations/unknown/grid-segments/:id \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "owner": {
    },
  • "data": { },
  • "isStarred": true,
  • "isVisible": true,
  • "users": [
    ],
  • "scope": "private"
}

Update a Segment

Update a Segment.

Request
Security:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json
data
required
object

An object containing schema to set up the UI for the segment. This schema is built and consumed by the frontend. It includes such information as Segment name, UI settings, etc.

isStarred
boolean

Toggle whether this Segment is starred by the current user.

isVisible
boolean

Toggle whether this Segment is visible to the current user.

userIds
Array of strings unique

A list of user id's with whom to share, used if scope is set to shared.

scope
required
string

If private, then only the owner/creator can view this Segment. If set to public, then it's shared with anyone in the owner's organization. If set to shared, then it is only shared with specific users as specified in the userIds field.

Enum: "private" "public" "shared"
systemId
string

If the Segment is based off of a system Segment, this will be the id of the system Segment from which it was derived. The scope must be private when providing this in the request.

Responses
200

Segment was updated successfully.

403

This will be sent if the user is not the owner.

404

Resource was not found.

422

Invalid data was sent.

put/grid-segments/{id}
Request samples
application/json
{
  • "data": { },
  • "isStarred": true,
  • "isVisible": true,
  • "userIds": [
    ],
  • "scope": "private",
  • "systemId": "string"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "owner": {
    },
  • "data": { },
  • "isStarred": true,
  • "isVisible": true,
  • "users": [
    ],
  • "scope": "private"
}

Delete a Segment

Delete a Segment. This will also remove all shares. Only the owner may. perform this.

Request
Security:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
204

Segment was deleted successfully.

403

This will be sent if the user is not the owner.

404

Resource was not found.

delete/grid-segments/{id}
Request samples
curl -i -X DELETE \
  https://api-sandbox.rebilly.com/organizations/unknown/grid-segments/:id \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": 400,
  • "title": "string",
  • "detail": "string",
  • "error": "string"
}