Set Custom Field Value

Version:
Current
Last modified: October 01, 2020

To set a custom field value, use the /rest/1/field endpoint.

Curl Request Set Asset Field Value

curl -X POST "http://localhost:8080/rest/1/field" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"fields\": [ { \"code\": \"t1414354589\", \"value\": \"some field value\" } ], \"xid\": \"6ee418a4-d34a-448d-a400-cbf1235773eb\"}"

Request Parameters

req: (Required) To assign a value to a custom field for a certain asset, specify the xid of this asset, the custom field code, and the custom field value. 

Body Example

 { "fields": [{"code": "t1414354589","value": "some field value"}],
  "xid": "6ee418a4-d34a-448d-a400-cbf1235773eb" }

Server Response Example

Response Body Example

{
  "data": {
    "t1414354589": {
      "result": {},
      "msg": "Field t1414354589 updated"
    }
  },
  "isSuccess": true
}

Response Headers Example

cache-control: no-cache, no-store, max-age=0, must-revalidate 
 connection: Keep-Alive 
 content-length: 89 
 content-type: application/json;charset=ISO-8859-1 
 date: Thu, 03 Sep 2020 14:12:52 GMT 
 expires: 0 
 keep-alive: timeout=5, max=100 
 pragma: no-cache 
 server: Apache/2.4.10 (Debian) 
 x-content-type-options: nosniff 
 x-frame-options: DENY 
 x-xss-protection: 1; mode=block 
Was This Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support.