Creates a gateway with given parameters
| Param name | Description |
|---|---|
|
gateway required |
Object containing information about the gateway to be created Value: Must be a Hash |
|
pretty optional |
Return a pretty formatted response if true, Default is false Value: Must be a Boolean |
Request
curl -X GET -H "Content-Type:application/json" -H "X-Auth-Token:WtUFnj8pvSxVnH9e_xkq7A" -d '{"gateway":{"name":"Vertical gateway"}}' https://api.datonis.io/api/v3/gateway
Response (returns details of the gateway created)
{
"gateway": {
"gateway_key": "4ea741566a",
"gateway_type": null,
"name": "Vertical gateway",
"gateway_version": null,
"tags": "",
"adapters": [
]
}
}
Returns a list of all gateways belonging to an account as per the specified criteria. This API is paginated and returns 20 gateways by default. A gateway is uniquely identified by a 'gateway_key'. This key should be used in all the other API referencing a particular gateway.
| Param name | Description |
|---|---|
|
page optional |
Page number of results to be fetched, Default 1 Value: Must be Integer. |
|
per optional |
Number of gateways records to be returned in one page, Default 20 Value: Must be Integer. |
|
order_by optional |
Field on which resultant gateways should be sorted Value: Must be a String |
|
order optional |
Order, asc or desc, in which results should be sorted Value: Must be a String |
|
pretty optional |
Return a pretty formatted response if true, Default is false Value: Must be a Boolean |
|
search optional |
Keywords based on which gateways should be searched. Currently you can search gateways on - name or tag Value: Must be a String |
|
scope optional |
Matching condition if multiple keywords are specified for search. Valid values are “all” or “any”. Default is “all” Value: Must be a String |
Request - listing all gateways without any criteria
curl -X GET -H "Content-Type:application/json" -H "X-Auth-Token:WtUFnj8pvSxVnH9e_xkq7A" https://api.datonis.io/api/v3/gateway
Response (returns first 20 records)
{
"gateway": [
{
"gateway_key": "a1aad6t93b",
"gateway_type": null,
"name": "gosling123",
"gateway_version": null,
"tags": "bavdhan,pune",
"adapters": [
]
},
{
"gateway_key": "e54986t366",
"gateway_type": "kura",
"name": "trial",
"gateway_version": "4.5.160",
"tags": "hji",
"adapters": [
{
"type": null,
"configuration": "{}",
"enabled": true,
"adapter_pid": "com.altizon.gateway.SimulatorAdapter"
},
{
"type": null,
"configuration": "{}",
"enabled": false,
"adapter_pid": "com.altizon.gateway.OPCUAAdapter"
}
]
}
],
"total_count": 1,
"page": 1
}
Returns details of the gateway requested
| Param name | Description |
|---|---|
|
pretty optional |
Return a pretty formatted response if true, Default is false Value: Must be a Boolean |
Request - get details of the specified gateway (gateway_key specified as a part of the url)
curl -X GET -H "Content-Type:application/json" -H "X-Auth-Token:WtUFnj8pvSxVnH9e_xkq7A" https://api.datonis.io/api/v3/gateway/e54986t366
Response (returns details of the gateway requested)
{
"gateway": {
"gateway_key": "e54986t366",
"gateway_type": "kura",
"name": "trial",
"gateway_version": "4.5.160",
"tags": "hji",
"adapters": [
{
"type": null,
"configuration": "{}",
"enabled": true,
"adapter_pid": "com.altizon.gateway.SimulatorAdapter"
},
{
"type": null,
"configuration": "{}",
"enabled": false,
"adapter_pid": "com.altizon.gateway.OPCUAAdapter"
}
]
}
}
Updates a gateway with given parameters
| Param name | Description |
|---|---|
|
gateway required |
Object containing information about the gateway to be updated Value: Must be a Hash |
|
pretty optional |
Return a pretty formatted response if true, Default is false Value: Must be a Boolean |
Request - containing parameters to be modified
curl -X PUT -H "Content-Type:application/json" -H "X-Auth-Token:WtUFnj8pvSxVnH9e_xkq7A" -d '{"gateway":{"tags":"Pune"}}' https://api.datonis.io/api/v3/gateway/4ea741566a
Response (returns details of the gateway updated)
{
"gateway": {
"gateway_key": "4ea741566a",
"gateway_type": null,
"name": "Vertical gateway",
"gateway_version": null,
"tags": "Pune",
"adapters": [
]
}
}
Deletes the specified gateway from the system. All associated data is also lost.
| Param name | Description |
|---|---|
|
pretty optional |
Return a pretty formatted response if true, Default is false Value: Must be a Boolean |
Request
curl -X DELETE -H "Content-Type:application/json" -H "X-Auth-Token:WtUFnj8pvSxVnH9e_xkq7A" https://api.datonis.io/api/v3/gateway/4ea741566a
Response
{
}
Fetch information about the configuration of a gateway
| Param name | Description |
|---|---|
|
pretty optional |
Return a pretty formatted response if true, Default is false Value: Must be a Boolean |
Request - get configuration details of the specified gateway (gateway_key specified as a part of the url)
curl -X GET -H "Content-Type:application/json" -H "X-Auth-Token:WtUFnj8pvSxVnH9e_xkq7A" https://api.datonis.io/api/v3/gateway/4ea741566a/configuration
Response (returns gateway configuration in encoded form)
{
"result": "data:text/html;charset=utf-8,%3Chtml+lang%3D%22en%22%3E%3Chead%3E%3Ctitle%3EEmbedded+Window%3C%2Ftitle%3E%3C%2Fhead%3E%3Cbody%3E%3Ch1%3E42%3C%2Fh1%3E%3C%2Fbody%3E%3C%2Fhtml%3E"
}
Register gateway initially with the gateway type and version
| Param name | Description |
|---|---|
|
pretty optional |
Return a pretty formatted response if true, Default is false Value: Must be a Boolean |
|
type optional |
Type of gateway e.g. Datonis Edge or other Value: Must be a String |
|
version optional |
Gateway version Value: Must be a String |
|
configuration optional |
Specify the gateway configuration as data URI Value: Must be a String |
Request - containing parameters to be registered
curl -X POST -H "Content-Type:application/json" -H "X-Auth-Token:WtUFnj8pvSxVnH9e_xkq7A" -d '{"gateway":{"gateway_key":"4ea741566a","gateway_version":"4.5.160","gateway_type":"kura","config":"hello world"}}' https://api.datonis.io/api/v3/gateways/register
Response
{
}