Tracked Conditions

Get All Tracked Conditions

GET SERVER_URL/v1/api-key/tracked-conditions?filter[condition][]={ffilter[condition][]}&filter[id][]={filter[id][]}&page[limit]={page[limit]}

Request returns all tracked groups (objects/beacons). 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, -condition
{filter[id][]} Filtering data by ID
{filter[condition][]} Searching by alias condition
{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
25
26
27
28
29
30
31
32
33
34
35
36
{
  "data": [
    {
      "type": "string",
      "id": 0,
      "attributes": {
        "time": 0,
        "condition": "string",
        "created_at": 0,
        "updated_at": 0,
        "deleted_at": 0
      },
      "relationships": {
        "tracked-group": {
          "type": "string",
          "id": 0
        },
        "location": {
          "type": "string",
          "id": 0
        },
        "sublocation": {
          "type": "string",
          "id": 0
        },
        "zone": {
          "type": "string",
          "id": 0
        }
      }
    }
  ],
  "included": [
    {}
  ]
}

Post All Tracked Conditions

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

Request create tracked conditions.

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 conditions

JSON Body Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "time": 0,
      "condition": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-group": {
        "type": "string",
        "id": 0
      },
      "location": {
        "type": "string",
        "id": 0
      },
      "sublocation": {
        "type": "string",
        "id": 0
      },
      "zone": {
        "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
23
24
25
26
27
28
29
30
31
32
33
34
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "time": 0,
      "condition": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-group": {
        "type": "string",
        "id": 0
      },
      "location": {
        "type": "string",
        "id": 0
      },
      "sublocation": {
        "type": "string",
        "id": 0
      },
      "zone": {
        "type": "string",
        "id": 0
      }
    }
  },
  "included": [
    {}
  ]
}

Get Tracked Conditions by ID

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

Request returns tracked conditions by ID.

Parameters

Header

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

Path

id Condition 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
23
24
25
26
27
28
29
30
31
32
33
34
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "time": 0,
      "condition": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-group": {
        "type": "string",
        "id": 0
      },
      "location": {
        "type": "string",
        "id": 0
      },
      "sublocation": {
        "type": "string",
        "id": 0
      },
      "zone": {
        "type": "string",
        "id": 0
      }
    }
  },
  "included": [
    {}
  ]
}

Patch Tracked Сondition by ID

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

Request enables change tracked condition by ID.

Parameters

Header

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

Path

id Tracked condition ID

JSON Body Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "time": 0,
      "condition": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-group": {
        "type": "string",
        "id": 0
      },
      "location": {
        "type": "string",
        "id": 0
      },
      "sublocation": {
        "type": "string",
        "id": 0
      },
      "zone": {
        "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
23
24
25
26
27
28
29
30
31
32
33
34
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "time": 0,
      "condition": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-group": {
        "type": "string",
        "id": 0
      },
      "location": {
        "type": "string",
        "id": 0
      },
      "sublocation": {
        "type": "string",
        "id": 0
      },
      "zone": {
        "type": "string",
        "id": 0
      }
    }
  },
  "included": [
    {}
  ]
}

Delete Tracked Condition by ID

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

Request enables delete tracked conditions by ID.

Parameters

Header

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

Path

id Tracked condition ID

JSON Response Example

Code 204

1
Condition successfully delete.

Restore Tracked Condition by ID

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

Request enables restore tracked conditions by ID.

Parameters

Header

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

Path

id Tracked condition 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
23
24
25
26
27
28
29
30
31
32
33
34
{
  "data": {
    "type": "string",
    "id": 0,
    "attributes": {
      "time": 0,
      "condition": "string",
      "created_at": 0,
      "updated_at": 0,
      "deleted_at": 0
    },
    "relationships": {
      "tracked-group": {
        "type": "string",
        "id": 0
      },
      "location": {
        "type": "string",
        "id": 0
      },
      "sublocation": {
        "type": "string",
        "id": 0
      },
      "zone": {
        "type": "string",
        "id": 0
      }
    }
  },
  "included": [
    {}
  ]
}