NAV Navigation
Shell HTTP JavaScript Node.js Ruby Python Java Go PHP

Atman IoT v3.0.3

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Atman IoT Server

Base URLs:

Terms of service Email: Atman IoT Web: Atman IoT License: LICENCE

Authentication

AssetController

AssetController.find_by_name

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/asset/by-name/{assetName} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/asset/by-name/{assetName} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset/by-name/{assetName}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset/by-name/{assetName}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/asset/by-name/{assetName}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/asset/by-name/{assetName}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/asset/by-name/{assetName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/asset/by-name/{assetName}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/asset/by-name/{assetName}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /asset/by-name/{assetName}

Used for getting the Asset identified by assetName, by an authorized User or Virtual User identified by the provided token. An Asset is a way of logical grouping of Devices. One Asset can contain many Devices and can belong to one AssetGroup.

References: AssetGroupController, DeviceController, UserController, AssetModel

Parameters

Name In Type Required Description
assetName path string true none

Example responses

200 Response

{
  "id": 0,
  "name": "string",
  "description": "string",
  "assetGroupId": 0
}

Responses

Status Meaning Description Schema
200 OK Returns Asset model instance that matches provided Asset name Asset
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

AssetController.updateById

Code samples

# You can also use wget
curl -X PATCH https://atman-iot.com/api/asset/{id} \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://atman-iot.com/api/asset/{id} HTTP/1.1
Host: atman-iot.com
Content-Type: application/json

const inputBody = '{
  "name": "string",
  "description": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset/{id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "name": "string",
  "description": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset/{id}',
{
  method: 'PATCH',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://atman-iot.com/api/asset/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://atman-iot.com/api/asset/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/asset/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://atman-iot.com/api/asset/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://atman-iot.com/api/asset/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PATCH /asset/{id}

Edit (Patch) Asset by Id

Body parameter

{
  "name": "string",
  "description": "string"
}

Parameters

Name In Type Required Description
id path number true none
body body AssetExcluding_id-assetGroupId_ false none

Responses

Status Meaning Description Schema
204 No Content Asset PATCH success None
401 Unauthorized User is not authorized None
404 Not Found Asset not found None

AssetController.deleteById

Code samples

# You can also use wget
curl -X DELETE https://atman-iot.com/api/asset/{id} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://atman-iot.com/api/asset/{id} HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://atman-iot.com/api/asset/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://atman-iot.com/api/asset/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/asset/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://atman-iot.com/api/asset/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://atman-iot.com/api/asset/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /asset/{id}

Used for deleting an Asset, identified by id by an authorized User identified by the provided token.

References: UserController, AssetModel

Parameters

Name In Type Required Description
id path number true none

Responses

Status Meaning Description Schema
204 No Content Asset model instance deletion verification None
401 Unauthorized User is not authorized None

AssetController.create

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/asset \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/asset HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "name": "string",
  "description": "string",
  "assetGroupId": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "name": "string",
  "description": "string",
  "assetGroupId": 0
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/asset',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/asset', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/asset");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/asset", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/asset', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /asset

Used for creating a new Asset, by an authorized User, identified by the provided token. An Asset is a way of logical grouping of Devices. One Asset can contain many Devices and can belong to one AssetGroup.

References: AssetGroupController, DeviceController, UserController, AssetModel

Body parameter

{
  "name": "string",
  "description": "string",
  "assetGroupId": 0
}

Parameters

Name In Type Required Description
body body AssetExcluding_id_ false none

Example responses

200 Response

{
  "id": 0,
  "name": "string",
  "description": "string",
  "assetGroupId": 0
}

Responses

Status Meaning Description Schema
200 OK Returns created Asset model instance Asset
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

AssetController.find_by_userId

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/assets/by-user/{userId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/assets/by-user/{userId} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/assets/by-user/{userId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/assets/by-user/{userId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/assets/by-user/{userId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/assets/by-user/{userId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/assets/by-user/{userId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/assets/by-user/{userId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/assets/by-user/{userId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /assets/by-user/{userId}

Used for getting the Assets of an authorized User identified by the provided userId, by an authorized Admin. An Asset is a way of logical grouping of Devices. One Asset can contain many Devices and can belong to one AssetGroup.

References: AssetGroupController, DeviceController, UserController, AssetModel

Parameters

Name In Type Required Description
userId path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "name": "string",
    "description": "string",
    "assetGroupId": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Returns array of Asset model instances that matches provided User Id Inline
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Asset] false none none
» Asset object false none none
»» id number false none Automatically generated ID
»» name string false none Asset name
»» description string false none Asset description
»» assetGroupId number true none ID of AssetGroup that Asset belongs to

AssetController.find

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/assets/{assetGroupId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/assets/{assetGroupId} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/assets/{assetGroupId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/assets/{assetGroupId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/assets/{assetGroupId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/assets/{assetGroupId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/assets/{assetGroupId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/assets/{assetGroupId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/assets/{assetGroupId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /assets/{assetGroupId}

Used for getting the Assets belonging to an AssetGroup, in turn belonging to an authorized User or Virtual User. An Asset is a way of logical grouping of Devices. One Asset can contain many Devices and can belong to the AssetGroup with the provided assetGroupId. An AssetGroup can have many Assets. .

References:
AssetGroupController, DeviceController, UserController, AssetModel

Parameters

Name In Type Required Description
assetGroupId path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "name": "string",
    "description": "string",
    "assetGroupId": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Returns Array of Asset model instances in AssetGroup with provided id Inline
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Asset] false none none
» Asset object false none none
»» id number false none Automatically generated ID
»» name string false none Asset name
»» description string false none Asset description
»» assetGroupId number true none ID of AssetGroup that Asset belongs to

AssetGroupController

AssetGroupController.createAssetGroup

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/asset-group/user \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/asset-group/user HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "name": "string",
  "description": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset-group/user',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "name": "string",
  "description": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset-group/user',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/asset-group/user',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/asset-group/user', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/asset-group/user");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/asset-group/user", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/asset-group/user', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /asset-group/user

Body parameter

{
  "name": "string",
  "description": "string"
}

Parameters

Name In Type Required Description
body body AssetGroupExcluding_id-userId_ false none

Example responses

200 Response

{
  "id": 0,
  "name": "string",
  "description": "string",
  "userId": 0
}

Responses

Status Meaning Description Schema
200 OK Returns created AssetGroup model instance AssetGroup
401 Unauthorized User is not authorized None

AssetGroupController.updateById

Code samples

# You can also use wget
curl -X PATCH https://atman-iot.com/api/asset-group/{id} \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://atman-iot.com/api/asset-group/{id} HTTP/1.1
Host: atman-iot.com
Content-Type: application/json

const inputBody = '{
  "name": "string",
  "description": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset-group/{id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "name": "string",
  "description": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset-group/{id}',
{
  method: 'PATCH',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://atman-iot.com/api/asset-group/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://atman-iot.com/api/asset-group/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/asset-group/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://atman-iot.com/api/asset-group/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://atman-iot.com/api/asset-group/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PATCH /asset-group/{id}

Edit (PATCH) AssetGroup

Body parameter

{
  "name": "string",
  "description": "string"
}

Parameters

Name In Type Required Description
id path number true none
body body AssetGroupExcluding_id-userId_ false none

Responses

Status Meaning Description Schema
204 No Content AssetGroup PATCH success None
401 Unauthorized User is not authorized None
404 Not Found AssetGroup not found None

AssetGroupController.deleteById

Code samples

# You can also use wget
curl -X DELETE https://atman-iot.com/api/asset-group/{id} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://atman-iot.com/api/asset-group/{id} HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset-group/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset-group/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://atman-iot.com/api/asset-group/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://atman-iot.com/api/asset-group/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/asset-group/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://atman-iot.com/api/asset-group/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://atman-iot.com/api/asset-group/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /asset-group/{id}

Parameters

Name In Type Required Description
id path number true none

Responses

Status Meaning Description Schema
204 No Content AssetGroup model instance deletion verification None
401 Unauthorized User is not authorized None

AssetGroupController.findUserAssetGroups

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/asset-groups/user \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/asset-groups/user HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset-groups/user',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/asset-groups/user',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/asset-groups/user',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/asset-groups/user', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/asset-groups/user");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/asset-groups/user", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/asset-groups/user', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /asset-groups/user

Example responses

200 Response

[
  {
    "id": 0,
    "name": "string",
    "description": "string",
    "userId": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Returns Array of user's AssetGroup model instances Inline
401 Unauthorized User is not authorized None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [AssetGroup] false none none
» AssetGroup object false none none
»» id number false none Automatically generated ID
»» name string false none AssetGroup name
»» description string false none AssetGroup description
»» userId number true none ID of User that AssetGroup belongs to

DashboardElementController

DashboardElementController.moveElementDown

Code samples

# You can also use wget
curl -X PATCH https://atman-iot.com/api/dashboard-element/{id}/move-down \
  -H 'Authorization: Bearer {access-token}'

PATCH https://atman-iot.com/api/dashboard-element/{id}/move-down HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/dashboard-element/{id}/move-down',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/dashboard-element/{id}/move-down',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://atman-iot.com/api/dashboard-element/{id}/move-down',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://atman-iot.com/api/dashboard-element/{id}/move-down', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/dashboard-element/{id}/move-down");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://atman-iot.com/api/dashboard-element/{id}/move-down", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://atman-iot.com/api/dashboard-element/{id}/move-down', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PATCH /dashboard-element/{id}/move-down

Parameters

Name In Type Required Description
id path number true none

Responses

Status Meaning Description Schema
204 No Content Move up Dashboard Element success None
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DashboardElementController.moveElementUp

Code samples

# You can also use wget
curl -X PATCH https://atman-iot.com/api/dashboard-element/{id}/move-up \
  -H 'Authorization: Bearer {access-token}'

PATCH https://atman-iot.com/api/dashboard-element/{id}/move-up HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/dashboard-element/{id}/move-up',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/dashboard-element/{id}/move-up',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://atman-iot.com/api/dashboard-element/{id}/move-up',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://atman-iot.com/api/dashboard-element/{id}/move-up', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/dashboard-element/{id}/move-up");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://atman-iot.com/api/dashboard-element/{id}/move-up", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://atman-iot.com/api/dashboard-element/{id}/move-up', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PATCH /dashboard-element/{id}/move-up

Parameters

Name In Type Required Description
id path number true none

Responses

Status Meaning Description Schema
204 No Content Move up Dashboard Element success None
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DashboardElementController.deleteById

Code samples

# You can also use wget
curl -X DELETE https://atman-iot.com/api/dashboard-element/{id} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://atman-iot.com/api/dashboard-element/{id} HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/dashboard-element/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/dashboard-element/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://atman-iot.com/api/dashboard-element/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://atman-iot.com/api/dashboard-element/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/dashboard-element/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://atman-iot.com/api/dashboard-element/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://atman-iot.com/api/dashboard-element/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /dashboard-element/{id}

Parameters

Name In Type Required Description
id path number true none

Responses

Status Meaning Description Schema
204 No Content DashboardElement DELETE success None

DashboardElementController.create

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/dashboard-element \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/dashboard-element HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "assetId": 0,
  "userId": 0,
  "deviceCategory": "string",
  "deviceCategoryB": "string",
  "channelCategory": "string",
  "channelCategoryB": "string",
  "elementType": "string",
  "location": "string",
  "timeWindow": 0,
  "operation": "string",
  "groupBy": "string",
  "title": "string",
  "xLabel": "string",
  "yLabel": "string",
  "yLabelB": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/dashboard-element',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "assetId": 0,
  "userId": 0,
  "deviceCategory": "string",
  "deviceCategoryB": "string",
  "channelCategory": "string",
  "channelCategoryB": "string",
  "elementType": "string",
  "location": "string",
  "timeWindow": 0,
  "operation": "string",
  "groupBy": "string",
  "title": "string",
  "xLabel": "string",
  "yLabel": "string",
  "yLabelB": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/dashboard-element',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/dashboard-element',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/dashboard-element', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/dashboard-element");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/dashboard-element", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/dashboard-element', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /dashboard-element

Body parameter

{
  "assetId": 0,
  "userId": 0,
  "deviceCategory": "string",
  "deviceCategoryB": "string",
  "channelCategory": "string",
  "channelCategoryB": "string",
  "elementType": "string",
  "location": "string",
  "timeWindow": 0,
  "operation": "string",
  "groupBy": "string",
  "title": "string",
  "xLabel": "string",
  "yLabel": "string",
  "yLabelB": "string"
}

Parameters

Name In Type Required Description
body body NewDashboardElement false none

Example responses

200 Response

{
  "id": 0,
  "assetId": 0,
  "userId": 0,
  "deviceCategory": "string",
  "deviceCategoryB": "string",
  "channelCategory": "string",
  "channelCategoryB": "string",
  "elementType": "string",
  "position": 0,
  "location": "string",
  "timeWindow": 0,
  "operation": "string",
  "groupBy": "string",
  "title": "string",
  "xLabel": "string",
  "yLabel": "string",
  "yLabelB": "string"
}

Responses

Status Meaning Description Schema
200 OK Create DashboardElement DashboardElement
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DashboardElementController.findByUserIdAssetIdLocation

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/dashboard-elements/asset-id/{assetId}/user-id/{userId}/location/{location} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/dashboard-elements/asset-id/{assetId}/user-id/{userId}/location/{location} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/dashboard-elements/asset-id/{assetId}/user-id/{userId}/location/{location}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/dashboard-elements/asset-id/{assetId}/user-id/{userId}/location/{location}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/dashboard-elements/asset-id/{assetId}/user-id/{userId}/location/{location}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/dashboard-elements/asset-id/{assetId}/user-id/{userId}/location/{location}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/dashboard-elements/asset-id/{assetId}/user-id/{userId}/location/{location}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/dashboard-elements/asset-id/{assetId}/user-id/{userId}/location/{location}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/dashboard-elements/asset-id/{assetId}/user-id/{userId}/location/{location}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /dashboard-elements/asset-id/{assetId}/user-id/{userId}/location/{location}

Parameters

Name In Type Required Description
assetId path number true none
userId path number true none
location path string true none

Example responses

200 Response

[
  {
    "dashboardElement": {
      "id": 0,
      "assetId": 0,
      "userId": 0,
      "deviceCategory": "string",
      "deviceCategoryB": "string",
      "channelCategory": "string",
      "channelCategoryB": "string",
      "elementType": "string",
      "position": 0,
      "location": "string",
      "timeWindow": 0,
      "operation": "string",
      "groupBy": "string",
      "title": "string",
      "xLabel": "string",
      "yLabel": "string",
      "yLabelB": "string"
    },
    "scope": [
      {}
    ],
    "scopeB": [
      {}
    ]
  }
]

Responses

Status Meaning Description Schema
200 OK Array of DashboardElement model instances Inline
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DashboardElementWithScope] false none none
» DashboardElementWithScope object false none none
»» dashboardElement object true none none
»»» id number false none Automatically generated ID
»»» assetId number true none ID of Asset that Dashboard Element belongs to
»»» userId number true none ID of User that Dashboard Element belongs to
»»» deviceCategory string true none Device A Category
»»» deviceCategoryB string false none Device B Category
»»» channelCategory string true none Channel A Category
»»» channelCategoryB string false none Channel B Category
»»» elementType string true none Element Type
»»» position number true none Element Position
»»» location string true none Element Location: mainDashboard / assetDashboard
»»» timeWindow number true none Time Window in seconds
»»» operation string true none Data Operation
»»» groupBy string true none Data group by
»»» title string false none Element Title
»»» xLabel string false none Element X Label
»»» yLabel string false none Element A Y Label
»»» yLabelB string false none Element B Y Label
»» scope [object] true none none
»» scopeB [object] false none none

DataLoggerController

DataLoggerController.postData

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/data-logger/data/id/{id}/token/{dataLoggerToken} \
  -H 'Content-Type: application/json'

POST https://atman-iot.com/api/data-logger/data/id/{id}/token/{dataLoggerToken} HTTP/1.1
Host: atman-iot.com
Content-Type: application/json

const inputBody = '{
  "manufacturer": "string",
  "devices": [
    {
      "model": "string",
      "serialNo": "string",
      "channels": [
        {
          "name": "string",
          "unit": "string",
          "floatData": [
            {
              "period": 0,
              "measurement": 0,
              "timestamp": "2019-08-24T14:15:22Z"
            }
          ]
        }
      ]
    }
  ]
}';
const headers = {
  'Content-Type':'application/json'
};

fetch('https://atman-iot.com/api/data-logger/data/id/{id}/token/{dataLoggerToken}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "manufacturer": "string",
  "devices": [
    {
      "model": "string",
      "serialNo": "string",
      "channels": [
        {
          "name": "string",
          "unit": "string",
          "floatData": [
            {
              "period": 0,
              "measurement": 0,
              "timestamp": "2019-08-24T14:15:22Z"
            }
          ]
        }
      ]
    }
  ]
};
const headers = {
  'Content-Type':'application/json'
};

fetch('https://atman-iot.com/api/data-logger/data/id/{id}/token/{dataLoggerToken}',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://atman-iot.com/api/data-logger/data/id/{id}/token/{dataLoggerToken}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json'
}

r = requests.post('https://atman-iot.com/api/data-logger/data/id/{id}/token/{dataLoggerToken}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/data-logger/data/id/{id}/token/{dataLoggerToken}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/data-logger/data/id/{id}/token/{dataLoggerToken}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/data-logger/data/id/{id}/token/{dataLoggerToken}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /data-logger/data/id/{id}/token/{dataLoggerToken}

Used for uploading data from a DataLogger identified by id dataLoggerToken

Body parameter

{
  "manufacturer": "string",
  "devices": [
    {
      "model": "string",
      "serialNo": "string",
      "channels": [
        {
          "name": "string",
          "unit": "string",
          "floatData": [
            {
              "period": 0,
              "measurement": 0,
              "timestamp": "2019-08-24T14:15:22Z"
            }
          ]
        }
      ]
    }
  ]
}

Parameters

Name In Type Required Description
id path number true none
dataLoggerToken path string true none
body body DataLoggerData false none

Responses

Status Meaning Description Schema
204 No Content Data uploaded successfully None
406 Not Acceptable Request is not acceptable. Check response for help None

DataLoggerController.uploadData_fromCsv

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/data-logger/data-from-csv/{id}/{dataLoggerToken} \
  -H 'Content-Type: multipart/form-data'

POST https://atman-iot.com/api/data-logger/data-from-csv/{id}/{dataLoggerToken} HTTP/1.1
Host: atman-iot.com
Content-Type: multipart/form-data

const inputBody = '{}';
const headers = {
  'Content-Type':'multipart/form-data'
};

fetch('https://atman-iot.com/api/data-logger/data-from-csv/{id}/{dataLoggerToken}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {};
const headers = {
  'Content-Type':'multipart/form-data'
};

fetch('https://atman-iot.com/api/data-logger/data-from-csv/{id}/{dataLoggerToken}',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'multipart/form-data'
}

result = RestClient.post 'https://atman-iot.com/api/data-logger/data-from-csv/{id}/{dataLoggerToken}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'multipart/form-data'
}

r = requests.post('https://atman-iot.com/api/data-logger/data-from-csv/{id}/{dataLoggerToken}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/data-logger/data-from-csv/{id}/{dataLoggerToken}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"multipart/form-data"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/data-logger/data-from-csv/{id}/{dataLoggerToken}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'multipart/form-data',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/data-logger/data-from-csv/{id}/{dataLoggerToken}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /data-logger/data-from-csv/{id}/{dataLoggerToken}

Used for receiving data, sent in CSV format by a DataLogger identified by id and dataLoggerToken. If the DataLogger is sending data via FTP, endpoint is called internally.

References: DataLoggerModel

Body parameter

{}

Parameters

Name In Type Required Description
id path number true none
dataLoggerToken path string true none
body body object true multipart/form-data value.

Responses

Status Meaning Description Schema
204 No Content File upload verification None
406 Not Acceptable Request is not acceptable. Check response for help None

DataLoggerController.uploadData_fromXml

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/data-logger/data-from-xml/{id}/{dataLoggerToken} \
  -H 'Content-Type: multipart/form-data'

POST https://atman-iot.com/api/data-logger/data-from-xml/{id}/{dataLoggerToken} HTTP/1.1
Host: atman-iot.com
Content-Type: multipart/form-data

const inputBody = '{}';
const headers = {
  'Content-Type':'multipart/form-data'
};

fetch('https://atman-iot.com/api/data-logger/data-from-xml/{id}/{dataLoggerToken}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {};
const headers = {
  'Content-Type':'multipart/form-data'
};

fetch('https://atman-iot.com/api/data-logger/data-from-xml/{id}/{dataLoggerToken}',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'multipart/form-data'
}

result = RestClient.post 'https://atman-iot.com/api/data-logger/data-from-xml/{id}/{dataLoggerToken}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'multipart/form-data'
}

r = requests.post('https://atman-iot.com/api/data-logger/data-from-xml/{id}/{dataLoggerToken}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/data-logger/data-from-xml/{id}/{dataLoggerToken}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"multipart/form-data"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/data-logger/data-from-xml/{id}/{dataLoggerToken}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'multipart/form-data',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/data-logger/data-from-xml/{id}/{dataLoggerToken}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /data-logger/data-from-xml/{id}/{dataLoggerToken}

Used for receiving data, sent in XML format by a DataLogger identified by id and dataLoggerToken. If the DataLogger is sending data via FTP, endpoint is called internally.

References: DataLoggerModel

Body parameter

{}

Parameters

Name In Type Required Description
id path number true none
dataLoggerToken path string true none
body body object true multipart/form-data value.

Responses

Status Meaning Description Schema
204 No Content File upload verification None
406 Not Acceptable Request is not acceptable. Check response for help None

DataLoggerController.setupFromFtp_1

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/data-logger/setup-ftp/step1/{id}/{dataLoggerToken} \
  -H 'Content-Type: multipart/form-data'

POST https://atman-iot.com/api/data-logger/setup-ftp/step1/{id}/{dataLoggerToken} HTTP/1.1
Host: atman-iot.com
Content-Type: multipart/form-data

const inputBody = '{}';
const headers = {
  'Content-Type':'multipart/form-data'
};

fetch('https://atman-iot.com/api/data-logger/setup-ftp/step1/{id}/{dataLoggerToken}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {};
const headers = {
  'Content-Type':'multipart/form-data'
};

fetch('https://atman-iot.com/api/data-logger/setup-ftp/step1/{id}/{dataLoggerToken}',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'multipart/form-data'
}

result = RestClient.post 'https://atman-iot.com/api/data-logger/setup-ftp/step1/{id}/{dataLoggerToken}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'multipart/form-data'
}

r = requests.post('https://atman-iot.com/api/data-logger/setup-ftp/step1/{id}/{dataLoggerToken}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/data-logger/setup-ftp/step1/{id}/{dataLoggerToken}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"multipart/form-data"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/data-logger/setup-ftp/step1/{id}/{dataLoggerToken}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'multipart/form-data',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/data-logger/setup-ftp/step1/{id}/{dataLoggerToken}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /data-logger/setup-ftp/step1/{id}/{dataLoggerToken}

Step 1 of setup process of DataLoggers sending data via FTP. It is used for sending a sample uncompressed file containing raw data, as it was generated by the DataLogger (hardware) identified by dataLoggerToken.

References: DataLoggerModel

Body parameter

{}

Parameters

Name In Type Required Description
id path number true none
dataLoggerToken path string true none
body body object true multipart/form-data value.

Responses

Status Meaning Description Schema
204 No Content File upload verification None
406 Not Acceptable Request is not acceptable. Check response for help None

DataLoggerController.setupFromFtp_csv_2

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/data-logger/setup-ftp/step2/csv/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/data-logger/setup-ftp/step2/csv/{id} HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "delimiter": "string",
  "decimalPoint": "string",
  "timeData": {
    "column": 0,
    "firstItemRow": 0,
    "nextItemIteration": 0,
    "timezone": {
      "row": 0,
      "column": 0,
      "setManually": true,
      "manualValue": "string"
    },
    "format": {
      "row": 0,
      "column": 0,
      "setManually": true,
      "manualValue": "string"
    }
  },
  "data": {
    "header": {
      "firstItemCol": 0,
      "nextItemIteration": 0,
      "model": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": "string"
      },
      "serialNo": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": "string"
      },
      "channelName": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": [
          "string"
        ]
      },
      "channelUnit": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": [
          "string"
        ]
      },
      "period": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": 0
      }
    },
    "value": {
      "firstItemRow": 0,
      "nextItemIteration": 0
    }
  },
  "confirm": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-logger/setup-ftp/step2/csv/{id}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "delimiter": "string",
  "decimalPoint": "string",
  "timeData": {
    "column": 0,
    "firstItemRow": 0,
    "nextItemIteration": 0,
    "timezone": {
      "row": 0,
      "column": 0,
      "setManually": true,
      "manualValue": "string"
    },
    "format": {
      "row": 0,
      "column": 0,
      "setManually": true,
      "manualValue": "string"
    }
  },
  "data": {
    "header": {
      "firstItemCol": 0,
      "nextItemIteration": 0,
      "model": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": "string"
      },
      "serialNo": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": "string"
      },
      "channelName": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": [
          "string"
        ]
      },
      "channelUnit": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": [
          "string"
        ]
      },
      "period": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": 0
      }
    },
    "value": {
      "firstItemRow": 0,
      "nextItemIteration": 0
    }
  },
  "confirm": true
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-logger/setup-ftp/step2/csv/{id}',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/data-logger/setup-ftp/step2/csv/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/data-logger/setup-ftp/step2/csv/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/data-logger/setup-ftp/step2/csv/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/data-logger/setup-ftp/step2/csv/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/data-logger/setup-ftp/step2/csv/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /data-logger/setup-ftp/step2/csv/{id}

Step 2 of setup process of DataLoggers sending CSV data via FTP. It is used for mapping properties of the sent file to properties of models in the system. DataLogger to be setup, is identified by id and User performing operation is identified by token. Endpoint response represents the results of the mapping (required in Step 3). If it is satisfactory, it is saved by setting the property confirm to true.

References: UserController, DataLoggerModel

Body parameter

{
  "delimiter": "string",
  "decimalPoint": "string",
  "timeData": {
    "column": 0,
    "firstItemRow": 0,
    "nextItemIteration": 0,
    "timezone": {
      "row": 0,
      "column": 0,
      "setManually": true,
      "manualValue": "string"
    },
    "format": {
      "row": 0,
      "column": 0,
      "setManually": true,
      "manualValue": "string"
    }
  },
  "data": {
    "header": {
      "firstItemCol": 0,
      "nextItemIteration": 0,
      "model": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": "string"
      },
      "serialNo": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": "string"
      },
      "channelName": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": [
          "string"
        ]
      },
      "channelUnit": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": [
          "string"
        ]
      },
      "period": {
        "firstItemRow": 0,
        "setManually": true,
        "manualValue": 0
      }
    },
    "value": {
      "firstItemRow": 0,
      "nextItemIteration": 0
    }
  },
  "confirm": true
}

Parameters

Name In Type Required Description
id path number true none
body body RequestDataLoggerSetupCsv2Excluding_fileFormat_ false none

Example responses

200 Response

{
  "deviceTypes": [
    {
      "id": 0,
      "model": "string",
      "description": "string",
      "manufacturer": "string",
      "category": "string",
      "error": true,
      "channelTypes": [
        {
          "id": 0,
          "name": "string",
          "category": "string",
          "description": "string",
          "unit": "string",
          "channelType": "string",
          "deviceTypeId": 0,
          "error": true
        }
      ]
    }
  ],
  "devices": [
    {
      "id": 0,
      "description": "string",
      "serialNo": "string",
      "dataLoggerId": 0,
      "deviceTypeId": 0
    }
  ],
  "sample": {
    "value": {},
    "period": 0,
    "timestamp": {
      "value": "2019-08-24T14:15:22Z",
      "format": "string",
      "timezone": "string"
    },
    "scope": "string"
  },
  "errorCount": 0,
  "errors": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK Data logger configuration file ResponseDataLoggerSetupStep2
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DataLoggerController.setupFromFtp_Xml_2

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/data-logger/setup-ftp/step2/xml/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/data-logger/setup-ftp/step2/xml/{id} HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "objectListKey": "string",
  "model": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "serialNo": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "channelName": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "channelUnit": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "value": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "period": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "timestamp": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "confirm": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-logger/setup-ftp/step2/xml/{id}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "objectListKey": "string",
  "model": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "serialNo": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "channelName": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "channelUnit": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "value": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "period": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "timestamp": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "confirm": true
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-logger/setup-ftp/step2/xml/{id}',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/data-logger/setup-ftp/step2/xml/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/data-logger/setup-ftp/step2/xml/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/data-logger/setup-ftp/step2/xml/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/data-logger/setup-ftp/step2/xml/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/data-logger/setup-ftp/step2/xml/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /data-logger/setup-ftp/step2/xml/{id}

Step 2 of setup process of DataLoggers sending XML data via FTP. It is used for mapping properties of the sent file to properties of models in the system. DataLogger to be setup, is identified by id and User performing operation is identified by token. Endpoint response represents the results of the mapping (required in Step 3). If it is satisfactory, it is saved by setting the property confirm to true.

References: UserController, DataLoggerModel

Body parameter

{
  "objectListKey": "string",
  "model": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "serialNo": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "channelName": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "channelUnit": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "value": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "period": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "timestamp": {
    "key": "string",
    "isString": true,
    "performSplit": [
      {
        "delimiter": "string",
        "location": 0
      }
    ]
  },
  "confirm": true
}

Parameters

Name In Type Required Description
id path number true none
body body RequestDataLoggerSetupXml2Excluding_fileFormat_ false none

Example responses

200 Response

{
  "deviceTypes": [
    {
      "id": 0,
      "model": "string",
      "description": "string",
      "manufacturer": "string",
      "category": "string",
      "error": true,
      "channelTypes": [
        {
          "id": 0,
          "name": "string",
          "category": "string",
          "description": "string",
          "unit": "string",
          "channelType": "string",
          "deviceTypeId": 0,
          "error": true
        }
      ]
    }
  ],
  "devices": [
    {
      "id": 0,
      "description": "string",
      "serialNo": "string",
      "dataLoggerId": 0,
      "deviceTypeId": 0
    }
  ],
  "sample": {
    "value": {},
    "period": 0,
    "timestamp": {
      "value": "2019-08-24T14:15:22Z",
      "format": "string",
      "timezone": "string"
    },
    "scope": "string"
  },
  "errorCount": 0,
  "errors": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK Data logger configuration JSON ResponseDataLoggerSetupStep2
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DataLoggerController.setupFromFtp_3

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/data-logger/setup-ftp/step3/{id} \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/data-logger/setup-ftp/step3/{id} HTTP/1.1
Host: atman-iot.com
Content-Type: application/json

const inputBody = '{
  "deviceTypes": [
    {
      "id": 0,
      "model": "string",
      "description": "string",
      "manufacturer": "string",
      "category": "string",
      "error": true,
      "channelTypes": [
        {
          "id": 0,
          "name": "string",
          "category": "string",
          "description": "string",
          "unit": "string",
          "channelType": "string",
          "deviceTypeId": 0,
          "error": true
        }
      ]
    }
  ],
  "devices": [
    {
      "id": 0,
      "description": "string",
      "serialNo": "string",
      "dataLoggerId": 0,
      "deviceTypeId": 0
    }
  ],
  "sample": {
    "value": {},
    "period": 0,
    "timestamp": {
      "value": "2019-08-24T14:15:22Z",
      "format": "string",
      "timezone": "string"
    },
    "scope": "string"
  },
  "errorCount": 0,
  "errors": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-logger/setup-ftp/step3/{id}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "deviceTypes": [
    {
      "id": 0,
      "model": "string",
      "description": "string",
      "manufacturer": "string",
      "category": "string",
      "error": true,
      "channelTypes": [
        {
          "id": 0,
          "name": "string",
          "category": "string",
          "description": "string",
          "unit": "string",
          "channelType": "string",
          "deviceTypeId": 0,
          "error": true
        }
      ]
    }
  ],
  "devices": [
    {
      "id": 0,
      "description": "string",
      "serialNo": "string",
      "dataLoggerId": 0,
      "deviceTypeId": 0
    }
  ],
  "sample": {
    "value": {},
    "period": 0,
    "timestamp": {
      "value": "2019-08-24T14:15:22Z",
      "format": "string",
      "timezone": "string"
    },
    "scope": "string"
  },
  "errorCount": 0,
  "errors": [
    "string"
  ]
};
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-logger/setup-ftp/step3/{id}',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/data-logger/setup-ftp/step3/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/data-logger/setup-ftp/step3/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/data-logger/setup-ftp/step3/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/data-logger/setup-ftp/step3/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/data-logger/setup-ftp/step3/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /data-logger/setup-ftp/step3/{id}

Step 3 of setup process of DataLoggers sending data via FTP. It is used for initiating DeviceTypes, ChannelTypes and Devices. Accepts as input the output of Step 2. Make sure that the manufacturer property is added.

References: DeviceController, DeviceTypeController, DeviceTypeChannelTypeController, UserController, DataLoggerModel

Body parameter

{
  "deviceTypes": [
    {
      "id": 0,
      "model": "string",
      "description": "string",
      "manufacturer": "string",
      "category": "string",
      "error": true,
      "channelTypes": [
        {
          "id": 0,
          "name": "string",
          "category": "string",
          "description": "string",
          "unit": "string",
          "channelType": "string",
          "deviceTypeId": 0,
          "error": true
        }
      ]
    }
  ],
  "devices": [
    {
      "id": 0,
      "description": "string",
      "serialNo": "string",
      "dataLoggerId": 0,
      "deviceTypeId": 0
    }
  ],
  "sample": {
    "value": {},
    "period": 0,
    "timestamp": {
      "value": "2019-08-24T14:15:22Z",
      "format": "string",
      "timezone": "string"
    },
    "scope": "string"
  },
  "errorCount": 0,
  "errors": [
    "string"
  ]
}

Parameters

Name In Type Required Description
id path number true none
body body ResponseDataLoggerSetupStep2 false none

Responses

Status Meaning Description Schema
204 No Content Data logger devices initiation verification None
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DataLoggerController.deleteById

Code samples

# You can also use wget
curl -X DELETE https://atman-iot.com/api/data-logger/{id} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://atman-iot.com/api/data-logger/{id} HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-logger/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-logger/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://atman-iot.com/api/data-logger/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://atman-iot.com/api/data-logger/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/data-logger/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://atman-iot.com/api/data-logger/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://atman-iot.com/api/data-logger/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /data-logger/{id}

Deletes a DataLogger identified by id, owned by a User identified by the provided token.

References: UserController, DataLoggerModel

Parameters

Name In Type Required Description
id path number true none

Responses

Status Meaning Description Schema
204 No Content DataLogger model instance deletion verification None
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DataLoggerController.create

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/data-logger \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/data-logger HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "description": "string",
  "connectionType": "string",
  "fileFormat": "string",
  "username": "string",
  "passwd": "string",
  "autoInit": true,
  "dataCompressed": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-logger',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "description": "string",
  "connectionType": "string",
  "fileFormat": "string",
  "username": "string",
  "passwd": "string",
  "autoInit": true,
  "dataCompressed": true
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-logger',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/data-logger',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/data-logger', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/data-logger");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/data-logger", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/data-logger', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /data-logger

Used for creating a new DataLogger by and authorized User, identified by the provided token.

References: UserController, DataLoggerModel

Body parameter

{
  "description": "string",
  "connectionType": "string",
  "fileFormat": "string",
  "username": "string",
  "passwd": "string",
  "autoInit": true,
  "dataCompressed": true
}

Parameters

Name In Type Required Description
body body DataLoggerExcluding_id-authToken-config-userId_ false none

Example responses

200 Response

{
  "id": 0,
  "description": "string",
  "connectionType": "string",
  "fileFormat": "string",
  "username": "string",
  "passwd": "string",
  "authToken": "string",
  "config": "string",
  "autoInit": true,
  "dataCompressed": true,
  "userId": 0
}

Responses

Status Meaning Description Schema
200 OK Returns created DataLogger model instance DataLogger
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DataLoggerController.find

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/data-loggers \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/data-loggers HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-loggers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/data-loggers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/data-loggers',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/data-loggers', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/data-loggers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/data-loggers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/data-loggers', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /data-loggers

Returns an array of DataLoggers owned by a User identified by the provided token.

References: UserController, DataLoggerModel

Example responses

200 Response

[
  {
    "id": 0,
    "description": "string",
    "connectionType": "string",
    "fileFormat": "string",
    "username": "string",
    "passwd": "string",
    "authToken": "string",
    "config": "string",
    "autoInit": true,
    "dataCompressed": true,
    "userId": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Returns Array of DataLogger model instances Inline
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DataLogger] false none none
» DataLogger object false none none
»» id number false none Automatically generated ID
»» description string false none Datalogger description
»» connectionType string true none Method used by DataLogger to send data to the system. At present only FTP implemented
»» fileFormat string true none Format of the files uploaded to the system DataLogger. At present system supports CSV and XML formats
»» username string false none Username of system FTP account, where the DataLogger sends the data (if applicable)
»» passwd string false none Password of system FTP account, where the DataLogger sends the data (if applicable)
»» authToken string false none Authentication token of DataLogger
»» config string false none JSON configuration file for DataLogger
»» autoInit boolean true none Flag for selecting if DataLogger is to be initiated automatically from preexisting configuration
»» dataCompressed boolean true none Flag for selecting if DataLogger sends compressed files
»» userId number true none ID of User that DataLogger belongs to

DeviceController

DeviceController.disableChannelMonitoring

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/disable-monitoring/all/{all} \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/disable-monitoring/all/{all} HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/disable-monitoring/all/{all}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/disable-monitoring/all/{all}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/disable-monitoring/all/{all}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/disable-monitoring/all/{all}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/disable-monitoring/all/{all}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/disable-monitoring/all/{all}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/disable-monitoring/all/{all}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device/{deviceId}/channel/{channelId}/disable-monitoring/all/{all}

Disable monitoring of Channel identified by channelId, in Device identified by deviceId, owned by User authorized by token.

References: UserController, ChannelModel, DeviceModel

Parameters

Name In Type Required Description
deviceId path number true none
channelId path number true none
all path boolean true none

Responses

Status Meaning Description Schema
204 No Content Monitoring disabled None
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DeviceController.enableChannelMonitoring

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/enable-monitoring/all/{all} \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/enable-monitoring/all/{all} HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/enable-monitoring/all/{all}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/enable-monitoring/all/{all}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/enable-monitoring/all/{all}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/enable-monitoring/all/{all}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/enable-monitoring/all/{all}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/enable-monitoring/all/{all}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device/{deviceId}/channel/{channelId}/enable-monitoring/all/{all}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device/{deviceId}/channel/{channelId}/enable-monitoring/all/{all}

Enable monitoring of Channel identified by channelId, in Device identified by deviceId, owned by User authorized by token.

References: UserController, ChannelModel, DeviceModel

Parameters

Name In Type Required Description
deviceId path number true none
channelId path number true none
all path boolean true none

Responses

Status Meaning Description Schema
204 No Content Monitoring enabled None
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DeviceController.createChannel

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/device/{deviceId}/channel \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/device/{deviceId}/channel HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "monitor": true,
  "lastTimestamp": "2019-08-24T14:15:22Z",
  "status": "string",
  "channelTypeId": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{deviceId}/channel',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "monitor": true,
  "lastTimestamp": "2019-08-24T14:15:22Z",
  "status": "string",
  "channelTypeId": 0
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{deviceId}/channel',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/device/{deviceId}/channel',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/device/{deviceId}/channel', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device/{deviceId}/channel");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/device/{deviceId}/channel", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/device/{deviceId}/channel', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /device/{deviceId}/channel

Used for creating a new Channel, belonging to a Device with id deviceId by an authorized User identified by the provided token.

References: UserController, ChannelModel, DeviceModel

Body parameter

{
  "monitor": true,
  "lastTimestamp": "2019-08-24T14:15:22Z",
  "status": "string",
  "channelTypeId": 0
}

Parameters

Name In Type Required Description
deviceId path number true none
body body ChannelExcluding_id-deviceId_ false none

Example responses

200 Response

{
  "id": 0,
  "monitor": true,
  "lastTimestamp": "2019-08-24T14:15:22Z",
  "status": "string",
  "deviceId": 0,
  "channelTypeId": 0
}

Responses

Status Meaning Description Schema
200 OK Returns created Channel model instance in Device with provided id Channel
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DeviceController.findChannelTypes

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device/{deviceId}/channelTypes \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device/{deviceId}/channelTypes HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{deviceId}/channelTypes',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{deviceId}/channelTypes',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device/{deviceId}/channelTypes',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device/{deviceId}/channelTypes', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device/{deviceId}/channelTypes");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device/{deviceId}/channelTypes", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device/{deviceId}/channelTypes', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device/{deviceId}/channelTypes

Used for getting the ChannelTypes of Channels belonging to a Device with id deviceId, by an authorized User identified by the provided token.

References: UserController, ChannelModel, ChannelTypeModel, DeviceModel

Parameters

Name In Type Required Description
deviceId path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "name": "string",
    "category": "string",
    "description": "string",
    "unit": "string",
    "channelType": "string",
    "deviceTypeId": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Returns Array of ChannelType model instances in Device with provided id Inline
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [ChannelType] false none none
» ChannelType object false none none
»» id number false none Automatically generated ID
»» name string true none ChannelType name
»» category string false none ChannelType category
»» description string false none ChannelType description
»» unit string false none Unit of measurement
»» channelType string true none Type of data: UNDEFINED / SPOT_VALUE / COUNTER / TEXT
»» deviceTypeId number true none ID of DeviceType that ChannelType belongs to

DeviceController.findChannels

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device/{deviceId}/channels \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device/{deviceId}/channels HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{deviceId}/channels',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{deviceId}/channels',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device/{deviceId}/channels',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device/{deviceId}/channels', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device/{deviceId}/channels");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device/{deviceId}/channels", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device/{deviceId}/channels', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device/{deviceId}/channels

Used for getting Channels, belonging to a Device with id deviceId, by an authorized User identified by the provided token.

References: UserController, ChannelModel, DeviceModel

Parameters

Name In Type Required Description
deviceId path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "monitor": true,
    "lastTimestamp": "2019-08-24T14:15:22Z",
    "status": "string",
    "deviceId": 0,
    "channelTypeId": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Returns Array of Channel model instances in Device with provided id Inline
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Channel] false none none
» Channel object false none none
»» id number false none Automatically generated ID
»» monitor boolean true none Enable channel monitoring - data recording - by setting to true
»» lastTimestamp string(date-time) false none Timestamp
»» status string false none Channel Status
»» deviceId number true none ID of Device that Channel belongs to
»» channelTypeId number true none ID of ChannelType associated with Channel

DeviceController.create

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/device/{dataLoggerId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/device/{dataLoggerId} HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "description": "string",
  "serialNo": "string",
  "deviceTypeId": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{dataLoggerId}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "description": "string",
  "serialNo": "string",
  "deviceTypeId": 0
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{dataLoggerId}',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/device/{dataLoggerId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/device/{dataLoggerId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device/{dataLoggerId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/device/{dataLoggerId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/device/{dataLoggerId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /device/{dataLoggerId}

Used for creating a new Device, belonging to a DataLogger with id dataLoggerId by an authorized User identified by the provided token.

References: DataLoggerController, UserController, DeviceModel

Body parameter

{
  "description": "string",
  "serialNo": "string",
  "deviceTypeId": 0
}

Parameters

Name In Type Required Description
dataLoggerId path number true none
body body DeviceExcluding_id-dataLoggerId_ false none

Example responses

200 Response

{
  "id": 0,
  "description": "string",
  "serialNo": "string",
  "dataLoggerId": 0,
  "deviceTypeId": 0
}

Responses

Status Meaning Description Schema
200 OK Returns created Device model instance Device
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DeviceController.updateById

Code samples

# You can also use wget
curl -X PATCH https://atman-iot.com/api/device/{id} \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://atman-iot.com/api/device/{id} HTTP/1.1
Host: atman-iot.com
Content-Type: application/json

const inputBody = '{
  "description": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "description": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device/{id}',
{
  method: 'PATCH',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://atman-iot.com/api/device/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://atman-iot.com/api/device/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://atman-iot.com/api/device/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://atman-iot.com/api/device/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PATCH /device/{id}

Body parameter

{
  "description": "string"
}

Parameters

Name In Type Required Description
id path number true none
body body DeviceExcluding_id-serialNo-dataLoggerId-deviceTypeId_ false none

Responses

Status Meaning Description Schema
204 No Content Device PATCH success None

DeviceController.getDevicesWithType

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/devices/with-device-type \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/devices/with-device-type HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '[
  {
    "id": 0
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/devices/with-device-type',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = [
  {
    "id": 0
  }
];
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/devices/with-device-type',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/devices/with-device-type',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/devices/with-device-type', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/devices/with-device-type");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/devices/with-device-type", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/devices/with-device-type', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /devices/with-device-type

Returns array of devices with their device types

Body parameter

[
  {
    "id": 0
  }
]

Parameters

Name In Type Required Description
body body DeviceExcluding_description-serialNo-dataLoggerId-deviceTypeId_ false none

Example responses

200 Response

[
  {
    "deviceType": {
      "id": 0,
      "model": "string",
      "description": "string",
      "manufacturer": "string",
      "category": "string"
    },
    "device": {
      "id": 0,
      "description": "string",
      "serialNo": "string",
      "dataLoggerId": 0,
      "deviceTypeId": 0
    }
  }
]

Responses

Status Meaning Description Schema
200 OK DeviceType belonging to Device Inline
401 Unauthorized User is not authorized None
404 Not Found Device Not Found None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DeviceWithType] false none none
» DeviceWithType object false none none
»» deviceType object true none none
»»» id number false none Automatically generated ID
»»» model string true none DeviceType model
»»» description string false none DeviceType description
»»» manufacturer string true none DeviceType manufacturer
»»» category string false none DeviceType category
»» device object true none none
»»» id number false none Automatically generated ID
»»» description string false none Device description
»»» serialNo string true none Device serial number
»»» dataLoggerId number true none ID of DataLogger that Device belongs to
»»» deviceTypeId number false none none

DeviceController.find

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/devices/{dataLoggerId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/devices/{dataLoggerId} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/devices/{dataLoggerId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/devices/{dataLoggerId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/devices/{dataLoggerId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/devices/{dataLoggerId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/devices/{dataLoggerId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/devices/{dataLoggerId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/devices/{dataLoggerId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /devices/{dataLoggerId}

Used for getting the Devices, belonging to a DataLogger with id dataLoggerId by an authorized User identified by the provided token.

References: DataLoggerController, UserController, DeviceModel

Parameters

Name In Type Required Description
dataLoggerId path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "description": "string",
    "serialNo": "string",
    "dataLoggerId": 0,
    "deviceTypeId": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Returns Array of Device model in DataLogger with provided id Inline
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Device] false none none
» Device object false none none
»» id number false none Automatically generated ID
»» description string false none Device description
»» serialNo string true none Device serial number
»» dataLoggerId number true none ID of DataLogger that Device belongs to
»» deviceTypeId number false none none

DeviceChannelController

DeviceChannelController.find_by_period

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-channel/data-by-period/{deviceId}/{channelId}/from/{fromTS}/to/{toTs}/page/{page}/count/{count}/groupBy/{groupBy}/operation/{operation} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-channel/data-by-period/{deviceId}/{channelId}/from/{fromTS}/to/{toTs}/page/{page}/count/{count}/groupBy/{groupBy}/operation/{operation} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-channel/data-by-period/{deviceId}/{channelId}/from/{fromTS}/to/{toTs}/page/{page}/count/{count}/groupBy/{groupBy}/operation/{operation}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-channel/data-by-period/{deviceId}/{channelId}/from/{fromTS}/to/{toTs}/page/{page}/count/{count}/groupBy/{groupBy}/operation/{operation}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-channel/data-by-period/{deviceId}/{channelId}/from/{fromTS}/to/{toTs}/page/{page}/count/{count}/groupBy/{groupBy}/operation/{operation}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-channel/data-by-period/{deviceId}/{channelId}/from/{fromTS}/to/{toTs}/page/{page}/count/{count}/groupBy/{groupBy}/operation/{operation}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-channel/data-by-period/{deviceId}/{channelId}/from/{fromTS}/to/{toTs}/page/{page}/count/{count}/groupBy/{groupBy}/operation/{operation}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-channel/data-by-period/{deviceId}/{channelId}/from/{fromTS}/to/{toTs}/page/{page}/count/{count}/groupBy/{groupBy}/operation/{operation}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-channel/data-by-period/{deviceId}/{channelId}/from/{fromTS}/to/{toTs}/page/{page}/count/{count}/groupBy/{groupBy}/operation/{operation}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-channel/data-by-period/{deviceId}/{channelId}/from/{fromTS}/to/{toTs}/page/{page}/count/{count}/groupBy/{groupBy}/operation/{operation}

Parameters

Name In Type Required Description
deviceId path number true none
channelId path number true none
fromTS path string true none
toTs path string true none
page path number true none
count path number true none
groupBy path string true none
operation path string true none

Example responses

200 Response

{
  "channelType": {
    "id": 0,
    "name": "string",
    "category": "string",
    "description": "string",
    "unit": "string",
    "channelType": "string",
    "deviceTypeId": 0
  },
  "dataFloat": [
    {
      "id": 0,
      "period": 0,
      "measurement": 0,
      "timestamp": "2019-08-24T14:15:22Z",
      "channelId": 0
    }
  ],
  "dataText": [
    {
      "id": 0,
      "period": 0,
      "measurement": "string",
      "timestamp": "2019-08-24T14:15:22Z",
      "channelId": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Device Channel Data by time window. ResponseDeviceChannelData
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DeviceChannelController.findDeviceAllLastTS

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-channel/data-last-timestamp/all-channels/{deviceId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-channel/data-last-timestamp/all-channels/{deviceId} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-channel/data-last-timestamp/all-channels/{deviceId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-channel/data-last-timestamp/all-channels/{deviceId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-channel/data-last-timestamp/all-channels/{deviceId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-channel/data-last-timestamp/all-channels/{deviceId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-channel/data-last-timestamp/all-channels/{deviceId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-channel/data-last-timestamp/all-channels/{deviceId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-channel/data-last-timestamp/all-channels/{deviceId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-channel/data-last-timestamp/all-channels/{deviceId}

Parameters

Name In Type Required Description
deviceId path number true none

Example responses

200 Response

[
  {
    "channelType": {
      "id": 0,
      "name": "string",
      "category": "string",
      "description": "string",
      "unit": "string",
      "channelType": "string",
      "deviceTypeId": 0
    },
    "dataFloat": [
      {
        "id": 0,
        "period": 0,
        "measurement": 0,
        "timestamp": "2019-08-24T14:15:22Z",
        "channelId": 0
      }
    ],
    "dataText": [
      {
        "id": 0,
        "period": 0,
        "measurement": "string",
        "timestamp": "2019-08-24T14:15:22Z",
        "channelId": 0
      }
    ]
  }
]

Responses

Status Meaning Description Schema
200 OK Device Channel Data at the last available timestamp (All channels). Inline
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [ResponseDeviceChannelData] false none none
» ResponseDeviceChannelData object false none none
»» channelType object true none none
»»» id number false none Automatically generated ID
»»» name string true none ChannelType name
»»» category string false none ChannelType category
»»» description string false none ChannelType description
»»» unit string false none Unit of measurement
»»» channelType string true none Type of data: UNDEFINED / SPOT_VALUE / COUNTER / TEXT
»»» deviceTypeId number true none ID of DeviceType that ChannelType belongs to
»» dataFloat [DataFloat] false none none
»»» DataFloat object false none none
»»»» id number false none Automatically generated ID
»»»» period number true none Recording period - seconds
»»»» measurement number true none Recorded measurement
»»»» timestamp string(date-time) true none Timestamp
»»»» channelId number true none ID of Channel that DataFloat belongs to
»» dataText [DataText] false none none
»»» DataText object false none none
»»»» id number false none Automatically generated ID
»»»» period number true none Recording period - seconds
»»»» measurement string true none Recorded data
»»»» timestamp string(date-time) true none Timestamp
»»»» channelId number true none ID of Channel that DataFloat belongs to

DeviceChannelController.findDeviceChannelLastTS

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-channel/data-last-timestamp/{deviceId}/{channelId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-channel/data-last-timestamp/{deviceId}/{channelId} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-channel/data-last-timestamp/{deviceId}/{channelId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-channel/data-last-timestamp/{deviceId}/{channelId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-channel/data-last-timestamp/{deviceId}/{channelId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-channel/data-last-timestamp/{deviceId}/{channelId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-channel/data-last-timestamp/{deviceId}/{channelId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-channel/data-last-timestamp/{deviceId}/{channelId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-channel/data-last-timestamp/{deviceId}/{channelId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-channel/data-last-timestamp/{deviceId}/{channelId}

Parameters

Name In Type Required Description
deviceId path number true none
channelId path number true none

Example responses

200 Response

{
  "channelType": {
    "id": 0,
    "name": "string",
    "category": "string",
    "description": "string",
    "unit": "string",
    "channelType": "string",
    "deviceTypeId": 0
  },
  "dataFloat": [
    {
      "id": 0,
      "period": 0,
      "measurement": 0,
      "timestamp": "2019-08-24T14:15:22Z",
      "channelId": 0
    }
  ],
  "dataText": [
    {
      "id": 0,
      "period": 0,
      "measurement": "string",
      "timestamp": "2019-08-24T14:15:22Z",
      "channelId": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Channel Data of last available timestmp ResponseDeviceChannelData
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DeviceChannelController.findDeviceChannelLastTS_sn_ch_name

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/device-channel/data-last-timestamp-by-name/{serialNo}/{channelName} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/device-channel/data-last-timestamp-by-name/{serialNo}/{channelName} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-channel/data-last-timestamp-by-name/{serialNo}/{channelName}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-channel/data-last-timestamp-by-name/{serialNo}/{channelName}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/device-channel/data-last-timestamp-by-name/{serialNo}/{channelName}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/device-channel/data-last-timestamp-by-name/{serialNo}/{channelName}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-channel/data-last-timestamp-by-name/{serialNo}/{channelName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/device-channel/data-last-timestamp-by-name/{serialNo}/{channelName}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/device-channel/data-last-timestamp-by-name/{serialNo}/{channelName}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /device-channel/data-last-timestamp-by-name/{serialNo}/{channelName}

Parameters

Name In Type Required Description
serialNo path string true none
channelName path string true none

Example responses

200 Response

{
  "channelType": {
    "id": 0,
    "name": "string",
    "category": "string",
    "description": "string",
    "unit": "string",
    "channelType": "string",
    "deviceTypeId": 0
  },
  "dataFloat": [
    {
      "id": 0,
      "period": 0,
      "measurement": 0,
      "timestamp": "2019-08-24T14:15:22Z",
      "channelId": 0
    }
  ],
  "dataText": [
    {
      "id": 0,
      "period": 0,
      "measurement": "string",
      "timestamp": "2019-08-24T14:15:22Z",
      "channelId": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Channel Data of last available timestmp, queried by device SN and channel name. ResponseDeviceChannelData
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DeviceChannelController.findDeviceAllLastRecordedTS

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-channel/last-timestamp-in-device/{deviceId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-channel/last-timestamp-in-device/{deviceId} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-channel/last-timestamp-in-device/{deviceId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-channel/last-timestamp-in-device/{deviceId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-channel/last-timestamp-in-device/{deviceId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-channel/last-timestamp-in-device/{deviceId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-channel/last-timestamp-in-device/{deviceId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-channel/last-timestamp-in-device/{deviceId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-channel/last-timestamp-in-device/{deviceId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-channel/last-timestamp-in-device/{deviceId}

Parameters

Name In Type Required Description
deviceId path number true none

Example responses

200 Response

{
  "value": "2019-08-24T14:15:22Z",
  "format": "string",
  "timezone": "string"
}

Responses

Status Meaning Description Schema
200 OK Last recorded timestamp in device Timestamp
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DeviceEventController

DeviceEventController.find

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-events/assetId/{assetId}/page/{page}/count/{count} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-events/assetId/{assetId}/page/{page}/count/{count} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-events/assetId/{assetId}/page/{page}/count/{count}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-events/assetId/{assetId}/page/{page}/count/{count}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-events/assetId/{assetId}/page/{page}/count/{count}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-events/assetId/{assetId}/page/{page}/count/{count}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-events/assetId/{assetId}/page/{page}/count/{count}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-events/assetId/{assetId}/page/{page}/count/{count}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-events/assetId/{assetId}/page/{page}/count/{count}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-events/assetId/{assetId}/page/{page}/count/{count}

Parameters

Name In Type Required Description
assetId path number true none
page path number true none
count path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "deviceId": 0,
    "channelId": 0,
    "eventRuleId": 0,
    "severity": "string",
    "description": "string",
    "resolved": true,
    "viewedBy": "string",
    "timestamp": "2019-08-24T14:15:22Z",
    "resolutionTimestamp": "2019-08-24T14:15:22Z",
    "device": {
      "id": 0,
      "description": "string",
      "serialNo": "string",
      "dataLoggerId": 0,
      "deviceTypeId": 0,
      "dataLogger": {
        "id": 0,
        "description": "string",
        "connectionType": "string",
        "fileFormat": "string",
        "username": "string",
        "passwd": "string",
        "authToken": "string",
        "config": "string",
        "autoInit": true,
        "dataCompressed": true,
        "userId": 0,
        "user": {
          "id": 0,
          "username": "string",
          "passwd": "string",
          "email": "string",
          "roles": [
            "string"
          ],
          "isVirtual": true,
          "subscriptionReferenceCode": "string",
          "userCredentials": {
            "id": 0,
            "passwd": "string",
            "userId": 0
          }
        }
      },
      "deviceType": {
        "id": 0,
        "model": "string",
        "description": "string",
        "manufacturer": "string",
        "category": "string",
        "channelTypes": [
          {
            "id": 0,
            "name": "string",
            "category": "string",
            "description": "string",
            "unit": "string",
            "channelType": "string",
            "deviceTypeId": 0,
            "deviceType": {}
          }
        ]
      }
    },
    "channel": {
      "id": 0,
      "monitor": true,
      "lastTimestamp": "2019-08-24T14:15:22Z",
      "status": "string",
      "deviceId": 0,
      "channelTypeId": 0,
      "device": {
        "id": 0,
        "description": "string",
        "serialNo": "string",
        "dataLoggerId": 0,
        "deviceTypeId": 0,
        "dataLogger": {
          "id": 0,
          "description": "string",
          "connectionType": "string",
          "fileFormat": "string",
          "username": "string",
          "passwd": "string",
          "authToken": "string",
          "config": "string",
          "autoInit": true,
          "dataCompressed": true,
          "userId": 0,
          "user": {
            "id": 0,
            "username": "string",
            "passwd": "string",
            "email": "string",
            "roles": [
              "string"
            ],
            "isVirtual": true,
            "subscriptionReferenceCode": "string",
            "userCredentials": {
              "id": 0,
              "passwd": "string",
              "userId": 0
            }
          }
        },
        "deviceType": {
          "id": 0,
          "model": "string",
          "description": "string",
          "manufacturer": "string",
          "category": "string",
          "channelTypes": [
            {
              "id": 0,
              "name": "string",
              "category": "string",
              "description": "string",
              "unit": "string",
              "channelType": "string",
              "deviceTypeId": 0,
              "deviceType": {}
            }
          ]
        }
      },
      "channelType": {
        "id": 0,
        "name": "string",
        "category": "string",
        "description": "string",
        "unit": "string",
        "channelType": "string",
        "deviceTypeId": 0,
        "deviceType": {
          "id": 0,
          "model": "string",
          "description": "string",
          "manufacturer": "string",
          "category": "string",
          "channelTypes": [
            {}
          ]
        }
      }
    },
    "eventRule": {
      "id": 0,
      "description": "string",
      "scope": "string",
      "algorithm": "string",
      "action": "string",
      "actionParameters": "string",
      "rule": "string",
      "executionPeriod": 0,
      "lastExecTimestamp": "2019-08-24T14:15:22Z",
      "activated": true,
      "inProgress": true
    }
  }
]

Responses

Status Meaning Description Schema
200 OK Array of DeviceEvents in asset Inline
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DeviceEventWithRelations] false none [(Schema options: { includeRelations: true })]
» DeviceEventWithRelations object false none (Schema options: { includeRelations: true })
»» id number false none Automatically generated ID
»» deviceId number true none ID of Device associated with Event
»» channelId number true none ID of Device associated with Event
»» eventRuleId number true none ID of EventRule triggered
»» severity string true none Event severity - Can be LOW / MEDIUM / HIGH
»» description string false none Event description
»» resolved boolean true none Set to true if Event has been resolved
»» viewedBy string true none Set to true if Event has been resolved
»» timestamp string(date-time) true none Event creation timestamp
»» resolutionTimestamp string(date-time) false none Event resolution timestamp
»» device object false none (Schema options: { includeRelations: true })
»»» id number false none Automatically generated ID
»»» description string false none Device description
»»» serialNo string true none Device serial number
»»» dataLoggerId number true none ID of DataLogger that Device belongs to
»»» deviceTypeId number false none none
»»» dataLogger object false none (Schema options: { includeRelations: true })
»»»» id number false none Automatically generated ID
»»»» description string false none Datalogger description
»»»» connectionType string true none Method used by DataLogger to send data to the system. At present only FTP implemented
»»»» fileFormat string true none Format of the files uploaded to the system DataLogger. At present system supports CSV and XML formats
»»»» username string false none Username of system FTP account, where the DataLogger sends the data (if applicable)
»»»» passwd string false none Password of system FTP account, where the DataLogger sends the data (if applicable)
»»»» authToken string false none Authentication token of DataLogger
»»»» config string false none JSON configuration file for DataLogger
»»»» autoInit boolean true none Flag for selecting if DataLogger is to be initiated automatically from preexisting configuration
»»»» dataCompressed boolean true none Flag for selecting if DataLogger sends compressed files
»»»» userId number true none ID of User that DataLogger belongs to
»»»» user object false none (Schema options: { includeRelations: true })
»»»»» id number false none Automatically generated ID
»»»»» username string true none Username
»»»»» passwd string false none Password
»»»»» email string true none Email
»»»»» roles [string] false none none
»»»»» isVirtual boolean true none Automatically assigned flag to select if User is virtual or not
»»»»» subscriptionReferenceCode string false none none
»»»»» userCredentials object false none (Schema options: { includeRelations: true })
»»»»»» id number false none none
»»»»»» passwd string true none none
»»»»»» userId number true none none
»»» deviceType object false none (Schema options: { includeRelations: true })
»»»» id number false none Automatically generated ID
»»»» model string true none DeviceType model
»»»» description string false none DeviceType description
»»»» manufacturer string true none DeviceType manufacturer
»»»» category string false none DeviceType category
»»»» channelTypes [ChannelTypeWithRelations] false none (Schema options: { includeRelations: true })
»»»»» ChannelTypeWithRelations object false none (Schema options: { includeRelations: true })
»»»»»» id number false none Automatically generated ID
»»»»»» name string true none ChannelType name
»»»»»» category string false none ChannelType category
»»»»»» description string false none ChannelType description
»»»»»» unit string false none Unit of measurement
»»»»»» channelType string true none Type of data: UNDEFINED / SPOT_VALUE / COUNTER / TEXT
»»»»»» deviceTypeId number true none ID of DeviceType that ChannelType belongs to
»»»»»» deviceType object false none (Schema options: { includeRelations: true })
»» channel object false none (Schema options: { includeRelations: true })
»»» id number false none Automatically generated ID
»»» monitor boolean true none Enable channel monitoring - data recording - by setting to true
»»» lastTimestamp string(date-time) false none Timestamp
»»» status string false none Channel Status
»»» deviceId number true none ID of Device that Channel belongs to
»»» channelTypeId number true none ID of ChannelType associated with Channel
»»» device object false none (Schema options: { includeRelations: true })
»»» channelType object false none (Schema options: { includeRelations: true })
»» eventRule object false none (Schema options: { includeRelations: true })
»»» id number false none Automatically generated ID
»»» description string false none Rule description
»»» scope string true none Rule scope
»»» algorithm string false none Event Detection Algorithm
»»» action string true none Rule action
»»» actionParameters string false none Rule action parameters
»»» rule string false none JSON Rule
»»» executionPeriod number false none EventRule execution period - seconds
»»» lastExecTimestamp string(date-time) false none Last execution timestamp
»»» activated boolean false none Is set to true when EventRule has been activated
»»» inProgress boolean false none Is automaticaly set to true when EventRule is being processed

DeviceEventController.countNotViewed

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-events/by-asset/count-not-viewed/{assetId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-events/by-asset/count-not-viewed/{assetId} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-events/by-asset/count-not-viewed/{assetId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-events/by-asset/count-not-viewed/{assetId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-events/by-asset/count-not-viewed/{assetId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-events/by-asset/count-not-viewed/{assetId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-events/by-asset/count-not-viewed/{assetId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-events/by-asset/count-not-viewed/{assetId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-events/by-asset/count-not-viewed/{assetId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-events/by-asset/count-not-viewed/{assetId}

Parameters

Name In Type Required Description
assetId path number true none

Example responses

200 Response

{
  "count": 0
}

Responses

Status Meaning Description Schema
200 OK Count of not viewed Device Events in asset Inline
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

Response Schema

Status Code 200

loopback.Count

Name Type Required Restrictions Description
» count number false none none

DeviceEventController.updateViewedBy

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-events/mark-read/{eventId} \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-events/mark-read/{eventId} HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-events/mark-read/{eventId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-events/mark-read/{eventId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-events/mark-read/{eventId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-events/mark-read/{eventId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-events/mark-read/{eventId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-events/mark-read/{eventId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-events/mark-read/{eventId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-events/mark-read/{eventId}

Parameters

Name In Type Required Description
eventId path number true none

Responses

Status Meaning Description Schema
204 No Content DeviceEvent updated None
401 Unauthorized User is not authorized None
406 Not Acceptable Request is not acceptable. Check response for help None

DeviceGroupMembershipController

DeviceGroupMembershipController.findByAssetId

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-group-memberships/by-asset/{assetId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-group-memberships/by-asset/{assetId} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-group-memberships/by-asset/{assetId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-group-memberships/by-asset/{assetId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-group-memberships/by-asset/{assetId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-group-memberships/by-asset/{assetId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-group-memberships/by-asset/{assetId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-group-memberships/by-asset/{assetId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-group-memberships/by-asset/{assetId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-group-memberships/by-asset/{assetId}

Parameters

Name In Type Required Description
assetId path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "assetId": 0,
    "deviceId": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Array of DeviceGroupMembership model instances Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DeviceGroupMembership] false none none
» DeviceGroupMembership object false none none
»» id number false none Automatically generated ID
»» assetId number true none ID of Device associated with Asset
»» deviceId number true none ID of Device associated with Asset

DeviceGroupMembershipController.findByDeviceId

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-group-memberships/by-device/{deviceId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-group-memberships/by-device/{deviceId} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-group-memberships/by-device/{deviceId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-group-memberships/by-device/{deviceId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-group-memberships/by-device/{deviceId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-group-memberships/by-device/{deviceId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-group-memberships/by-device/{deviceId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-group-memberships/by-device/{deviceId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-group-memberships/by-device/{deviceId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-group-memberships/by-device/{deviceId}

Parameters

Name In Type Required Description
deviceId path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "assetId": 0,
    "deviceId": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Array of DeviceGroupMembership model instances Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DeviceGroupMembership] false none none
» DeviceGroupMembership object false none none
»» id number false none Automatically generated ID
»» assetId number true none ID of Device associated with Asset
»» deviceId number true none ID of Device associated with Asset

DeviceGroupMembershipController.deleteById

Code samples

# You can also use wget
curl -X DELETE https://atman-iot.com/api/device-group-memberships/{id} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://atman-iot.com/api/device-group-memberships/{id} HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-group-memberships/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-group-memberships/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://atman-iot.com/api/device-group-memberships/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://atman-iot.com/api/device-group-memberships/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-group-memberships/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://atman-iot.com/api/device-group-memberships/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://atman-iot.com/api/device-group-memberships/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /device-group-memberships/{id}

Parameters

Name In Type Required Description
id path number true none

Responses

Status Meaning Description Schema
204 No Content DeviceGroupMembership DELETE success None

DeviceGroupMembershipController.create

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/device-group-memberships \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/device-group-memberships HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "assetId": 0,
  "deviceId": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-group-memberships',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "assetId": 0,
  "deviceId": 0
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-group-memberships',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/device-group-memberships',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/device-group-memberships', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-group-memberships");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/device-group-memberships", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/device-group-memberships', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /device-group-memberships

Body parameter

{
  "assetId": 0,
  "deviceId": 0
}

Parameters

Name In Type Required Description
body body DeviceGroupMembershipExcluding_id_ false none

Example responses

200 Response

{
  "id": 0,
  "assetId": 0,
  "deviceId": 0
}

Responses

Status Meaning Description Schema
200 OK DeviceGroupMembership model instance DeviceGroupMembership

DeviceTypeController

DeviceTypeController.count

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-type/count \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-type/count HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type/count',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type/count',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-type/count',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-type/count', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-type/count");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-type/count", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-type/count', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-type/count

Example responses

200 Response

{
  "count": 0
}

Responses

Status Meaning Description Schema
200 OK DeviceType model count Inline

Response Schema

Status Code 200

loopback.Count

Name Type Required Restrictions Description
» count number false none none

DeviceTypeController.getAssetDeviceCategories

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-type/device-categories-in-asset/{assetId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-type/device-categories-in-asset/{assetId} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type/device-categories-in-asset/{assetId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type/device-categories-in-asset/{assetId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-type/device-categories-in-asset/{assetId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-type/device-categories-in-asset/{assetId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-type/device-categories-in-asset/{assetId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-type/device-categories-in-asset/{assetId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-type/device-categories-in-asset/{assetId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-type/device-categories-in-asset/{assetId}

Parameters

Name In Type Required Description
assetId path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "category": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK Array of DeviceType model instances Inline
401 Unauthorized User is not authorized None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DeviceTypeExcluding_model-description-manufacturer_] false none [(Schema options: { exclude: [ 'model', 'description', 'manufacturer' ] })]
» DeviceTypeExcluding_model-description-manufacturer_ object false none (Schema options: { exclude: [ 'model', 'description', 'manufacturer' ] })
»» id number false none Automatically generated ID
»» category string false none DeviceType category

DeviceTypeController.find

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-type/get-all/page/{page}/count/{count} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-type/get-all/page/{page}/count/{count} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type/get-all/page/{page}/count/{count}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type/get-all/page/{page}/count/{count}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-type/get-all/page/{page}/count/{count}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-type/get-all/page/{page}/count/{count}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-type/get-all/page/{page}/count/{count}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-type/get-all/page/{page}/count/{count}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-type/get-all/page/{page}/count/{count}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-type/get-all/page/{page}/count/{count}

Parameters

Name In Type Required Description
page path number true none
count path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "model": "string",
    "description": "string",
    "manufacturer": "string",
    "category": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK Array of DeviceType model instances Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DeviceType] false none none
» DeviceType object false none none
»» id number false none Automatically generated ID
»» model string true none DeviceType model
»» description string false none DeviceType description
»» manufacturer string true none DeviceType manufacturer
»» category string false none DeviceType category

DeviceTypeController.updateById

Code samples

# You can also use wget
curl -X PATCH https://atman-iot.com/api/device-type/{id} \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://atman-iot.com/api/device-type/{id} HTTP/1.1
Host: atman-iot.com
Content-Type: application/json

const inputBody = '{
  "description": "string",
  "category": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type/{id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "description": "string",
  "category": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type/{id}',
{
  method: 'PATCH',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://atman-iot.com/api/device-type/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://atman-iot.com/api/device-type/{id}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-type/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://atman-iot.com/api/device-type/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://atman-iot.com/api/device-type/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PATCH /device-type/{id}

Body parameter

{
  "description": "string",
  "category": "string"
}

Parameters

Name In Type Required Description
id path number true none
body body DeviceTypeExcluding_id-model-manufacturer_ false none

Responses

Status Meaning Description Schema
204 No Content DeviceType PATCH success None

DeviceTypeController.create

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/device-type \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/device-type HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "id": 0,
  "model": "string",
  "description": "string",
  "manufacturer": "string",
  "category": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "id": 0,
  "model": "string",
  "description": "string",
  "manufacturer": "string",
  "category": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/device-type',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/device-type', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-type");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/device-type", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/device-type', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /device-type

Body parameter

{
  "id": 0,
  "model": "string",
  "description": "string",
  "manufacturer": "string",
  "category": "string"
}

Parameters

Name In Type Required Description
body body DeviceType false none

Example responses

200 Response

{
  "id": 0,
  "model": "string",
  "description": "string",
  "manufacturer": "string",
  "category": "string"
}

Responses

Status Meaning Description Schema
200 OK DeviceType model instance DeviceType

DeviceTypeChannelTypeController

DeviceTypeChannelTypeController.deviceTypeCategoryChannelCategories

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-type-channel-type/asset-id/{assetId}/device-type-category/{deviceTypeCategory}/channel-categories \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-type-channel-type/asset-id/{assetId}/device-type-category/{deviceTypeCategory}/channel-categories HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/asset-id/{assetId}/device-type-category/{deviceTypeCategory}/channel-categories',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/asset-id/{assetId}/device-type-category/{deviceTypeCategory}/channel-categories',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-type-channel-type/asset-id/{assetId}/device-type-category/{deviceTypeCategory}/channel-categories',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-type-channel-type/asset-id/{assetId}/device-type-category/{deviceTypeCategory}/channel-categories', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-type-channel-type/asset-id/{assetId}/device-type-category/{deviceTypeCategory}/channel-categories");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-type-channel-type/asset-id/{assetId}/device-type-category/{deviceTypeCategory}/channel-categories", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-type-channel-type/asset-id/{assetId}/device-type-category/{deviceTypeCategory}/channel-categories', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-type-channel-type/asset-id/{assetId}/device-type-category/{deviceTypeCategory}/channel-categories

Parameters

Name In Type Required Description
deviceTypeCategory path string true none
assetId path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "category": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK ChannelType model count Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [ChannelTypeExcluding_name-description-unit-channelType-deviceTypeId_] false none [(Schema options: { exclude: [ 'name', 'description', 'unit', 'channelType', 'deviceTypeId' ] })]
» ChannelTypeExcluding_name-description-unit-channelType-deviceTypeId_ object false none (Schema options: { exclude: [ 'name', 'description', 'unit', 'channelType', 'deviceTypeId' ] })
»» id number false none Automatically generated ID
»» category string false none ChannelType category

DeviceTypeChannelTypeController.updateById

Code samples

# You can also use wget
curl -X PATCH https://atman-iot.com/api/device-type-channel-type/channel-type/{channelTypeId} \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://atman-iot.com/api/device-type-channel-type/channel-type/{channelTypeId} HTTP/1.1
Host: atman-iot.com
Content-Type: application/json

const inputBody = '{
  "category": "string",
  "description": "string",
  "unit": "string",
  "channelType": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/channel-type/{channelTypeId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "category": "string",
  "description": "string",
  "unit": "string",
  "channelType": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/channel-type/{channelTypeId}',
{
  method: 'PATCH',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://atman-iot.com/api/device-type-channel-type/channel-type/{channelTypeId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://atman-iot.com/api/device-type-channel-type/channel-type/{channelTypeId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-type-channel-type/channel-type/{channelTypeId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://atman-iot.com/api/device-type-channel-type/channel-type/{channelTypeId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://atman-iot.com/api/device-type-channel-type/channel-type/{channelTypeId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PATCH /device-type-channel-type/channel-type/{channelTypeId}

Body parameter

{
  "category": "string",
  "description": "string",
  "unit": "string",
  "channelType": "string"
}

Parameters

Name In Type Required Description
channelTypeId path number true none
body body ChannelTypeExcluding_id-name-deviceTypeId_ false none

Responses

Status Meaning Description Schema
204 No Content ChannelType PATCH success None

DeviceTypeChannelTypeController.deviceTypeChannelCategories

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/channel-categories \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/channel-categories HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/channel-categories',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/channel-categories',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/channel-categories',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/channel-categories', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/channel-categories");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/channel-categories", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/channel-categories', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-type-channel-type/{deviceTypeId}/channel-categories

Parameters

Name In Type Required Description
deviceTypeId path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "category": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK ChannelType model count Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [ChannelTypeExcluding_name-description-unit-channelType-deviceTypeId_] false none [(Schema options: { exclude: [ 'name', 'description', 'unit', 'channelType', 'deviceTypeId' ] })]
» ChannelTypeExcluding_name-description-unit-channelType-deviceTypeId_ object false none (Schema options: { exclude: [ 'name', 'description', 'unit', 'channelType', 'deviceTypeId' ] })
»» id number false none Automatically generated ID
»» category string false none ChannelType category

DeviceTypeChannelTypeController.count

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/count \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/count HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/count',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/count',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/count',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/count', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/count");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/count", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/count', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-type-channel-type/{deviceTypeId}/count

Parameters

Name In Type Required Description
deviceTypeId path number true none

Example responses

200 Response

{
  "count": 0
}

Responses

Status Meaning Description Schema
200 OK ChannelType model count Inline

Response Schema

Status Code 200

loopback.Count

Name Type Required Restrictions Description
» count number false none none

DeviceTypeChannelTypeController.find

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/page/{page}/count/{count} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/page/{page}/count/{count} HTTP/1.1
Host: atman-iot.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/page/{page}/count/{count}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/page/{page}/count/{count}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/page/{page}/count/{count}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/page/{page}/count/{count}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/page/{page}/count/{count}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/page/{page}/count/{count}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}/page/{page}/count/{count}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /device-type-channel-type/{deviceTypeId}/page/{page}/count/{count}

Parameters

Name In Type Required Description
deviceTypeId path number true none
page path number true none
count path number true none

Example responses

200 Response

[
  {
    "id": 0,
    "name": "string",
    "category": "string",
    "description": "string",
    "unit": "string",
    "channelType": "string",
    "deviceTypeId": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Array of ChannelType model instances Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [ChannelType] false none none
» ChannelType object false none none
»» id number false none Automatically generated ID
»» name string true none ChannelType name
»» category string false none ChannelType category
»» description string false none ChannelType description
»» unit string false none Unit of measurement
»» channelType string true none Type of data: UNDEFINED / SPOT_VALUE / COUNTER / TEXT
»» deviceTypeId number true none ID of DeviceType that ChannelType belongs to

DeviceTypeChannelTypeController.create

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/device-type-channel-type/{deviceTypeId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/device-type-channel-type/{deviceTypeId} HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "name": "string",
  "category": "string",
  "description": "string",
  "unit": "string",
  "channelType": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "name": "string",
  "category": "string",
  "description": "string",
  "unit": "string",
  "channelType": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/device-type-channel-type/{deviceTypeId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /device-type-channel-type/{deviceTypeId}

Body parameter

{
  "name": "string",
  "category": "string",
  "description": "string",
  "unit": "string",
  "channelType": "string"
}

Parameters

Name In Type Required Description
deviceTypeId path number true none
body body ChannelTypeExcluding_id-deviceTypeId_ false none

Example responses

200 Response

{
  "id": 0,
  "name": "string",
  "category": "string",
  "description": "string",
  "unit": "string",
  "channelType": "string",
  "deviceTypeId": 0
}

Responses

Status Meaning Description Schema
200 OK ChannelType model instance ChannelType

EventController

EventController.process_subscriptions

Code samples

# You can also use wget
curl -X GET https://atman-iot.com/api/event/process \
  -H 'Authorization: Bearer {access-token}'

GET https://atman-iot.com/api/event/process HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/event/process',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/event/process',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://atman-iot.com/api/event/process',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://atman-iot.com/api/event/process', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/event/process");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://atman-iot.com/api/event/process", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://atman-iot.com/api/event/process', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /event/process

Responses

Status Meaning Description Schema
204 No Content Event Processing finished None

Code samples

# You can also use wget
curl -X POST https://atman-iot.com/api/event/related-device \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://atman-iot.com/api/event/related-device HTTP/1.1
Host: atman-iot.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "deviceId": 0,
  "eventId": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/event/related-device',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "deviceId": 0,
  "eventId": 0
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/event/related-device',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://atman-iot.com/api/event/related-device',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://atman-iot.com/api/event/related-device', headers = headers)

print(r.json())

URL obj = new URL("https://atman-iot.com/api/event/related-device");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://atman-iot.com/api/event/related-device", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://atman-iot.com/api/event/related-device', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /event/related-device

Body parameter

{
  "deviceId": 0,
  "eventId": 0
}
Name In Type Required Description
body body EventRelatedDeviceExcluding_id_ false none

Example responses

200 Response

{
  "id": 0,
  "deviceId": 0,
  "eventId": 0
}
Status Meaning Description Schema
200 OK Event Related Device model instance EventRelatedDevice

EventController.updateById

Code samples

# You can also use wget
curl -X PATCH https://atman-iot.com/api/event/resolve/{id} \
  -H 'Authorization: Bearer {access-token}'

PATCH https://atman-iot.com/api/event/resolve/{id} HTTP/1.1
Host: atman-iot.com


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('https://atman-iot.com/api/event/resolve/{id}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console</