'Key-value' is a format in which data can be stored. You can store the property or an attribute of an entity or an extension in a key-value pair. The key will be a unique string and the value will be a JSON object. Data like session information, user profiles, and preferences can be stored as key-value pairs. You can store data against the entities we support and the extensions you develop for Zoho BugTracker.
Zoho BugTracker supports the Project and bug entities. You will be able to store project-specific or bug-specific data against their respective entities. The key will be a unique string and the data will be a JSON object that has to be identified with the key in the future. You can store, retrieve, update, and delete the data that you store against an entity using the following methods respectively.
If the current user has only READ access, they will be able to only retrieve the data i.e.retrieve() can only be invoked. If they have EDIT access, the other functions like 'store()', 'update()', and 'remove()' can also be invoked.
Stores data against an entity.
var value = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample.png"}
];
var count = 1;
zohobugtracker.entity.store("6573492", value, count).then(function(response)
/* Output
{
"properties": [
{
"key": "6573492",
"value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"sample.png\"}]",
"count" : 1,
"id": 1587134426
}
]
}
*/
);
Argument name | Data type | Description |
key | string |
Unique string used to identify the entity property. Only this key should be used to retrieve the data later. Note: Max length: <255> TBD |
value | JSONObject | Property / Data that has to be stored against the entity. |
count | Integer | Number of occurrences stored against the entity. |
If the entity is deleted, the data stored against the entity is deleted automatically.
Retrieves
the data stored against an entity. The argument of this method should
be the key that was used when the same data was stored.
zohobugtracker.entity.retrieve("6573492").then(function(response)
/*Output
{
"properties": [
{
"key": "6573492",
"value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"update.png\"}]",
"id": 1587134426,
"count: 1
}
]
}
*/
);
entity.updateUpdates the data that's stored against an entity. The argument of this method is a JSON object with the following four predefined keys:
Argument name | Data type | Description |
id | string | The ID that was generated as the output while storing the current key against the entity using the entity.store() method. |
key | string | The new key has to be mapped against the entity. You can also choose to retain the old/current key. |
value | JSON Object | The data or property that has to be updated against the entity. |
count | Integer | Number of occurrences updated against the entity. |
var valueObj = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample_New.png"}
];
zohoprojects.entity.update({id:"1587134426",key:"6573492",value:valueObj,count:2}).then(function(response)
/*Output
{
"properties": [
{
"key": "6573492",
"value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"Sample_New.png\"}]",
"id": 1587134426,
"count" : 2
}
]
}
*/
);
Deletes the
data that's stored against a specific entity. The argument of this
method is the ID that was generated as the output when the same data was
stored using the 'entity.store()' method.
zohobugtrack
er.entity.remove(1587134426).then(function(response)/* Output { "status": "success" } */ );
It is a key-value pair that's stored against the extension itself. However, the data stored against an extension will be lost if the extension is uninstalled from the product. Whereas, the data stored against an entity will be retained even if the extension is uninstalled because only the extension-specific information gets deleted and the entity-specific data will still be available for the other extensions to access.
Stores data against an extension.
var value = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample.png"}
];
zohobugtracker.app.store("6573492", value).then(function(response)
/* Output
{
"properties": [
{
"key": "6573492",
"value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"sample.png\"}]",
"id": 1587134426
}
]
}
*/
);
Argument name | Data type | Description |
key | string | Unique string used to identify the extension property. |
value | JSONObject | Property/Data that has to be stored against the extension. |
zohobugtracker.app.retrieve("6573492").then(function(response)
/*Output
{
"properties": [
{
"key": "6573492",
"value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"update.png\"}]",
"id": 1587134426
}
]
}
*/
);
Updates the data
that's stored against an extension. The argument of this method is a
JSON object with the following predefined keys:
Argument name | Data type | Description |
id | string | The ID that was generated as the output while storing the current key against the extension using the app.store() method. |
key | string | The new key that has to be mapped against the extension. You can also choose to retain the old/current key. |
value | JSON Object | The data or property that has to be updated against the extension. |
var valueObj = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample_New.png"}
];
zohobugtracker.app.update({id:"1587134426",key:"6573492",value:valueObj}).then(function(response)
/*Output
{
"properties": [
{
"key": "6573492",
"value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"Sample_New.png\"}]",
"id": 1587134426
}
]
}
*/
);
zohobugtracker.app.remove(1587134426).then(function(response)
/* Output
{
"status": "success"
}
*/
);
Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.
If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.
You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.