Class Index

Classes


SetLinks

Creates asset links
Defined in: setLinks.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
SetLinks(data, verbose, fields)
Creates asset link groups defined by a JSON object passed in the request
Class Detail
SetLinks(data, verbose, fields)
Creates asset link groups defined by a JSON object passed in the request
Parameters:
data Optional
an array of objects

    [
        {
          "assetGroup1": [{"id":201631649}, {"id":201631649}],
          "assetGroup2": [
                {
                     "id":201631708,
                     "linkDescription": "test2"
                }
             ],
          "globalDescription":"test",
          "bidirectional":false  //if true  all of the assets in assetGroup1 will be linked to the assets in assetGroup2, otherwise assetGroup2 will just be linked to assetGroup1
        },...
     ]
verbose Optional, Default: false
Setting this to true will collect a variety of default values for each asset.
fields Optional
An array of field id's to collect the values for each asset
Returns:
[{assetInfo, "linkGroups": [links]}, ... ]
/wf/restapi/v2/setLinks

Properties:
data=[
 {
     "assetGroup1": [{"id":201631649}],
     "assetGroup2": [{"id":201631708, "linkDescription": "test2"}],
     "globalDescription":"test",
     "bidirectional":false
 }
 ]

 verbose=false

Response:
 [
	 {
	   "linkGroups": [
		 {
		   "id": "39D58F64-9C41-4FF9-8891-CF52EF3254A0",
		   "globalDescription": "test",
		   "links": [
			 {
			   "linkDescription": "test2",
			   "asset": {
				 "id": 201631649
			   }
			 }
		   ]
		 }
	   ],
	   "id": 201631708
	 }
 ]
/wf/restapi/v2/setLinks

Properties:
data=[
 {
     "assetGroup1": [{"id":201631649}],
     "assetGroup2": [{"id":201631708, "linkDescription": "test2"}],
     "globalDescription":"test",
     "bidirectional":true
 }
]
 verbose=false

Response:
 [
	 {
	   "linkGroups": [
		 {
		   "id": "1F589B73-4099-4B28-8F10-B32DEE5B9CF7",
		   "globalDescription": null,
		   "links": [
			 {
			   "linkDescription": null,
			   "asset": {
				 "id": 201632779
			   }
			 }
		   ]
		 },
		 {
		   "id": "2AA2DB96-1F2E-416A-B291-751E51635792",
		   "globalDescription": "test",
		   "links": [
			 {
			   "linkDescription": "test2",
			   "asset": {
				 "id": 201631649
			   }
			 }
		   ]
		 }
	   ],
	   "id": 201631708
	 },
	 {
	   "linkGroups": [
		 {
		   "id": "2AA2DB96-1F2E-416A-B291-751E51635792",
		   "globalDescription": "test",
		   "links": [
			 {
			   "linkDescription": "test2",
			   "asset": {
				 "id": 201631708
			   }
			 }
		   ]
		 }
	   ],
	   "id": 201631649
	 }
 ]

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Dec 15 2023 01:44:02 GMT-0600 (CST)