Server Threads Settings Update

Updates server thread pool settings.

Request

Property Value
Method PATCH
URL /api/server/settings/threads
Content-Type application/json
Authentication Bearer Token

Request Body

Parameter Type Required Description
data.attributes.autoMode boolean No Automatic thread count mode
data.attributes.workerThreadCount integer No Number of worker threads
data.attributes.readerThreadCount integer No Number of reader threads
data.attributes.writerThreadCount integer No Number of writer threads
data.attributes.transportThreadCount integer No Number of transport threads

Note: When autoMode is true, thread count fields cannot be modified. When changing autoMode from true to false, all thread count fields must be provided. When autoMode is already false, thread counts can be partially updated.

Example Request (Auto Mode)

{
  "data": {
    "attributes": {
      "autoMode": true
    }
  }
}

Example Request (Switch to Manual Mode)

When switching from autoMode: true to autoMode: false, all thread counts are required.

{
  "data": {
    "attributes": {
      "autoMode": false,
      "workerThreadCount": 96,
      "readerThreadCount": 48,
      "writerThreadCount": 144,
      "transportThreadCount": 96
    }
  }
}

Example Request (Partial Update in Manual Mode)

When autoMode is already false, individual thread counts can be updated.

{
  "data": {
    "attributes": {
      "readerThreadCount": 48,
      "transportThreadCount": 96
    }
  }
}

Response

Status Codes

Code Description
200 Success - Settings updated
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or missing token
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error

Successful Response (200) - Auto Mode Enabled

{
  "data": {
    "attributes": {
      "autoMode": {
        "editable": true,
        "value": true
      },
      "workerThreadCount": {
        "lockedBy": "autoMode",
        "editable": false,
        "value": 96
      },
      "readerThreadCount": {
        "lockedBy": "autoMode",
        "editable": false,
        "value": 48
      },
      "writerThreadCount": {
        "lockedBy": "autoMode",
        "editable": false,
        "value": 144
      },
      "transportThreadCount": {
        "lockedBy": "autoMode",
        "editable": false,
        "value": 96
      }
    }
  },
  "meta": {
    "executionTime": 25,
    "generatedAt": 1764851122674
  },
  "message": "Thread Settings have been updated"
}

Successful Response (200) - Manual Mode

{
  "data": {
    "attributes": {
      "autoMode": {
        "editable": true,
        "value": false
      },
      "workerThreadCount": {
        "editable": true,
        "value": 96
      },
      "readerThreadCount": {
        "editable": true,
        "value": 48
      },
      "writerThreadCount": {
        "editable": true,
        "value": 144
      },
      "transportThreadCount": {
        "editable": true,
        "value": 96
      }
    }
  },
  "meta": {
    "executionTime": 18,
    "generatedAt": 1764851159824
  },
  "message": "Thread Settings have been updated"
}

Response Body

Thread Settings

Parameter Type Description
data.attributes.autoMode.value boolean Automatic thread count mode
data.attributes.autoMode.editable boolean Indicates if the field can be modified
data.attributes.autoMode.lockedBy string Locked by environment variable (if present)
data.attributes.workerThreadCount.value integer Number of worker threads
data.attributes.workerThreadCount.editable boolean Indicates if the field can be modified
data.attributes.workerThreadCount.lockedBy string Locked by autoMode or environment variable (if present)
data.attributes.readerThreadCount.value integer Number of reader threads
data.attributes.readerThreadCount.editable boolean Indicates if the field can be modified
data.attributes.readerThreadCount.lockedBy string Locked by autoMode or environment variable (if present)
data.attributes.writerThreadCount.value integer Number of writer threads
data.attributes.writerThreadCount.editable boolean Indicates if the field can be modified
data.attributes.writerThreadCount.lockedBy string Locked by autoMode or environment variable (if present)
data.attributes.transportThreadCount.value integer Number of transport threads
data.attributes.transportThreadCount.editable boolean Indicates if the field can be modified
data.attributes.transportThreadCount.lockedBy string Locked by autoMode or environment variable (if present)
message string Response status message

Metadata

Parameter Type Description
meta.executionTime integer Request processing time in milliseconds
meta.generatedAt integer Response generation timestamp (Unix timestamp in ms)

Error Responses

Generic Error (4xx/5xx)

{
  "message": "Error message"
}

Validation Error (400)

{
  "message": "Validation failed",
  "errors": {
    "attributes": {
      "workerThreadCount": [
        "Cannot set thread count when autoMode is enabled"
      ],
      "readerThreadCount": [
        "Cannot set thread count when autoMode is enabled"
      ],
      "writerThreadCount": [
        "Cannot set thread count when autoMode is enabled"
      ],
      "transportThreadCount": [
        "Cannot set thread count when autoMode is enabled"
      ]
    }
  }
}

Error Response Body

Parameter Type Description
message string Human-readable error message
errors.attributes.workerThreadCount string[] Validation errors for workerThreadCount field
errors.attributes.readerThreadCount string[] Validation errors for readerThreadCount field
errors.attributes.writerThreadCount string[] Validation errors for writerThreadCount field
errors.attributes.transportThreadCount string[] Validation errors for transportThreadCount field