All API calls, with the exception of the OAuth 2 calls, require an Oauth access_token parameter for the user to be passed as either a GET or POST parameter.
https://www.igtimi.com/oauth/authorize
response_type ("code" or "token") - The requested OAuth grant type.
client_id (string) - The client id you received when you registered the application.
redirect_uri (string) - The URI to redirect to after the user has authenticated. Must match URI registered with the application.
302 Redirect to the application's redirect_uri. Redirect contains an access_code, or access_token, depending on the OAuth grant type requested
https://www.igtimi.com/oauth/token
grant_type ("authorization_code" or "client_credentials") - The requested OAuth request type
code (string) - The access_code, as returned by the Authorize API call. Required for "authorization_code" grant type only.
client_id (string) - The client id you received when you registered the application. Required for "client_credentials" grant type only.
client_secret (string) - The client secret you received when you registered the application. Required for "client_credentials" grant type only.
redirect_uri (string) - The URI to redirect to after the user has authenticated. Must match URI registered with the application. Required for "authorization_code" grant type only.
The application access token
https://www.igtimi.com/api/v1/devicegroups
prefix (string) - Appliation prefix string.
create_devices (boolean) - Enable the to ability create devices within this group.
create_tokens (boolean) - Enable the ability to create sub groups within this group.
expiry (long) optional - The token expiry timestamp. Milliseconds UNIX epoch time.
recipient (string) optional - Parent device group for the newly created device group.
default_owner_id (Number) optional - Owner ID for the newly created device group.
Device group object.
Sample JSON response
{ "devicegroup": { "id": 4, "token": "<token>", "prefix": "AA-AA", "permissions": { "create_devices": true, "create_tokens": true }, "default_owner_id": null, "default_admin_id": null, "default_user_id": null, "expiry": 1531709370 } }
https://www.igtimi.com/api/v1/devicegroup_tokens
A collection of device group token objects.
Sample JSON response
{ "devicegroup_tokens": [ { "devicegroup_token": { "id": 1, "token": "<token>", "expiry": null, "parent_devicegroup_token_id": null } }, { "devicegroup_token": { "id": 2, "token": "<token>", "expiry": null, "parent_devicegroup_token_id": null } }, { "devicegroup_token": { "id": 3, "token": "<token>", "expiry": "2018-07-16 02:49:30 UTC", "parent_devicegroup_token_id": null } }, { "devicegroup_token": { "id": 4, "token": "<token>", "expiry": null, "parent_devicegroup_token_id": 2 } }, { "devicegroup_token": { "id": 5, "token": "<token>", "expiry": "2018-07-16 03:27:17 UTC", "parent_devicegroup_token_id": 2 } } ] }
https://www.igtimi.com/api/v1/devicegroups
devicegroup_tokens (array long) optional - The device group tokens of the device groups to list. Exclude the application access token when using this option.
show_expired (bool) optional - Include expired tokens in result.
show_subgroups (bool) optional - Include child tokens in result.
Collection of device group objects.
Sample JSON response
{ "devicegroups": [ { "devicegroup": { "id": 1, "token": "<token>", "prefix": "AA-AC", "permissions": { "create_devices": true, "create_tokens": false }, "default_owner_id": null, "default_admin_id": null, "default_user_id": null, "expiry": null } }, { "devicegroup": { "id": 2, "token": "<token>", "prefix": "AA-AD-", "permissions": { "create_devices": true, "create_tokens": true }, "default_owner_id": null, "default_admin_id": null, "default_user_id": null, "expiry": null } } ] }
https://www.igtimi.com/server_listers/web_sockets
List of web socket servers
Sample JSON response
{ "web_socket_servers" : [ "ws://live.igtimi.com:8081", "ws://www.igtimi.com/live", "wss://www.igtimi.com/live" ] }
https://www.igtimi.com/api/v1/account
The details of the user
Sample JSON response
{ "user": { "id": 2, "first_name": "Michael", "surname": "Scott", "email": "michael@scott.com" } }
https://www.igtimi.com/api/v1/users
The details of the users
Sample JSON response
{ "users": [ "user": { "id": 2, "first_name": "Michael", "surname": "Scott", "email": "michael@scott.com", "blob": true } ] }
https://www.igtimi.com/api/v1/users/:user_id
The details of the user
Sample JSON response
{ "user": { "id": 2, "first_name": "Michael", "surname": "Scott", "email": "michael@scott.com", "blob": false } }
https://www.igtimi.com/api/v1/users/:user_id/blob
content string - The data to store in the blob.
True on success
Sample JSON response
{ "success": true }
401 - User does not exist
https://www.igtimi.com/api/v1/users/:user_id/blob
401 - User does not exist
https://www.igtimi.com/api/v1/resources
permission ("read" or "modify") - Gets resources with the given permission.
start_time (millisecond unix timestamp) optional - Gets the resources created since the given date/time.
end_time (millisecond unix timestamp) optional - Gets the resources created before the given date/time.
serial_numbers (array of serial_numbers) optional if requesting "modify" permissions - The serial numbers to request data for.
stream_ids (array of stream_ids) optional - The stream ids to request data for.
The requested resources the user has permission to use
Sample JSON response
{ "resources": [ { "resource": { "id": 1, "start_time": 1360197740000, "end_time": 1360198040000, "device_serial_number": "AA-AA-AAAA", "data_types": [1, 2, 3], "permissions": { "read": true, "modify": true }, "blob": false } } ] }
Return value definitions
Field | Description |
---|---|
device_id | The internal id of the resource. |
device_serial_number | The serial number of the device. |
data_types | The types of data contained within the bounds of the resource. |
read | If true the user can request data from the resource. |
modify | If true the user can share the resource with others. |
https://www.igtimi.com/api/v1/resources/:resource_id/blob
content string - The data to store in the blob.
True on success
Sample JSON response
{ "success": true }
401 - Session does not exist
https://www.igtimi.com/api/v1/resources/:resource_id/blob
401 - Resource does not exist
https://www.igtimi.com/api/v1/resources/data
start_time (millisecond unix timestamp) - Gets the data since the given date/time.
end_time (millisecond unix timestamp) - Gets the data since before the given date/time.
serial_numbers (Array of serial_numbers) - The serial numbers to request data for.
types (Hash of data types and compression values) - Gets data of given data types and compresses it at the given value.
sids (Hash of data types and source ids) optional - Specifies the source ids required to be returned for each numeric data type. Defaults to "0" for all data_types. Source id's are comma separated and can include ranges (e.g. sids[<data_type>]=0-10,20)
restore_archives (boolean) optional - When restore_archives equals true, API will restore archived resources.
The requested data the user has permission to see
Sample JSON response
{ "AA-AA-AAAA": { "1": { "t": [ 1360618858970 ], "1": [ 172.04 ], "2": [ -45.02 ] } }, "archived_resources": [] } # archived_resources is an optional key, # it only shows up when "restore_archives" equals true in request parameter # and returning data contains archived resources
archived_resources
All resources stored on the Igtimi servers will be archived if they are older than 6 months and have not been accessed for 4 months. When data is archived it is flagged as “is_archived = true”
To access Archived data
To access data within an archived resource you need to try to access the recourse. An example to access the data is via the Igtimi API call “data:LIST”.
https://www.igtimi.com/api/v1/resources/data?start_time=[epoch_ts]&end_time=[epoch_ts]&types[1]=0&restore_archives=true&serial_numbers[]=FA-AA-AAAM&access_token=[token]
The returning payload will contain a non-empty array of archived_resources’ ids when returning data contains archived resources
The Igtimi API will unarchive the related resources in a back ground process. When the resources have been unarchived, the Igtimi API will update the last_accessed_at of resources to current time.
Please note: the timing of unarchiving resources may vary, based on how many data points requested.
Your application will need to continue to request the same data, until the archived_resources array in payload is gone which means end user will get full set of data points.
https://www.igtimi.com/api/v1/resources/data/upload
file (file) - The file to be uploaded.
start_time (millisecond unix timestamp) - The start time of the file.
end_time (millisecond unix timestamp) - The end time of the file.
resource_id (integer) - the id of the resource to add the file to.
OR
stream_id (integer) - the stream id of the file.
serial_number (string) - the serial_number of the file.
source (integer) optional - the id of the source of the file (0 by default).
The resource_id, md5 hash and source of the inserted file
Sample JSON response
{ "resource_datum": { "resource_id": 1, "md5": "98330e72eeef4fcae7fa8b339ffc2c69", "source": 0 } }
https://www.igtimi.com/api/v1/resources/data/upload
file (file) - The file to be uploaded.
The file_id and md5 hash of the inserted file
Sample JSON response
{ "device_syncfile": { "file_id":"0000032A_f68947968b31b32a2bc3d9779311da7e.IPB", "md5":"f68947968b31b32a2bc3d9779311da7e" } }
https://www.igtimi.com/api/v1/resources/data/upload
file_id (string) optional - The file id has been uploaded.
When file_id does is present then return full list of Igtimi Protobuf file's user has been uploaded.
Sample JSON response
{ "device_syncfiles":{ "error_files":[ { "file_name": "00000AAA.IPB", "md5": "9swe8d34d6ade38d96c9bc5a7sdfff24", "uploaded_at": 1512704146146, "updated_at": 1512704146146, "msg": "File contains errors" } ], "pending_files":[ { "file_name": "00000ABA.IPB", "md5": "9swe8d34d6ade338d96c9bc5a7sdfff24", "uploaded_at": 1512704146146, "updated_at": 1512704146146 } ], "processing_files":[ { "file_name": "00000AAC.IPB", "md5": "9swe8d34d6ade32d96c9bc5a7sdfff24", "uploaded_at": 1512704146146, "updated_at": 1512704146146 } ], "completed_files":[ { "file_name": "0000032DC.IPB", "md5": "9ed58d34d6ade38d96c9bc5a7sdfff24", "uploaded_at": 1512704142877, "updated_at": 1512704146146, "msg": "File successfully processed" }, { "file_name": "0000030BC.IPB", "md5": "275249ee1035970737afa4ead27d5e1a", "uploaded_at": 1512704137281, "updated_at": 1512704142037, "msg": "File successfully processed but contained errors" } ] } }
https://www.igtimi.com/api/v1/data_types
Session value definitions
Field | Description |
---|---|
owner_id | The id of the user that created the session |
session_group_id | The id of the group for the session |
admin_session_group_id | The id of the admin group for the session |
read | If true the user can request the session log data |
modify | If true the user can update session details |
https://www.igtimi.com/api/v1/sessions
ids (integer array) optional - Filter for given session ids.
public (boolean) optional - Filter for public sessions. Defaults to true. Forced to true when using client credentials authentication.
limit (integer) optional - Limits the result to the given number of sessions.
include_incomplete (boolean) optional - Filter for sessions with no start or end time. Defaults to true.
start_time (millisecond unix timestamp) optional - Filter for sessions which start, or extend, after start_time. Sessions missing either a start or end time are considered if include_incomplete is True.
end_time (millisecond unix timestamp) optional - Filter for sessions which end, or extend, before end_time. Sessions missing either a start or end time are considered if include_incomplete is True.
blob_content (boolean) optional - Whether to return blob content when session blob is equal true
The user's sessions
Sample JSON response
{ "sessions": [ { "session": { "id": 1, "name": "Example Session", "start_time": 1362361340333.454, "end_time": 1362361640335.23, "owner_id": 2, "session_group_id": 4, "admin_session_group_id": 5, "permissions": { "read": true, "modify": true }, "blob": false } } ] }
https://www.igtimi.com/api/v1/sessions
The new session data
Sample JSON response
{ "session": { "id": 1, "name": null, "start_time": null, "end_time": null, "owner_id": 2, "session_group_id": 4, "admin_session_group_id": 5, "permissions": { "read": true, "modify": true } } }
https://www.igtimi.com/api/v1/sessions/:session_id
The requested session
Sample JSON response
{ "session": { "id": 1, "name": "Example Session", "start_time": 1362361340333.454, "end_time": 1362361640335.23, "owner_id": 2, "session_group_id": 4, "admin_session_group_id": 5, "permissions": { "read": true, "modify": true }, "blob": true } }
401 - The user does not have modify permission on the session.
https://www.igtimi.com/api/v1/sessions/:session_id
True on success
Sample JSON response
{ "success": true }
401 - The user does not have modify permission on the session.
https://www.igtimi.com/api/v1/sessions/:session_id/blob
content string - The data to store in the blob.
True on success
Sample JSON response
{ "success": true }
401 - Session does not exist
https://www.igtimi.com/api/v1/sessions/:session_id/blob
401 - Session does not exist
https://www.igtimi.com/api/v1/sessions/:session_id/logs
start_time (millisecond unix timestamp) optional - Get the logs created since a given date/time.
https://www.igtimi.com/api/v1/sessions/:session_id/logs
XML document with the session logs additons. See Understand Session Logs for a detailed explaination
True on success
Sample JSON response
{ "success": true }
403 - The session logs were not in the right format. An error message is returned in the body explaining why.
https://www.igtimi.com/api/v1/devices
serial_numbers (string array) optional - If supplied it will filter the results by the given serial numbers. You can give a serial number the user doesn't have permissions on to get the public information.
blob (deprecated) (boolean) optional - If true it will display the blob content of given serial numbers which the application can access. Otherwise displays the existence of the blob content.
blob_content (boolean) optional - Whether to return blob content when device blob is equal true
device_info (boolean) optional - If true it will display the device information of given serial numbers. Otherwise displays the existence of device information.
A list of devices
Sample JSON response
{ "devices": [ { "device": { "id": 1, "name": "my device", "serial_number": "AA-AA-AAAA", "uid": null, "imei": null, "service_tag": "AAAA", "owner_id": 4, "device_user_group_id": 4, "admin_device_user_group_id": 3, "permissions": { "read": true, "modify": true }, "blob": true, "blob_content": "test content" "device_info": false } } ] }
https://www.igtimi.com/api/v1/devices
devicegroup_token (string) optional - The device group token for authentication. Use application access token if not using device group token.
prefix (string) - The prefix for the serial.
date (string) optional - Two characters to use for the middle section of the serial.
uid (string) optional - Primary identifier for devices.
imei (string) optional - Alternative identifier for devices.
register (boolean) optional - Create and register the device at the same time. By default it will register the created device to Application's default device owner if applicable or application owner. Defaults to true
The device
Sample JSON response
{ "device": { "id": 1, "name": "my device", "serial_number": "AA-AA-AAAA", "uid": null, "imei": null, "service_tag": "AAAA", "owner_id": null, "device_user_group_id": 4, "admin_device_user_group_id": 3, "permissions": { "read": true, "modify": true }, "blob": false, "next_stream_id": 1 } }
https://www.igtimi.com/api/v1/devices/register
serial_number (string) - The serial number of device.
service_tag (string) - The matching service tag of device.
The device
Sample JSON response
{ "device": { "id": 1, "name": "my device", "serial_number": "AAAA-AA-AA", "service_tag": "AAAA", "owner_id": 4, "device_user_group_id": 4, "admin_device_user_group_id": 3, "permissions": { "read": true, "modify": true } "blob": false } }
401 - Invalid Device Details
https://www.igtimi.com/api/v1/devices/:serial_number/unregister
Success
Sample JSON response
{ "success": true }
https://www.igtimi.com/api/v1/devices/:serial_number
name (string) - New name for device.
Success
Sample JSON response
{ "success": true }
https://www.igtimi.com/api/v1/devices/:serial_number/blob
content string - The data to store in the blob.
True on success
Sample JSON response
{ "success": true }
401 - Device does not exist
https://www.igtimi.com/api/v1/devices/:serial_number/blob
401 - Resource does not exist
https://www.igtimi.com/api/v1/devices/:serial_number/device_info
The latest device information.
{ "stage"=>"production", "target"=>"YachtBot", "build"=>"504", "build_date"=>"2017-12-11T03:40Z", "cell_module"=>"H910 (fw: 12.00.004)" }
https://www.igtimi.com/api/v1/devices/data_access_windows
type (read or modify) - The type of data access window you want to get.
start_time (millisecond unix timestamp) optional - Filters results to be data access windows after this time.
end_time (millisecond unix timestamp) optional - Filters results to be data access windows before this time.
serial_numbers (array of serial numbers) optional - Filters results the provided serial numbers.
A list of data access windows. "recipient"
response may be "user"
or "group"
Sample JSON response
{ "data_access_windows": [ { "data_access_window": { "id": 17413, "start_time": 1361756171928.4912, "end_time": 4517429771979.67, "device_serial_number": "AA-AA-AAAA", "recipient": { "user": { "id": 5 } }, "permissions": { "read": true, "modify": true } } } ] }
https://www.igtimi.com/api/v1/devices/:serial_number/data_access_windows
start_time (millisecond unix timestamp) - Start time of the data access window.
end_time (millisecond unix timestamp) - End time of the data access window.
read (boolean) - Give read permission.
modify (boolean) - Give modify permission.
user_id (integer) optional- Id of the user to create the data access window for.
group_id (integer) optional- Id of the group to create the data access window for.
Must include either user_id or group_id in the call
Success
Sample JSON response
{ "success": true }
https://www.igtimi.com/api/v1/groups
hidden (boolean) optional - Whether to return only hidden or only unhidden groups.
group_id (integer) optional - The id of the group to filter by.
blob_content (boolean) optional - Whether to return blob content when group blob is equal true.
The groups the user is in.
Sample JSON response
{ "groups": [ { "group": { "id": 3, "name": "_members", "hidden": true, "permissions": { "read": true, "modify": false }, "blob": true, "blob_content": "{\"test\": \"test\"}" } }, { "group": { "id": 2, "name": "_public", "hidden": true, "permissions": { "read": true, "modify": false }, "blob": true } }, { "group": { "id": 4, "name": "test", "hidden": false, "permissions": { "read": true, "modify": true }, "blob": false } } ] }
https://www.igtimi.com/api/v1/groups
name (string) - Name of the group.
The group details.
Sample JSON response
{ "group": { "name": "my_group", "id": 4 } }
401 - The user does not have modify permission on the group.
https://www.igtimi.com/api/v1/groups/:group_id
Success
Sample JSON response
{ "success": true }
401 - The user does not have modify permission on the group.
https://www.igtimi.com/api/v1/groups/:group_id/grant_modify
user_id (integer) optional - Id of the user to grant modify permissions
group_id (integer) optional - Id of the group to grant modify permissions
Success
Sample JSON response
{ "success": true }
401 - The user does not have modify permission on the group.
https://www.igtimi.com/api/v1/groups/:group_id/revoke_modify
user_id (integer) optional - Id of the user to revoke modify permissions
group_id (integer) optional - Id of the group to revoke modify permissions
Success
Sample JSON response
{ "success": true }
401 - The user does not have modify permission on the group.
https://www.igtimi.com/api/v1/groups/:group_id/blob
content string - The data to store in the blob.
True on success
Sample JSON response
{ "success": true }
401 - Group does not exist.
https://www.igtimi.com/api/v1/groups/:group_id/blob
401 - Group does not exist.
https://www.igtimi.com/api/v1/groups/:group_id/members
hidden (boolean) optional - Whether to include groups which are hidden. Defaults to true.
Success
Sample JSON response
{ "members": [ { "user": { "id": 1, "permissions": { "read": true, "modify": true } } }, { "group": { "id": 5, "permissions": { "read": true, "modify": false } } }, { "public": true } ] }
401 - The user does not have read permission on the group.
https://www.igtimi.com/api/v1/groups/:group_id/members
user_id (integer) optional - Id of the user to add
group_id (integer) optional - Id of the group to add
Success
Sample JSON response
{ "success": true }
401 - The user does not have modify permission on the group.
https://www.igtimi.com/api/v1/groups/:group_id/members
user_id (integer) optional - Id of the user to remove
group_id (integer) optional - Id of the group to remove
Success
Sample JSON response
{ "success": true }
401 - The user does not have modify permission on the group.
https://www.igtimi.com/api/v1/groups/:group_id/make_public
Success
Sample JSON response
{ "success": true }
401 - The user does not have modify permission on the group.
https://www.igtimi.com/api/v1/groups/:group_id/make_private
Success
Sample JSON response
{ "success": true }
401 - The user does not have modify permission on the group.
2024-10-17T10:43:00Z 7b23735f9944f14dccb4ddc4c360c630738aa02e