Skip to main content

Create Segment

POST 

/v1/products/:productId/segments

This endpoint creates a new Segment in a specified Product identified by the productId parameter, which can be obtained from the List Products endpoint.

Request

Path Parameters

    productId uuidrequired

    The identifier of the Product.

Body

required

    name stringrequired

    Possible values: non-empty and <= 255 characters

    Name of the Segment.

    description stringnullable

    Possible values: <= 1000 characters

    Description of the Segment.

    comparisonAttribute stringrequired

    Possible values: non-empty and <= 1000 characters

    The user's attribute the evaluation process must take into account.

    comparator RolloutRuleComparator (string)required

    Possible values: [isOneOf, isNotOneOf, contains, doesNotContain, semVerIsOneOf, semVerIsNotOneOf, semVerLess, semVerLessOrEquals, semVerGreater, semVerGreaterOrEquals, numberEquals, numberDoesNotEqual, numberLess, numberLessOrEquals, numberGreater, numberGreaterOrEquals, sensitiveIsOneOf, sensitiveIsNotOneOf]

    The comparison operator the evaluation process must use when it compares the given user attribute's value with the comparison value.

    comparisonValue stringrequired

    Possible values: non-empty

    The value to compare with the given user attribute's value.

Responses

When the creation was successful.

Schema

    product

    object

    Details of the Product.

    organization

    object

    Details of the Organization.

    organizationId uuid

    Identifier of the Organization.

    name stringnullable

    Name of the Organization.

    productId uuid

    Identifier of the Product.

    name stringnullable

    Name of the Product.

    description stringnullable

    Description of the Product.

    order int32

    The order of the Product represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.

    reasonRequired boolean

    Determines whether a mandatory reason must be given every time when the Feature Flags or Settings within a Product are saved.

    segmentId uuid

    Identifier of the Segment.

    name stringnullable

    Name of the Segment.

    description stringnullable

    Description of the Segment.

    creatorEmail stringnullable

    The email of the user who created the Segment.

    creatorFullName stringnullable

    The name of the user who created the Segment.

    createdAt date-time

    The date and time when the Segment was created.

    lastUpdaterEmail stringnullable

    The email of the user who last updated the Segment.

    lastUpdaterFullName stringnullable

    The name of the user who last updated the Segment.

    updatedAt date-time

    The date and time when the Segment was last updated.

    comparisonAttribute stringnullable

    The user's attribute the evaluation process must take into account.

    comparator RolloutRuleComparator (string)

    Possible values: [isOneOf, isNotOneOf, contains, doesNotContain, semVerIsOneOf, semVerIsNotOneOf, semVerLess, semVerLessOrEquals, semVerGreater, semVerGreaterOrEquals, numberEquals, numberDoesNotEqual, numberLess, numberLessOrEquals, numberGreater, numberGreaterOrEquals, sensitiveIsOneOf, sensitiveIsNotOneOf]

    The comparison operator the evaluation process must use when it compares the given user attribute's value with the comparison value.

    comparisonValue stringnullable

    The value to compare with the given user attribute's value.

Loading...