2025-04-23 Graph Use Case/GetNode and GetNodes

From Izara Wiki
Jump to navigation Jump to search

Overview

Using Case GetNode

GetNode with identifiers

Example Param

{
 "objType":{
    "serviceTag":"xxxx",
    "objectType":"yyyy"
 },
 "objInstanceFull":{
    "identifiers":{
       "xxxx":"yyyy"
    },
    "fields":{
    }
 },
 "versionedDataLabels":[]
}

Output

{
  objType: { serviceTag: 'xxxx', objectType: 'yyyy' },
  objInstanceFull: {
	identifiers: {
  	// identifiers
	},
	fields: {
  	// fields
	}
  }
}

GetNode with VersionedData Case false

Example Param

{
   "objType":{
      "serviceTag":"xxxx",
      "objectType":"yyyy"
   },
   "objInstanceFull":{
      "identifiers":{
       "identifiers"
      },
      "fields":{
         "fields"
      }
   },
   "versionedDataLabels":[
      "versionedDataLabel"
   ],
   "settings":{
      "returnSystemFieldsName":false // or not send settings
   }
}

Output

{
    objTypes: [ { serviceTag: 'xxxx', objectType: 'yyyy' } ],
    objInstanceFull: {
      identifiers: {
       //identifiers
      },
      fields: {
        // fields with versionedData properties
      }
    }
  }

GetNode with VersionedData Case true

Example Param

{
  "objType":{
     "serviceTag":"xxxx",
     "objectType":"yyyy"
  },
  "objInstanceFull":{
     "identifiers":{
        "identifiers"
     },
     "fields":{
        "fields"
     }
  },
  "versionedDataLabels":[
     "versionedDataLabel"
  ],
  "settings": {"returnSystemFieldsName" :true}
}

Output

{
  objTypes: [ { serviceTag: 'xxxx', objectType: 'yyyy' } ],
  objInstanceFull: {
    identifiers: {
     //identifiers
    },
    fields: {
      // fields with versionedData's properties
    }
  },
  versionDataSystemFields: {
    verionedDataLabels: {
      originTimestamp: 1234567890,
      forMatchedId: 'string',
      versionedDataId: 'string'
    }
  }
}

GetNode with AnyValue

Example Param

{
  "objType": {
    "serviceTag": "xxxx",
    "objectType": "yyyy"
   },
  "objInstanceFull": {
	"identifiers": {
	// identifiers
   },
	"fields": {
	  "storage": {
	    "anyValue": [
           "xxx"
		   "anyVAlue of identifiers"
		  ]
		}
	  }
	},
	"versionedDataLabels": []
}

- Note!: can use anyValue inside objInstanceFull.identifiers or objInstanceFull.fields - In the Params that are sent, both "identifiers" and AnyValue must be included. At least one of the values must match the data in order to return the correct result.

Output

{
	objTypes: [ { serviceTag: 'xxxx', objectType: 'yyyy' } ],
	objInstanceFull: {
  	identifiers: { //identifiers },
  	fields: {
    	// fields
      }
	}
  }

- Note!: If any of the values in anyValue sent do not match the data defined in the Graph will be "returnValue": { } or fields :{ } // empty object

Use Case GetNodes

  • Note!: Using GetNodes not send identifiers

GetNodes Basic Case

Example Param

{
  "objType": {
	"objectType": "xxxx",
	"serviceTag": "yyyy"
  },
	"fields": {
  	 "fields"
	}
}

Example Output

{
  getNodesReturnValues: [
	{
	  objTypes: [
		{ serviceTag: 'xxxx', objectType: 'yyyy' }
	],
	  objInstanceFull: {
		identifiers: { // identifiers },
		fields: {
	      //fields
		  }
		}
	  },
	{
	 // if have multiple GetNodes
	}
  ]
}

GetNodes with versionedData

  • Note!: returnSystemFieldsName : false

Example Param

  • Param must have fields and versionedDataLabels
{
   "objType":{
      "serviceTag":"xxxx",
      "objectType":"yyyy"
   },
   "fields":{
      "fields"
   },
   "versionedDataLabels":[
      "versionedDataLabels"
   ]
}

Example Output

{
  getNodesReturnValues: [
   {
	 objTypes: [
	  { serviceTag: 'xxxx', objectType: 'yyyy' }
	],
	 objInstanceFull: {
	  identifiers: { // identifiers },
	  fields: {
		// fields and versionedData properties,
		}
	  }
	},
	{
    	// if have mustiple object / Nodes
	}
  ]
}

GetNodes with verionedData case true

  • Note!: returnSystemFieldsName : true

Example Param

{
   "objType":{
      "serviceTag":"xxxx",
      "objectType":"yyyy"
   },
   "fields":{
      "fields"
   },
   "versionedDataLabels":[
      "versionedDataLabels"
   ],
   "settings":{
      "returnSystemFieldsName":true
   }
}

Example Output

GetNodes with AnyValue

Example Param

{
 "objType":{
  "serviceTag":"xxxx",
  "objectType":"yyyy",
 },
  "fields":{
   "color":{
    "anyValue":[
        "xxx", "yyy"
     ]
  	}
  }
}

Example Output

{
 getNodesReturnValues: [
  {
   objTypes: [
    { serviceTag: 'xxxx', objectType: 'yyyy' }
  ],
   objInstanceFull: {
     identifiers: { //identifiers },
      fields: {
        // fields
       }
     }
   },
   {
     // if have return multiple object nodes
   }
 ]
}