Skip to content

Create Machine Custom Data

Creates custom data for the specified machines. Custom data must not already exist for a given machine. Use the update endpoint to modify existing records.

Verb PUT
Endpoint {base-url}/machines/custom-data
Max Page Size N/A

Request Body

{
  "body": [
    {
      "machineId": 1166,
      "customData1": "value1",
      "customData2": "value2",
      "customData3": null,
      "customData4": null,
      "customData5": null
    }
  ]
}

Note

All changes in this request are atomic. If any item fails, the entire batch is rolled back and no changes are made.

Note

Successfully creating custom data sets hardwareSettingsChanged to true on each affected machine. The controller will download the updated settings the next time it comes online.

Returns

On Success

A 204 No Content.

On Error

HTTP Code Error Code Definition
403 DATA_ACCESS_VIOLATION One or more custom datas were associated with machines in organizations you do not have access to.
404 MISSING_RECORD One or more of the specified machines does not exist.
403 DATA_ACCESS_VIOLATION One or more of the machines you specified is not associated with a model and cannot have custom data.
400 NOT_SUPPORTED Machine {id} is a model that does not support custom data.
400 INVALID_DATA_TYPE One of the custom datas for machine {id} was not of the correct type.
422 DATA_VALIDATION_ERROR Custom data already exists for machine ID {id}. There may be additional preexisting custom data in your call. No changes have been made.