Create a new UI segment

Request

Creates a new UI segment for yourself or to share with others within your organization.

Security
SecretApiKey or JWT
Bodyapplication/jsonrequired

Segment resource.

dataobjectrequired

Object that contains a schema that is used to set up the UI for the segment. This schema is built and consumed by the frontend. It includes information such as: segment name, UI settings, and so on.

isStarredboolean

Specifies if this segment is starred by the current user. Starring a segment marks it as a favorite segment, and also adds the segment to a starred folder in the UI.

isVisibleboolean

Specifies if the segment is visible to the current user.

userIdsArray of strings, uniquewrite-only

List of user IDs with which the segment is shared. This field is used when the scope field is set to shared.

scopestringrequired

Controls the visibility of the segment.

Enum ValueDescription
private

Visible only to the owner the segment.

public

Visible to all in the owner's organization.

shared

Visible to a specific group of users that are specified in the userIds field.

systemIdstringwrite-only

If the segment is derived from a system segment, this field contains the ID of the related system segment. To provide this field in a request, the scope field must be set to private .

curl -i -X POST \
  https://www.rebilly.com/_mock/catalog/all/grid-segments \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "name": "string",
      "columns": [
        "string"
      ],
      "filters": "averageValue/amount:10;bin:555,2058",
      "page": "data-tables",
      "sort": "string",
      "type": "customers"
    },
    "isStarred": true,
    "isVisible": true,
    "userIds": [
      "4f6cf35x-2c4y-483z-a0a9-158621f77a21"
    ],
    "scope": "private",
    "systemId": "string"
  }'

Responses

Segment created.

Headers
Locationstring, (uri)

Location of the related resource.

Example:"https://api.rebilly.com/example"
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
Bodyapplication/json
idstring, <= 50 charactersread-only

ID of the segment.

Example:"grd_seg_0YVCNRJW0ADV49TN8BD9X91XB5"
ownerobjectread-onlyrequired

Creator of segment.

dataobjectrequired

Object that contains a schema that is used to set up the UI for the segment. This schema is built and consumed by the frontend. It includes information such as: segment name, UI settings, and so on.

isStarredboolean

Specifies if this segment is starred by the current user. Starring a segment marks it as a favorite segment, and also adds the segment to a starred folder in the UI.

isVisibleboolean

Specifies if the segment is visible to the current user.

usersArray of objects, uniqueread-only

List of user details with which this segment is shared.

scopestringrequired

Controls the visibility of the segment.

Enum ValueDescription
private

Visible only to the owner the segment.

public

Visible to all in the owner's organization.

shared

Visible to a specific group of users that are specified in the userIds field.

Response
{ "id": "grd_seg_0YVCNRJW0ADV49TN8BD9X91XB5", "owner": { "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21", "name": "string" }, "data": { "name": "string", "columns": [], "filters": "averageValue/amount:10;bin:555,2058", "page": "data-tables", "sort": "string", "type": "customers" }, "isStarred": true, "isVisible": true, "users": [ {} ], "scope": "private" }