Try this API
Call this method on live data to see the API request and response. Need help with the API Explorer?
Request parameters
You have invalid or missing required parameter values above.
Execute
Orchestly Developers

Entity Property

Every extension that a user builds will consume data. Orcheslty provides a solution for all such data storage requests by providing a mechanism to store key-value data pairs against job entities.

Data storage

To store data using 'set' method,


 OrchestlyClient.then(function(App) { 
        OrchestlySDK.set('job.entityproperty',value,key).then(function (data) {
                 //response Handling
            }).catch(function (err) {
                //error Handling
        });
    });

Arugment Name Data Type Description
value JSONObject Data to be stored corresponding to the key.
key String A unique string against which the data is stored.

Response:


{  
   "entity_type":1,
   "entity_id":"771000000163157",
   "value":"dwqdwqd",
   "key":"dwdwqd",
   "property_id":"771000000168003",
   "entity_type_value":"JOB"
}

Data retrieval

To retrieve data using 'get' method,


var OrchestlyClient =  OrchestlySDK.init();

OrchestlyClient.then(function(app) {     
        OrchestlySDK.get('job.entityproperty',key).then(function (data) {
            //response Handling
        }).catch(function (err) {
            //error Handling
        });    
    });

Arugment Name Data Type Description
key* String A unique string against which the data is stored.

Response:


[  
   {  
      "entity_type":1,
      "entity_id":"352000000046033",
      "value":"test value",
      "key":"test key",
      "property_id":"352000000043057",
      "entity_type_value":"JOB"
   }
]

Data deletion

This method is used to delete specific data stored in an extension.


  OrchestlyClient.then(function(App) { 
        OrchestlySDK.destroy("job.entityproperty",entitypropertyId).then(function (response) {
                //response Handling
            }).catch(function (err) {
                //error Handling
        })

     }); 

Response:


{"result":true}