Assign Custom Field to Asset
To assign a custom field to an asset, use the /rest/1/bind-custom-field
endpoint.
Request Parameters
req (body): Required. To assign a custom field to an asset, specify the custom field ID and the asset type.
customFields (string): Required. Specify the custom field ID(s) to assign them to certain assets.
positionAs (string): Optional. Select where the custom field should be located. You have 2 options: 'BEFORE' or 'AFTER' the location on the page you specify in the positionId. If you don't specify the positionAs, the custom field will be automatically placed inside of the customFieldGroup.
positionId (string): Optional. Select from these options: 'assetRecommendation', 'stream', 'nexus', 'relationship', 'dataSource', 'externalpages', 'info', 'recentlyUpdated', and 'customFieldsGroup'.
xid (string): Required. Specify what types of assets should be assigned to the specified custom field. Select from these options: 'term', 'report', 'reportWorksheet', 'apiEndpoint', 'alteryxWorkflow', 'table', 'folder', 'virtualFolder', 'person', 'userGroup', 'view', 'codeTable', 'schedule', 'apiSite', 'salesforceColumn', 'applicationFolder', 'applicationTable', 'codeTableValue', 'collection', 'column', 'dashboard', 'databaseCatalog', 'databaseServer', 'datasource', 'file', 'fileTable', 'tableColumn', 'homePage', 'procedure', 'qlikFolder', 'reportObject', 'databaseSchema', 'signupWhitelist', 'project', 'lifecycle', 'lifecycleState', 'lifecycleTransition'.
For more information about custom fields, visit the Asset Configuration help page.
Example Value
{ "customFields": [ "t-1275012154", "d-1274128019" ], "positionAs": "BEFORE", "positionId": "stream", "xid": "folder" }
Curl Request Example
curl -X POST "https://qa.ac.dss.ayxdo.net/rest/1/bind-custom-field" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"customFields\": [ \"t-1275012154\", \"d-1274128019\" ], \"positionAs\": \"BEFORE\", \"positionId\": \"stream\", \"xid\": \"folder\"}"
Response Example
Response Body
{ "data": "Binding successful", "isSuccess": true }
Response Headers
cache-control: no-cache, no-store, max-age=0, must-revalidate content-length: 46 content-type: application/json date: Thu, 30 Jun 2022 09:55:38 GMT expires: 0 pragma: no-cache x-content-type-options: nosniff x-frame-options: DENY x-xss-protection: 1; mode=block