Contagt Asset Sharing API
Die contagt Asset Sharing API unterstützt sowohl das Live-Location Sharing für Accounts, als auch das Teilen von Assets und statischen Inhalten.
Assets sind dabei immer an Accounts mit der Asset-Permission gekoppelt. Nur Accounts, die eine Asset-Permission haben, können auch Assets erstellen oder einsehen.
Alle im folgenden dargestellten Methoden sind im strict
-Modus.
Creating an Asset
Function Name:
CreateAsset
Request:
{
"userToken": String, // Account Usertoken (not API Usertoken)
"sharedSecret": String, // Account's shared secret
"assetAlias": String, // An Account Alias (a token that will be shared with accounts)
"assetName": String // The name of the Asset
}
Response:
{
"success": true,
"response": {
"CreateAsset": [
"My_Third_Asset2323"
]
}
}
Required Authentication:
API Login, Account Login, Asset Permission
Named Params
true
Deleting an Asset
Function Name:
DeleteAsset
Request:
{
"userToken": String, // Account Usertoken (not API Usertoken)
"sharedSecret": String, // Account's shared secret
"assetAlias": String, // An Account Alias (a token that will be shared with accounts)
}
Response:
{
"success": true,
"response": {
"DeleteAsset": [
true
]
}
}
Required Authentication:
API Login, Account Login, Asset Permission
Named Params
true
Add an Attribute to an Asset
Function Name:
AddAttributeToAsset
Request:
{
"userToken": String, // Account Usertoken (not API Usertoken)
"sharedSecret": String, // Account's shared secret
"assetAlias": String, // An Account Alias (a token that will be shared with accounts)
"attributeName": String, // A Name for the new Attriubte
"attributeValue": String // A Value for that Attribute
}
Response:
{
"success": true,
"response": {
"AddAttributeToAsset": [
true
]
}
}
Required Authentication:
API Login, Account Login, Asset Permission
Named Params
true
Remove an Attribute from an Asset
Function Name:
RemoveAttributeFromAsset
Request:
{
"userToken": String, // Account Usertoken (not API Usertoken)
"sharedSecret": String, // Account's shared secret
"assetAlias": String, // An Account Alias (a token that will be shared with accounts)
"attributeName": String // A Name for the new Attriubte
}
Response:
{
"success": true,
"response": {
"AddAttributeToAsset": true
}
}
Required Authentication:
API Login, Account Login, Asset Permission
Named Params
true
Retrieve all Assets of the Account
This API Method allows the User to retrieve all of its managed Assets.
Function Name:
GetAssetsOfAccount
Request:
{
"userToken": String, // Account Usertoken (not API Usertoken)
"sharedSecret": String // Account's shared secret
}
Response:
{
"success": true,
"response": {
"GetAssetsOfAccount": [
{
"assetAlias": "My_First_Asset",
"assetName": "Mein erstes TestAsset",
"attributes": [],
"location": {
"lat": 49.49876,
"lon": 8.46867,
"building_id": 19,
"root_tag": "10000032",
"floor": 0
},
"remainingMinutes": 0,
"room": [
{
"roomId": 78,
"buildingId": 1,
"floor": 0,
"roomName": "Seminarraum",
"color": "19232D5C",
"bgColor": "ffffffff",
"textColor": "ff000000",
"connectedTag": "bMxa6bwY",
"roomHandle": "00110WVoU2bDFabeGbwuopLvbOQN9XI0Rzomv",
"roomUri": "00110WVoU2bDFabeGbwuopLvbOQN9XI0Rzomv",
"imageUri": null,
"panoramaUri": null,
"panoramaThumbUri": null,
"contentMode": 0,
"externalIdentifier": "",
"statistics": {
"visitors": null
}
}
]
}
]
}
}
Required Authentication:
API Login, Account Login, Asset Permission
Named Params
true
Find an Asset
Function Name:
FindAsset
Request:
{
"userToken": String, // Account Usertoken (not API Usertoken)
"sharedSecret": String, // Account's shared secret
"lat": float, // Latitude
"lon": float, // Longitude
"radius": float, // The maximum Distance the given location can be away from the Asset.
"searchKey": String, // The Fulltext-Searchterm. Searches in Attriutes and Names of Assets
"limit": Int // Maxmimum number of Searchresults
}
Response:
{
"success": true,
"response": {
"FindAsset": [
{
"assetAlias": "My_Third_Asset",
"assetName": "Mein drittes TestAsset",
"attributes": {
"Gemüsekisten": "Gurken und Tomaten"
},
"location": {
"lat": 54.512,
"lon": 8.22,
"building_id": 51,
"root_tag": "CbMYAhkv",
"floor": 0
},
"room": [ // Optional
{
"roomId": 78,
"buildingId": 1,
"floor": 0,
"roomName": "Seminarraum",
"color": "19232D5C",
"bgColor": "ffffffff",
"textColor": "ff000000",
"connectedTag": "bMxa6bwY",
"roomHandle": "00110WVoU2bDFabeGbwuopLvbOQN9XI0Rzomv",
"roomUri": "00110WVoU2bDFabeGbwuopLvbOQN9XI0Rzomv",
"imageUri": null,
"panoramaUri": null,
"panoramaThumbUri": null,
"contentMode": 0,
"externalIdentifier": "",
"statistics": {
"visitors": null
}
}
],
"remainingMinutes": 0,
"distance": 557713.87
}
]
}
}
Required Authentication:
API Login, Account Login, Asset Permission
Named Params
true