API by router
Connections
GET
instance_id*Instance IdFormat
uuidprovider*Providername?Namecapability?CapabilityRequired capability (e.g. send_mail). If specified, 403 if grant doesn't include it.
Successful Response
application/json- response
curl -X GET 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/connections?provider=string'Example Response
{}GET
HTTPBearerheader
AuthorizationBearer <token>customer_id*Customer IdFormat
uuidX-Api-Key?string|nullSuccessful Response
application/json- response
connections*array<>total*Totalcurl -X GET 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/connections'Example Response
{ "connections": [ { "auth_type": "string", "created_at": "2019-08-24T14:15:22Z", "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "error_message": "string", "expires_at": "2019-08-24T14:15:22Z", "grants": [], "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_used_at": "2019-08-24T14:15:22Z", "name": "string", "provider": "string", "scopes": [ null ], "status": "string", "updated_at": "2019-08-24T14:15:22Z" } ], "total": 0}POST
HTTPBearerheader
AuthorizationBearer <token>customer_id*Customer IdFormat
uuidX-Api-Key?string|nullapplication/json- body
auth_type?Auth TypeOne of: ('oauth2', 'api_key', 'basic')
Default
"oauth2"credentials*Provider credentials (stored encrypted)
metadata_json?|nullname*Nameadmin@iqm.com.au, IQM Master Roster, etc.
Length
length <= 255provider*Providergmail, xero, google_calendar, deputy, etc.
Length
length <= 50scopes?array<string>|nullSuccessful Response
application/json- response
auth_type*Auth Typecreated_at*Created AtFormat
date-timecustomer_id*Customer IdFormat
uuiderror_message?string|nullexpires_at?|nullgrants?array<>Default
[]id*IdFormat
uuidlast_used_at?|nullname*Nameprovider*Providerscopes?array<unknown>|nullstatus*Statusupdated_at*Updated AtFormat
date-timecurl -X POST 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/connections' \ -H 'Content-Type: application/json' \ -d '{ "credentials": {}, "name": "string", "provider": "string"}'Example Response
{ "auth_type": "string", "created_at": "2019-08-24T14:15:22Z", "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "error_message": "string", "expires_at": "2019-08-24T14:15:22Z", "grants": [], "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_used_at": "2019-08-24T14:15:22Z", "name": "string", "provider": "string", "scopes": [ null ], "status": "string", "updated_at": "2019-08-24T14:15:22Z"}DELETE
HTTPBearerheader
AuthorizationBearer <token>customer_id*Customer IdFormat
uuidconnection_id*Connection IdFormat
uuidX-Api-Key?string|nullSuccessful Response
curl -X DELETE 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/connections/497f6eca-6276-4993-bfeb-53cbbbba6f08'Example Response
Empty
POST
HTTPBearerheader
AuthorizationBearer <token>customer_id*Customer IdFormat
uuidconnection_id*Connection IdFormat
uuidX-Api-Key?string|nullapplication/json- body
capabilities*array<string>Provider-specific capabilities (e.g. send_mail, read_events)
instance_id*Instance IdFormat
uuidSuccessful Response
application/json- response
capabilities?array<string>Default
[]connection_id*Connection IdFormat
uuidgranted_at*Granted AtFormat
date-timeid*IdFormat
uuidinstance_id*Instance IdFormat
uuidcurl -X POST 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/connections/497f6eca-6276-4993-bfeb-53cbbbba6f08/grants' \ -H 'Content-Type: application/json' \ -d '{ "capabilities": [ "string" ], "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366"}'Example Response
{ "capabilities": [], "connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9", "granted_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366"}DELETE
HTTPBearerheader
AuthorizationBearer <token>customer_id*Customer IdFormat
uuidconnection_id*Connection IdFormat
uuidgrant_id*Grant IdFormat
uuidX-Api-Key?string|nullSuccessful Response
curl -X DELETE 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/connections/497f6eca-6276-4993-bfeb-53cbbbba6f08/grants/497f6eca-6276-4993-bfeb-53cbbbba6f08'Example Response
Empty