---
updatedAt: 2026-03-01T18:59:51.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/test-ctr/llms.txt
---

# Reorder test cases in a test suite

Reorders functional test cases in a test suite. The order of test cases applies when running a test for stateful test suites. You need to provide target order for all test cases included in a test suite. To check the current order of test cases, run the [Get a test suite with child objects](ref:get-test-suites-with-child-objects) operation.

# OpenAPI definition

```json
{
  "externalDocs": {
    "description": "See documentation for Akamai's Test Center API",
    "url": "https://techdocs.akamai.com/test-ctr/reference"
  },
  "info": {
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Functional testing",
    "version": "v3"
  },
  "openapi": "3.0.0",
  "paths": {
    "/functional/test-suites/{testSuiteId}/test-cases/order": {
      "put": {
        "description": "Reorders functional test cases in a test suite. The order of test cases applies when running a test for stateful test suites. You need to provide target order for all test cases included in a test suite. To check the current order of test cases, run the [Get a test suite with child objects](ref:get-test-suites-with-child-objects) operation.",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's Test Center API",
          "url": "https://techdocs.akamai.com/test-ctr/reference/put-order-test-case"
        },
        "operationId": "put-order-test-case",
        "parameters": [
          {
            "description": "For customers who manage more than one account, this [runs the operation from another account](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). The Identity and Access Management API provides a [list of available account switch keys](https://techdocs.akamai.com/iam-api/reference/get-client-account-switch-keys).",
            "in": "query",
            "name": "accountSwitchKey",
            "required": false,
            "schema": {
              "example": "1-5C0YLB:1-8BYUX",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": [
                {
                  "order": 1,
                  "testCaseId": 302
                },
                {
                  "order": 2,
                  "testCaseId": 301
                }
              ],
              "schema": {
                "description": "Functional test cases and their orders. The request needs to include all of a test suite's functional test cases. If you don't include all of them, you get a 400 error response.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "order": {
                      "description": "Order of the test case.",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "testCaseId": {
                      "description": "Identifies a functional test case.",
                      "minimum": 1,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "testCaseId",
                    "order"
                  ],
                  "type": "object"
                },
                "minItems": 0,
                "type": "array"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": [
                  {
                    "order": 1,
                    "testCaseId": 302
                  },
                  {
                    "order": 2,
                    "testCaseId": 301
                  }
                ],
                "schema": {
                  "description": "Functional test cases and their orders. The request needs to include all of a test suite's functional test cases. If you don't include all of them, you get a 400 error response.",
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "order": {
                        "description": "Order of the test case.",
                        "minimum": 1,
                        "type": "integer"
                      },
                      "testCaseId": {
                        "description": "Identifies a functional test case.",
                        "minimum": 1,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "testCaseId",
                      "order"
                    ],
                    "type": "object"
                  },
                  "minItems": 0,
                  "type": "array"
                }
              }
            },
            "description": "The response provides reordered test cases."
          },
          "400": {
            "content": {
              "application/problem+json": {
                "example": {
                  "errors": [
                    {
                      "requestField": "propertyName",
                      "title": "Required field missing",
                      "type": "required.field.missing"
                    }
                  ],
                  "instance": "e4bdb007-213d-4573-ab76-4f071b55de59",
                  "problemId": "f4bdb007-213d-4599-ab76-4f071b3fc129",
                  "status": 400,
                  "title": "Validation error",
                  "type": "validation.error"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Specifies the errors.",
                  "properties": {
                    "errors": {
                      "description": "[HTTP Problem Details](https://tools.ietf.org/html/rfc9457) objects indicating causes of failure.",
                      "items": {
                        "additionalProperties": false,
                        "description": "Specifies the error that occurred.",
                        "properties": {
                          "existingEntities": {
                            "description": "Lists objects included within the functional test case.",
                            "items": {
                              "additionalProperties": true,
                              "type": "object"
                            },
                            "minItems": 0,
                            "type": "array"
                          },
                          "problemId": {
                            "description": "An unique UUID generated for the error object.    ",
                            "type": "string"
                          },
                          "requestField": {
                            "description": "Request field name the error refers to. It can be a URL path or query parameter, or any request payload field name.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "requestObjects": {
                            "description": "Lists invalid request objects.",
                            "items": {
                              "additionalProperties": true,
                              "type": "object"
                            },
                            "minItems": 0,
                            "type": "array"
                          },
                          "requestValues": {
                            "description": "Lists values corresponding to the `requestField`.",
                            "items": {
                              "anyOf": [
                                {
                                  "title": "String",
                                  "type": "string"
                                },
                                {
                                  "title": "Integer",
                                  "type": "integer"
                                },
                                {
                                  "title": "Object",
                                  "type": "object"
                                }
                              ]
                            },
                            "minItems": 0,
                            "type": "array"
                          },
                          "title": {
                            "description": "Title of the error.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": {
                            "description": "Type of error.",
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "title",
                          "problemId"
                        ],
                        "type": "object"
                      },
                      "minItems": 0,
                      "type": "array"
                    },
                    "instance": {
                      "description": "Identifies an error.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "problemId": {
                      "description": "An unique UUID generated for the error object.    ",
                      "type": "string"
                    },
                    "requestField": {
                      "description": "Request field name the error refers to. It can be a URL path or query parameter, or any request payload field name.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "requestValues": {
                      "description": "Lists values corresponding to the `requestField`.",
                      "items": {
                        "anyOf": [
                          {
                            "title": "String",
                            "type": "string"
                          },
                          {
                            "title": "Integer",
                            "type": "integer"
                          },
                          {
                            "title": "Object",
                            "type": "object"
                          }
                        ]
                      },
                      "minItems": 0,
                      "type": "array"
                    },
                    "status": {
                      "description": "HTTP response code.",
                      "maximum": 599,
                      "minimum": 100,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "Type of error.",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "instance",
                    "status",
                    "problemId"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "[Validation errors](ref:400)."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "example": {
                  "errors": [
                    {
                      "title": "Required permission missing",
                      "type": "required.permission.missing"
                    }
                  ],
                  "instance": "a86ef2f3-4ffa-4eef-a041-6558311dd3a2",
                  "problemId": "f4bdb007-213d-4599-ab76-4f071b3fc129",
                  "status": 403,
                  "title": "Authorization error",
                  "type": "authorization.error"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Specifies the errors.",
                  "properties": {
                    "errors": {
                      "description": "[HTTP Problem Details](https://tools.ietf.org/html/rfc9457) objects indicating causes of failure.",
                      "items": {
                        "additionalProperties": false,
                        "description": "Specifies the error that occurred.",
                        "properties": {
                          "existingEntities": {
                            "description": "Lists objects included within the functional test case.",
                            "items": {
                              "additionalProperties": true,
                              "type": "object"
                            },
                            "minItems": 0,
                            "type": "array"
                          },
                          "problemId": {
                            "description": "An unique UUID generated for the error object.    ",
                            "type": "string"
                          },
                          "requestField": {
                            "description": "Request field name the error refers to. It can be a URL path or query parameter, or any request payload field name.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "requestObjects": {
                            "description": "Lists invalid request objects.",
                            "items": {
                              "additionalProperties": true,
                              "type": "object"
                            },
                            "minItems": 0,
                            "type": "array"
                          },
                          "requestValues": {
                            "description": "Lists values corresponding to the `requestField`.",
                            "items": {
                              "anyOf": [
                                {
                                  "title": "String",
                                  "type": "string"
                                },
                                {
                                  "title": "Integer",
                                  "type": "integer"
                                },
                                {
                                  "title": "Object",
                                  "type": "object"
                                }
                              ]
                            },
                            "minItems": 0,
                            "type": "array"
                          },
                          "title": {
                            "description": "Title of the error.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": {
                            "description": "Type of error.",
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "title",
                          "problemId"
                        ],
                        "type": "object"
                      },
                      "minItems": 0,
                      "type": "array"
                    },
                    "instance": {
                      "description": "Identifies an error.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "problemId": {
                      "description": "An unique UUID generated for the error object.    ",
                      "type": "string"
                    },
                    "requestField": {
                      "description": "Request field name the error refers to. It can be a URL path or query parameter, or any request payload field name.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "requestValues": {
                      "description": "Lists values corresponding to the `requestField`.",
                      "items": {
                        "anyOf": [
                          {
                            "title": "String",
                            "type": "string"
                          },
                          {
                            "title": "Integer",
                            "type": "integer"
                          },
                          {
                            "title": "Object",
                            "type": "object"
                          }
                        ]
                      },
                      "minItems": 0,
                      "type": "array"
                    },
                    "status": {
                      "description": "HTTP response code.",
                      "maximum": 599,
                      "minimum": 100,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "Type of error.",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "instance",
                    "status",
                    "problemId"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "[Authorization error](ref:403)."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "example": {
                  "instance": "1dcdb168-8837-415e-92bc-31aa36326495",
                  "problemId": "f4bdb007-213d-4599-ab76-4f071b3fc129",
                  "requestField": "propertyName",
                  "requestValues": [
                    "atc_user1_config"
                  ],
                  "status": 404,
                  "title": "Resource not found",
                  "type": "resource.not.found"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Specifies the errors.",
                  "properties": {
                    "errors": {
                      "description": "[HTTP Problem Details](https://tools.ietf.org/html/rfc9457) objects indicating causes of failure.",
                      "items": {
                        "additionalProperties": false,
                        "description": "Specifies the error that occurred.",
                        "properties": {
                          "existingEntities": {
                            "description": "Lists objects included within the functional test case.",
                            "items": {
                              "additionalProperties": true,
                              "type": "object"
                            },
                            "minItems": 0,
                            "type": "array"
                          },
                          "problemId": {
                            "description": "An unique UUID generated for the error object.    ",
                            "type": "string"
                          },
                          "requestField": {
                            "description": "Request field name the error refers to. It can be a URL path or query parameter, or any request payload field name.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "requestObjects": {
                            "description": "Lists invalid request objects.",
                            "items": {
                              "additionalProperties": true,
                              "type": "object"
                            },
                            "minItems": 0,
                            "type": "array"
                          },
                          "requestValues": {
                            "description": "Lists values corresponding to the `requestField`.",
                            "items": {
                              "anyOf": [
                                {
                                  "title": "String",
                                  "type": "string"
                                },
                                {
                                  "title": "Integer",
                                  "type": "integer"
                                },
                                {
                                  "title": "Object",
                                  "type": "object"
                                }
                              ]
                            },
                            "minItems": 0,
                            "type": "array"
                          },
                          "title": {
                            "description": "Title of the error.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": {
                            "description": "Type of error.",
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "title",
                          "problemId"
                        ],
                        "type": "object"
                      },
                      "minItems": 0,
                      "type": "array"
                    },
                    "instance": {
                      "description": "Identifies an error.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "problemId": {
                      "description": "An unique UUID generated for the error object.    ",
                      "type": "string"
                    },
                    "requestField": {
                      "description": "Request field name the error refers to. It can be a URL path or query parameter, or any request payload field name.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "requestValues": {
                      "description": "Lists values corresponding to the `requestField`.",
                      "items": {
                        "anyOf": [
                          {
                            "title": "String",
                            "type": "string"
                          },
                          {
                            "title": "Integer",
                            "type": "integer"
                          },
                          {
                            "title": "Object",
                            "type": "object"
                          }
                        ]
                      },
                      "minItems": 0,
                      "type": "array"
                    },
                    "status": {
                      "description": "HTTP response code.",
                      "maximum": 599,
                      "minimum": 100,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "Type of error.",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "instance",
                    "status",
                    "problemId"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "[Resource not found error](ref:404)."
          }
        },
        "summary": "Reorder test cases in a test suite",
        "tags": [
          "Test cases"
        ]
      },
      "parameters": [
        {
          "description": "Identifies a test suite. To get this value, run the [List test suites](ref:get-test-suites) operation.",
          "in": "path",
          "name": "testSuiteId",
          "required": true,
          "schema": {
            "example": 284,
            "type": "integer"
          }
        }
      ]
    }
  },
  "servers": [
    {
      "url": "https://{hostname}/test-management/v3"
    }
  ],
  "tags": [
    {
      "description": "Create and manage test cases in a test suite. Each test case consists of a test request, client profile, and condition.",
      "name": "Test cases"
    }
  ],
  "x-readme": {
    "samples-languages": [
      "curl",
      "python",
      "node"
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```

# Sibling pages

* [Add test cases to a test suite](https://techdocs.akamai.com/test-ctr/reference/post-test-cases.md)
* [List test cases](https://techdocs.akamai.com/test-ctr/reference/get-test-cases.md)
* [Update test cases](https://techdocs.akamai.com/test-ctr/reference/put-test-cases.md)
* [Remove test cases](https://techdocs.akamai.com/test-ctr/reference/post-remove-test-case.md)
* [Restore test cases](https://techdocs.akamai.com/test-ctr/reference/post-test-cases-restore.md)
* [Get a test case](https://techdocs.akamai.com/test-ctr/reference/get-test-case.md)