Difference between revisions of "Sensaphone.net API/feature"
From Sensaphone.net
(→PUT) |
(→Sensaphone.net API: Update Session data type.) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 31: | Line 31: | ||
}}{{TableRowN| '''Parent Properties''' | '''Child Properties''' | '''Type''' | '''Description''' | }}{{TableRowN| '''Parent Properties''' | '''Child Properties''' | '''Type''' | '''Description''' | ||
}}{{TableRowN| | acctid | Integer | Account ID | }}{{TableRowN| | acctid | Integer | Account ID | ||
| − | }}{{TableRowN| | session | | + | }}{{TableRowN| | session | String | Session Token |
}}{{TableRowN| | request_type | String | "read" | }}{{TableRowN| | request_type | String | "read" | ||
}}{{TableRowN| ''<parent>'' | feature | Array of Objects | The features object | }}{{TableRowN| ''<parent>'' | feature | Array of Objects | The features object | ||
| Line 40: | Line 40: | ||
}}{{TableRowN| '''Parent Properties''' | '''Child Property''' | '''Status''' | '''Type''' | '''Description''' | }}{{TableRowN| '''Parent Properties''' | '''Child Property''' | '''Status''' | '''Type''' | '''Description''' | ||
}}{{TableRowN| | ''<parent object(s)>'' | Optional | Array of Objects | The parent(s) specified in the request. | }}{{TableRowN| | ''<parent object(s)>'' | Optional | Array of Objects | The parent(s) specified in the request. | ||
| − | }}{{TableRowN| ''<parent>'' | feature | Required | Object | The feature linked to the account | + | }}{{TableRowN| ''<parent>'' | feature | Required | Object | The feature linked to the account/device |
}}{{TableRowN| feature | feature_id | Required | Integer | The ID of the feature | }}{{TableRowN| feature | feature_id | Required | Integer | The ID of the feature | ||
}}{{TableRowN| feature | resource | Optional | String | The resource of the feature | }}{{TableRowN| feature | resource | Optional | String | The resource of the feature | ||
| Line 100: | Line 100: | ||
}}{{TableRowN| '''Parent Properties''' | '''Child Properties''' | '''Type''' | '''Description''' | }}{{TableRowN| '''Parent Properties''' | '''Child Properties''' | '''Type''' | '''Description''' | ||
}}{{TableRowN| | acctid | Integer | Account ID | }}{{TableRowN| | acctid | Integer | Account ID | ||
| − | }}{{TableRowN| | session | | + | }}{{TableRowN| | session | String | Session Token |
}}{{TableRowN| | request_type | String | "read" | }}{{TableRowN| | request_type | String | "read" | ||
}}{{TableRowN| ''<parent>'' | feature | Array of Objects | The feature object | }}{{TableRowN| ''<parent>'' | feature | Array of Objects | The feature object | ||
Latest revision as of 10:33, 10 July 2025
Sensaphone.net API
Specifications
The feature resource
The feature resource has the following properties:
| Parent Property | Property | Type | Description | Create | Delete | Read | Update |
| <parent> | feature | Array of Object | The feature linked to the account/device | ✓ | ✓ | ||
| feature | feature_id | Integer | The ID of the feature | ✓ | |||
| feature | resource | String | The resource of the feature | ✓ | |||
| feature | description | String | The description of the feature | ✓ | |||
| feature | resource_id | Integer | The ID of the resource | ✓ | |||
| feature | parent_ids | Array of Integers | The IDs of the parent features | ✓ | |||
| feature | option | String | The value of the feature | ✓ | ✓ | ||
| feature | is_hidden | Boolean | Is the feature hidden | ✓ |
GET
URI Mode Request URI's:
- Retrieve all the account features
GET https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/account/feature
- Retrieve all the device features
GET https://rest.sensaphone.net/api/v1/{ACCTID}/{SESSIONID}/device/feature
JSON Mode Request URI:
POST https://rest.sensaphone.net/api/v1/account/feature
JSON Mode Request Properties
| Parent Properties | Child Properties | Type | Description |
| acctid | Integer | Account ID | |
| session | String | Session Token | |
| request_type | String | "read" | |
| <parent> | feature | Array of Objects | The features object |
JSON Mode Response Properties
| Parent Properties | Child Property | Status | Type | Description |
| <parent object(s)> | Optional | Array of Objects | The parent(s) specified in the request. | |
| <parent> | feature | Required | Object | The feature linked to the account/device |
| feature | feature_id | Required | Integer | The ID of the feature |
| feature | resource | Optional | String | The resource of the feature |
| feature | description | Optional | String | The description of the feature |
| feature | resource_id | Optional | Integer | The ID of the resource |
| feature | parent_ids | Optional | Array of Integers | The IDs of the parent features |
| feature | option | Optional | String | The value of the feature |
| feature | is_hidden | Optional | Boolean | Is the feature hidden |
Example JSON
Receive all the account features' option
- Request JSON:
{
"acctid": 987654,
"sessionid": "0123-4567-8901",
"request_type": "read",
"account": [
{
"option" : null
}
]
}
- Response JSON
{
"result":
{
"success": true,
"code": 0,
"message": "OK"
},
"response":
{
"account": [
{
"feature": [
{
"feature_id" : 1234,
"option" : "Premium"
}
]
}]
}
}
PUT
URI Mode Request URI's:
- Change an account feature
PUT https://rest.sensaphone.net/api/v1/{ACCTID}/{SEESIONID}/account/feature/option/{NEW_OPTION}
JSON Mode Request URI:
POST https://rest.sensaphone.net/api/v1/account/feature POST https://rest.sensaphone.net/api/v1/device/feature
JSON Mode Request Properties
| Parent Properties | Child Properties | Type | Description |
| acctid | Integer | Account ID | |
| session | String | Session Token | |
| request_type | String | "read" | |
| <parent> | feature | Array of Objects | The feature object |
| feature | CHILD PROPERTY | Feature's child properties to be edited* |
JSON Mode Response Properties
| Parent Properties | Child Property | Status | Type | Description |
| <parent object(s)> | Optional | Array of Objects | The parent(s) specified in the request. | |
| <parent> | feature | Optional | Object | The feature linked to the account/device |
| feature | feature_id | Required | Integer | The ID of the feature |
| feature | option | Optional | String | The value of the feature |