Segments

Update segment by id

Updates the content of the segment with the provided payload. Requires name and constraints to be present. If project is not present, it will be set to null. Any other fields not specified will be left untouched.

put/api/admin/segments/{id}

Path parameters

idinteger required

a segment id

Request body

namestring required

The name of the segment

descriptionstring nullable

A description of what the segment is for

projectstring nullable

The project the segment belongs to if any.

Example request

{
  "name": "beta-users",
  "description": "Users willing to help us test and build new features.",
  "project": "red-vista",
  "constraints": [
    {
      "contextName": "appName",
      "operator": "IN",
      "values": [
        "my-app",
        "my-other-app"
      ],
      "value": "my-app"
    }
  ]
}

Response

This response has no body.

Changes

Changed in 2 of the 7 revisions of this API.13

  • b2c3116e633e12See the full diff
    • the // request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • added the new SEMVER_GTE enum value to the request property //

      request-property-enum-value-added

    • added the new SEMVER_LTE enum value to the request property //

      request-property-enum-value-added

    • added the new REGEX enum value to the request property //

      request-property-enum-value-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog