Tracked Beacons

Get All Tracked Beacons

GET SERVER_URL/v1/api-key/tracked-beacons?filter[mac_address][]={filter[mac_address][]}&filter[id][]={filter[id][]}&page[limit]={page[limit]}

Request returns all tracked objects. You can also sort objects by title and id, using parameters below.

Parameters

Header

Parameter Value
Api-key Application key, you can get it from JTW-token

Query

Parameter Value
sort Sort by keys, ex. -id, -title
{filter[id][]} Filtering data by ID
{filter[mac_address][]} Filtering data by MAC adress
{like[mac_address][]} Searching by MAC adress
{page[limit]} Number of requested objects
{page[offset]} Offset on query parameters

JSON Response Example

Code - 200

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  "data": [
    {
      "type": "string",
      "id": 0,
      "attributes": {
        "title": "string",
        "mac_address": "string",
        "created_at": 0,
        "updated_at": 0,
        "deleted_at": 0
      },
      "relationships": {
        "tracked-object": {
          "type": "string",
          "id": 0
        }
      }
    }
  ],
  "included": [
    {}
  ]
}

Post All Tracked Beacons

POST SERVER_URL/v1/api-key/tracked-beacons

Request create tracked beacon.

Parameters

Header

Parameter Value
Api-key Application key, you can get it from JTW-token

Query

Body Data, which should send on web server to create tracked beacon

JSON Body Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "title": "string",
      "mac_address": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-object": {
        "type": "string",
        "id": 0
      }
    }
  }
}

JSON Response Example

Code 201

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "title": "string",
      "mac_address": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-object": {
        "type": "string",
        "id": 0
      }
    }
  },
  "included": [
    {}
  ]
}

Get Tracked Beacon by ID

GET SERVER_URL/v1/tracked-beacons/{id}

Request returns tracked beacon by ID.

Parameters

Header

Parameter Value
Api-key Application key, you can get it from JTW-token

Path

id Tracked beacon ID

JSON Response Example

Code 200

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "title": "string",
      "mac_address": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-object": {
        "type": "string",
        "id": 0
      }
    }
  },
  "included": [
    {}
  ]
}

Patch Tracked Beacon by ID

PATCH SERVER_URL/v1/tracked-beacons/{id}

Request enables change tracked beacon by ID.

Parameters

Header

Parameter Value
Api-key Application key, you can get it from JTW-token

Path

id Tracked beacon ID

JSON Body Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "title": "string",
      "mac_address": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-object": {
        "type": "string",
        "id": 0
      }
    }
  }
}

JSON Response Example

Code 200

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "title": "string",
      "mac_address": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-object": {
        "type": "string",
        "id": 0
      }
    }
  },
  "included": [
    {}
  ]
}

Delete Tracked Beacon by ID

DELETE SERVER_URL/v1/tracked-beacons/{id}

Request enables delete tracked beacon by ID.

Parameters

Header

Parameter Value
Api-key Application key, you can get it from JTW-token

Path

id Tracked beacon ID

JSON Response Example

Code 204

1
Beacon successfully delete.

Restore Tracked Beacon by ID

POST SERVER_URL/v1/tracked-beacons/{id}/restore

Request enables restore tracked beacons by ID.

Parameters

Header

Parameter Value
Api-key Application key, you can get it from JTW-token

Path

id Tracked beacons ID

JSON Response Example

Code 200

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "title": "string",
      "mac_address": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-object": {
        "type": "string",
        "id": 0
      }
    }
  },
  "included": [
    {}
  ]
}