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"
}
]
}Reorder variations for a flag. All variations must be included in the payload.
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"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Array of variations with their new order indices
1Show child attributes