Skip to main content
PUT
/
projects
/
{projectId}
/
flags
/
{flagId}
/
variations
/
reorder
cURL
curl --request PUT \
  --url http://localhost:3000/projects/{projectId}/flags/{flagId}/variations/reorder \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "orders": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "order_index": 1
    }
  ]
}
'
{
  "statusCode": 123,
  "message": "OK",
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "flag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "key": "<string>",
      "name": "<string>",
      "description": "<string>",
      "type": "boolean",
      "value": "<string>",
      "is_default": true,
      "order_index": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "deleted_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

projectId
string<uuid>
required
flagId
string<uuid>
required

Body

application/json
orders
object[]
required

Array of variations with their new order indices

Minimum array length: 1

Response

Default Response

statusCode
number
message
string
default:OK
data
object[]