HydraCore
API by router

Connections

GET
/internal/v1/instances/{instance_id}/connections

Path Parameters

instance_id*Instance Id
Formatuuid

Query Parameters

provider*Provider
name?Name
capability?Capability

Required capability (e.g. send_mail). If specified, 403 if grant doesn't include it.

Response Body

Successful Response

application/json
  1. response
Example Request
curl -X GET 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/connections?provider=string'
Example Response
{}

List Connections

GET
/v1/customers/{customer_id}/connections

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
connections*array<>
total*Total
Example Request
curl -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}

Create Connection

POST
/v1/customers/{customer_id}/connections

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
auth_type?Auth Type

One of: ('oauth2', 'api_key', 'basic')

Default"oauth2"
credentials*

Provider credentials (stored encrypted)

metadata_json?|null
name*Name

admin@iqm.com.au, IQM Master Roster, etc.

Lengthlength <= 255
provider*Provider

gmail, xero, google_calendar, deputy, etc.

Lengthlength <= 50
scopes?array<string>|null

Response Body

Successful Response

application/json
  1. response
auth_type*Auth Type
created_at*Created At
Formatdate-time
customer_id*Customer Id
Formatuuid
error_message?string|null
expires_at?|null
grants?array<>
Default[]
id*Id
Formatuuid
last_used_at?|null
name*Name
provider*Provider
scopes?array<unknown>|null
status*Status
updated_at*Updated At
Formatdate-time
Example Request
curl -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 Connection

DELETE
/v1/customers/{customer_id}/connections/{connection_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid
connection_id*Connection Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

Example Request
curl -X DELETE 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/connections/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
Empty

Create Grant

POST
/v1/customers/{customer_id}/connections/{connection_id}/grants

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid
connection_id*Connection Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
capabilities*array<string>

Provider-specific capabilities (e.g. send_mail, read_events)

instance_id*Instance Id
Formatuuid

Response Body

Successful Response

application/json
  1. response
capabilities?array<string>
Default[]
connection_id*Connection Id
Formatuuid
granted_at*Granted At
Formatdate-time
id*Id
Formatuuid
instance_id*Instance Id
Formatuuid
Example Request
curl -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 Grant

DELETE
/v1/customers/{customer_id}/connections/{connection_id}/grants/{grant_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid
connection_id*Connection Id
Formatuuid
grant_id*Grant Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

Example Request
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