Igtimi API

Introduction

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.

OAuth 2

Authorize

Description
Authenticates the user and authorizes the application to access the user's Igtimi Account
URL Structure
https://www.igtimi.com/oauth/authorize
Method
GET
Parameters

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.

Returns

302 Redirect to the application's redirect_uri. Redirect contains an access_code, or access_token, depending on the OAuth grant type requested

Access Token

Description
Obtains an application access token
URL Structure
https://www.igtimi.com/oauth/token
Method
POST
Parameters

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.

Returns

The application access token

Device Groups

Token

Description
Creates a device group using an application access token, or a sub device group using an existing device group token.
Use either the application access token, or a device group token for authentication, with parameter names "application_access_token" or "devicegroup_token" respectively.
URL Structure
https://www.igtimi.com/api/v1/devicegroups
Method
POST
Parameters

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.

Returns

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
	}
}
				

List tokens

Description
Lists the device group tokens assocaited with an application.
URL Structure
https://www.igtimi.com/api/v1/devicegroup_tokens
Method
GET
Returns

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
			}
		}
	]
}
				

List groups

Description
Lists the device groups assocatied with an application.
URL Structure
https://www.igtimi.com/api/v1/devicegroups
Method
GET
Parameters

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.

Returns

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
			}
		}
	]
}
				

Server Lister

Web Sockets

Description
Gives a list of web socket servers you can connect to
URL Structure
https://www.igtimi.com/server_listers/web_sockets
Method
GET
Returns

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"
	]
}

Account

Show

Description
Returns the user's account details.
URL Structure
https://www.igtimi.com/api/v1/account
Method
GET
Returns

The details of the user

Sample JSON response

{
   "user": {
      "id": 2,
      "first_name": "Michael",
      "surname": "Scott",
      "email": "michael@scott.com"
   }
}

Users

List

Description
Returns all the user's connected to the application.
URL Structure
https://www.igtimi.com/api/v1/users
Method
GET
Returns

The details of the users

Sample JSON response

{
   "users": [
	   "user": {
	      "id": 2,
	      "first_name": "Michael",
	      "surname": "Scott",
	      "email": "michael@scott.com",
	      "blob": true
	   }
	]
}

Show

Description
Returns the user's details.
URL Structure
https://www.igtimi.com/api/v1/users/:user_id
Method
GET
Returns

The details of the user

Sample JSON response

{
   "user": {
      "id": 2,
      "first_name": "Michael",
      "surname": "Scott",
      "email": "michael@scott.com",
      "blob": false
   }
}

Save Blob

Description
Saves blob data to a user
URL Structure
https://www.igtimi.com/api/v1/users/:user_id/blob
Method
POST
Parameters

content string - The data to store in the blob.

Returns

True on success

Sample JSON response

{
  "success": true
}
Errors

401 - User does not exist

Get Blob

Description
Gets blob data for a user
URL Structure
https://www.igtimi.com/api/v1/users/:user_id/blob
Method
GET
Returns
The blob data exactly as it was saved.
Errors

401 - User does not exist

Resources

List

Description
Lists all the resources the user can see. This call can also be made using client credentials authentication.
URL Structure
https://www.igtimi.com/api/v1/resources
Method
GET
Parameters

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.

Returns

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.

Save Blob

Description
Saves blob data to a resources
URL Structure
https://www.igtimi.com/api/v1/resources/:resource_id/blob
Method
POST
Parameters

content string - The data to store in the blob.

Returns

True on success

Sample JSON response

{
  "success": true
}
Errors

401 - Session does not exist

Get Blob

Description
Gets blob data for a resource. This call can also be made using client credentials authentication.
URL Structure
https://www.igtimi.com/api/v1/resources/:resource_id/blob
Method
GET
Returns
The blob data exactly as it was saved.
Errors

401 - Resource does not exist

Data

List

Description
Returns data from the specified devices. This call can also be made using client credentials authentication.
URL Structure
https://www.igtimi.com/api/v1/resources/data
Method
GET
Parameters

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.

Returns

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.

Upload File

Description
Uploads and stores a file in a resource
URL Structure
https://www.igtimi.com/api/v1/resources/data/upload
Method
POST
Parameters

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).

Headers
Content-Type - Provide the content type of the file
Returns

The resource_id, md5 hash and source of the inserted file

Sample JSON response

{
   "resource_datum": {
      "resource_id": 1,
      "md5": "98330e72eeef4fcae7fa8b339ffc2c69",
      "source": 0
   }
}
	  			

Upload Import

Description
Presents a Data file for import (.IPB)
URL Structure
https://www.igtimi.com/api/v1/resources/data/upload
Method
POST
Parameters

file (file) - The file to be uploaded.

Headers
Content-Type - Provide the content type of the file, must equal "igtimi/binary_data"
Returns

The file_id and md5 hash of the inserted file

Sample JSON response

{
   "device_syncfile": {
      "file_id":"0000032A_f68947968b31b32a2bc3d9779311da7e.IPB",
      "md5":"f68947968b31b32a2bc3d9779311da7e"
   }
}
	  			

List Import

Description
Returns all files a user has imported (.IPB)
URL Structure
https://www.igtimi.com/api/v1/resources/data/upload
Method
GET
Parameters

file_id (string) optional - The file id has been uploaded.

Returns

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"
         }
      ]
   }
}
	  			

Data Types

List

Description
Return details of all data types
URL Structure
https://www.igtimi.com/api/v1/data_types
Method
GET
Returns

				

Sessions

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

List

Description
Lists all the sessions a user has created and/or been shared. This call can also be made using client credentials authentication.
URL Structure
https://www.igtimi.com/api/v1/sessions
Method
GET
Parameters

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

Returns

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
         }
      }
   ]
}

Create

Description
Creates a new session and returns the id. To add start/end times, session name etc. use session logs.
URL Structure
https://www.igtimi.com/api/v1/sessions
Method
POST
Returns

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
    }
  }
}

Get

Description
Gets a session. This call can also be made using client credentials authentication.
URL Structure
https://www.igtimi.com/api/v1/sessions/:session_id
Method
GET
Returns

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
  }
}
Errors

401 - The user does not have modify permission on the session.

Delete

Description
Deletes a session.
URL Structure
https://www.igtimi.com/api/v1/sessions/:session_id
Method
DELETE
Returns

True on success

Sample JSON response

{
  "success": true
}
Errors

401 - The user does not have modify permission on the session.

Save Blob

Description
Saves blob data to a session
URL Structure
https://www.igtimi.com/api/v1/sessions/:session_id/blob
Method
POST
Parameters

content string - The data to store in the blob.

Returns

True on success

Sample JSON response

{
  "success": true
}
Errors

401 - Session does not exist

Get Blob

Description
Gets blob data for a session. This call can also be made using client credentials authentication.
URL Structure
https://www.igtimi.com/api/v1/sessions/:session_id/blob
Method
GET
Returns
The blob data exactly as it was saved.
Errors

401 - Session does not exist

Session Logs

List

Description
Lists the logs for a session. This call can also be made using client credentials authentication.
URL Structure
https://www.igtimi.com/api/v1/sessions/:session_id/logs
Method
GET
Parameters

start_time (millisecond unix timestamp) optional - Get the logs created since a given date/time.

Returns
The session logs in XML format. See the Understanding Session Logs guide for more information.

Create

Description
Adds session logs to a session.
URL Structure
https://www.igtimi.com/api/v1/sessions/:session_id/logs
Method
POST
Request Body

XML document with the session logs additons. See Understand Session Logs for a detailed explaination

Returns

True on success

Sample JSON response

{
  "success": true
}
Error

403 - The session logs were not in the right format. An error message is returned in the body explaining why.

Devices

List

Description
Lists the devices for a user
URL Structure
https://www.igtimi.com/api/v1/devices
Method
GET
Parameters

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.

Returns

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
			}
		}
   ]
}

Create

Description
Creates a new device. Application prefixes need to be approved by Igtimi, or come from your application page.
UID is a device specific identifier, unique for the serial prefix
The alternative IMEI can be used instead, but UID will take precedence if both are specified
If device identifers already exist then the existing device information is returned
The application access token, or the device group token can be used, with parameter name "application_access_token" or "devicegroup_token" respectively.
URL Structure
https://www.igtimi.com/api/v1/devices
Method
POST
Parameters

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

Returns

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
    }
}

Register

Description
Register a device to the user
URL Structure
https://www.igtimi.com/api/v1/devices/register
Method
POST
Parameters

serial_number (string) - The serial number of device.

service_tag (string) - The matching service tag of device.

Returns

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
   }
}
Errors

401 - Invalid Device Details

Unregister

Description
Unregister's a device from the user
URL Structure
https://www.igtimi.com/api/v1/devices/:serial_number/unregister
Method
DELETE
Returns

Success

Sample JSON response

{
   "success": true
}

Update

Description
Updates a device
URL Structure
https://www.igtimi.com/api/v1/devices/:serial_number
Method
PUT
Parameters

name (string) - New name for device.

Returns

Success

Sample JSON response

{
   "success": true
}

Save Blob

Description
Saves blob data to a device
URL Structure
https://www.igtimi.com/api/v1/devices/:serial_number/blob
Method
POST
Parameters

content string - The data to store in the blob.

Returns

True on success

Sample JSON response

{
  "success": true
}
Errors

401 - Device does not exist

Get Blob

Description
Gets blob data for a device
URL Structure
https://www.igtimi.com/api/v1/devices/:serial_number/blob
Method
GET
Returns
The blob data exactly as it was saved.
Errors

401 - Resource does not exist

Get Device Information

Description
Gets device information for a device
URL Structure
https://www.igtimi.com/api/v1/devices/:serial_number/device_info
Method
GET
Returns

The latest device information.

{
   "stage"=>"production", 
   "target"=>"YachtBot", 
   "build"=>"504", 
   "build_date"=>"2017-12-11T03:40Z", 
   "cell_module"=>"H910 (fw: 12.00.004)"
}
				

Data Access Windows

List

Description
Lists the data access windows
URL Structure
https://www.igtimi.com/api/v1/devices/data_access_windows
Method
GET
Parameters

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.

Returns

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
				}
			}
		}
   ]
}

Create

Description
Creates a data access window
URL Structure
https://www.igtimi.com/api/v1/devices/:serial_number/data_access_windows
Method
POST
Parameters

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

Returns

Success

Sample JSON response

{
   "success": true
}

Groups

List

Description
Lists the groups the user is in.
URL Structure
https://www.igtimi.com/api/v1/groups
Method
GET
Parameters

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.

Returns

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
         }
      }
   ]
}

Create

Description
Creates a group of users.
URL Structure
https://www.igtimi.com/api/v1/groups
Method
POST
Parameters

name (string) - Name of the group.

Returns

The group details.

Sample JSON response

{
   "group": {
      "name": "my_group",
      "id": 4
   }
}
Errors

401 - The user does not have modify permission on the group.

Delete

Description
Deletes a group. You must have modify permissions on the group to delete it.
URL Structure
https://www.igtimi.com/api/v1/groups/:group_id
Method
DELETE
Returns

Success

Sample JSON response

{
   "success": true
}
Errors

401 - The user does not have modify permission on the group.

Grant Modify Permission

Description
Grants modify permission on a group.
URL Structure
https://www.igtimi.com/api/v1/groups/:group_id/grant_modify
Method
POST
Parameters

user_id (integer) optional - Id of the user to grant modify permissions
group_id (integer) optional - Id of the group to grant modify permissions

Returns

Success

Sample JSON response

{
   "success": true
}
Errors

401 - The user does not have modify permission on the group.

Revoke Modify Permission

Description
Revokes modify permission on a group.
URL Structure
https://www.igtimi.com/api/v1/groups/:group_id/revoke_modify
Method
DELETE
Parameters

user_id (integer) optional - Id of the user to revoke modify permissions
group_id (integer) optional - Id of the group to revoke modify permissions

Returns

Success

Sample JSON response

{
   "success": true
}
Errors

401 - The user does not have modify permission on the group.

Save Blob

Description
Saves blob data to a group
URL Structure
https://www.igtimi.com/api/v1/groups/:group_id/blob
Method
POST
Parameters

content string - The data to store in the blob.

Returns

True on success

Sample JSON response

{
  "success": true
}
Errors

401 - Group does not exist.

Get Blob

Description
Gets blob data for a group
URL Structure
https://www.igtimi.com/api/v1/groups/:group_id/blob
Method
GET
Returns
The blob data exactly as it was saved.
Errors

401 - Group does not exist.

Group Members

List

Description
Lists the users in the group
URL Structure
https://www.igtimi.com/api/v1/groups/:group_id/members
Method
GET
Parameters

hidden (boolean) optional - Whether to include groups which are hidden. Defaults to true.

Returns

Success

Sample JSON response

{
   "members": [
      {
         "user": {
            "id": 1,
            "permissions": {
            	"read": true,
            	"modify": true
            }
         }
      },
      {
         "group": {
            "id": 5,
            "permissions": {
	            "read": true,
	            "modify": false
	        }
         }
      },
      {
      	"public": true
  	  }
   ]
}
Errors

401 - The user does not have read permission on the group.

Add Member

Description
Adds a member to a group
URL Structure
https://www.igtimi.com/api/v1/groups/:group_id/members
Method
POST
Parameters

user_id (integer) optional - Id of the user to add
group_id (integer) optional - Id of the group to add

Returns

Success

Sample JSON response

{
   "success": true
}
Errors

401 - The user does not have modify permission on the group.

Remove Member

Description
Removes a member from the group
URL Structure
https://www.igtimi.com/api/v1/groups/:group_id/members
Method
DELETE
Parameters

user_id (integer) optional - Id of the user to remove
group_id (integer) optional - Id of the group to remove

Returns

Success

Sample JSON response

{
   "success": true
}
Errors

401 - The user does not have modify permission on the group.

Make Public

Description
Makes the group public
URL Structure
https://www.igtimi.com/api/v1/groups/:group_id/make_public
Method
POST
Returns

Success

Sample JSON response

{
   "success": true
}
Errors

401 - The user does not have modify permission on the group.

Make Private

Description
Makes the group private
URL Structure
https://www.igtimi.com/api/v1/groups/:group_id/make_private
Method
POST
Returns

Success

Sample JSON response

{
   "success": true
}
Errors

401 - The user does not have modify permission on the group.

Support
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

2023-07-20T10:23:53Z 04b9c7645840c538661102204aa740d5c5ec528a

Igtimi Cloud will be undergoing maintenance for about 6 hours from . During this time Igtimi Cloud will be unavailable for use.