Raytio APIs (0.1.0)

Download OpenAPI specification:Download

The Raytio API allows users, organisations, profiles, profile objects, profile object permissions and relationships to be created, updated, read and deleted.

Authentication

bearerAuth

Use the identity_token from the /token endpoint

Security scheme type: HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT."

oauth

Allows Authentication for Raytio APIs

generateToken

To make API requests you will need an Authentication Token. Authentication Tokens are temporary "security codes" (similar to session cookies) that allow the system to identify who you are, and that you are allowed to do what you are requesting. For Authentication we use JSON Web Tokens (JWTs). JWTs need to be passed via an Authorization header to all of the Raytio endpoints. This token endpoint returns three types of authentication tokens. The identity_token must be passed as a Bearer token to the appropriate endpoint.
The refresh_token can be used to return updated identity_token and access_token values.

path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Request Body schema: application/json

Username and Password details for authentication

grant_type
string
Enum:"refresh_token" "password"

The type of grant that is being requested

username
string
Value:"user@rayt.io"

User Name. Required where grant_type is password.

password
string
Value:"abcdefabcdef"

Password. Required where grant_type is password.

refresh_token
string

The refresh token. Required where grant_type is refresh_token.

Responses

200

200 OK

401

Unauthorized

500

Internal Server Error

502

Bad Gateway

post /oauth/{version}/token

Production server (uses live data)

https://api.rayt.io//oauth/{version}/token

Sandbox server (uses test data)

https://api-sandbox.rayt.io//oauth/{version}/token

Request samples

application/json
Copy
Expand all Collapse all
{
  • "grant_type": "refresh_token",
  • "username": "user@rayt.io",
  • "password": "abcdefabcdef",
  • "refresh_token": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "user@rayt.io has been authenticated.",
  • "identity_token": "abcdefabcdef",
  • "refresh_token": "abcdefabcdef",
  • "access_token": "abcdefabcdef"
}

addUser

The signup endpoint allows the creation of a new username and password. The user must be verified before it can be used.

path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Request Body schema: application/json

Username and Password details for signup

username
required
string
Value:"user@rayt.io"

Username

password
required
string
Value:"abcdefabcdef"

Password

verification_code_org
string
Value:"abcd1234"

The verification code for the user being invited to the organisation. Only relevant if a non-existent user has been invited to join an existing organisation.

Responses

200

200 OK

400

Bad Request

500

Internal Server Error

502

Bad Gateway

post /oauth/{version}/signup

Production server (uses live data)

https://api.rayt.io//oauth/{version}/signup

Sandbox server (uses test data)

https://api-sandbox.rayt.io//oauth/{version}/signup

Request samples

application/json
Copy
Expand all Collapse all
{
  • "username": "user@rayt.io",
  • "password": "abcdefabcdef",
  • "verification_code_org": "abcd1234"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "User user@rayt.io has been created and an email with a verification code has been sent to the email address. Please confirm the verification code to complete the registration process."
}

verifyUser

The verify endpoint validates a user's email address by requiring that the code sent to that email address has been verified before the user is activated. The confirmation code expires within 24 hours of being generated. If the confirmation code is provided incorrectly then a new code will be generated and emailed to the user.

path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Request Body schema: application/json

Username and Confirmation details for verify

username
required
string
Value:"user@rayt.io"

Username

verification_code
required
string
Value:"123456789"

Verification code as emailed to the user.

Responses

200

200 OK

400

Bad Request

500

Internal Server Error

502

Bad Gateway

post /oauth/{version}/verify

Production server (uses live data)

https://api.rayt.io//oauth/{version}/verify

Sandbox server (uses test data)

https://api-sandbox.rayt.io//oauth/{version}/verify

Request samples

application/json
Copy
Expand all Collapse all
{
  • "username": "user@rayt.io",
  • "verification_code": "123456789"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "User user@rayt.io is verified."
}

resetPassword

The password-reset endpoint will allow a user's password to be reset. A confirmation code will be emailed to the user which must then be provided, together with the new password, to the password-confirm endpoint. The confirmation code expires within 24 hours of being generated. Once a password reset request has been made, it will not be possible to authenticate until the new password has been confirmed.

path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Request Body schema: application/json

Username details for password-reset

username
string
Value:"user@rayt.io"

Username

Responses

200

200 OK

400

Bad Request

500

Internal Server Error

502

Bad Gateway

post /oauth/{version}/password-reset

Production server (uses live data)

https://api.rayt.io//oauth/{version}/password-reset

Sandbox server (uses test data)

https://api-sandbox.rayt.io//oauth/{version}/password-reset

Request samples

application/json
Copy
Expand all Collapse all
{
  • "username": "user@rayt.io"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "Password for user@rayt.io has been reset and an email with a verification code has been sent to the email address. Please confirm the verification code to reset the password."
}

confirmPassword

The password-confirm endpoint updates a user's password after a request has been made to password-reset. The confirmation code which has been emailed to the user must be provided, together with the new password.

path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Request Body schema: application/json

Username details for password-confirm

username
string
Value:"user@rayt.io"

Username

verification_code
string
Value:"123456789"

Verification code as emailed to the user.

password
string
Value:"abcdefabcdef"

Password

Responses

200

200 OK

400

Bad Request

500

Internal Server Error

502

Bad Gateway

post /oauth/{version}/password-confirm

Production server (uses live data)

https://api.rayt.io//oauth/{version}/password-confirm

Sandbox server (uses test data)

https://api-sandbox.rayt.io//oauth/{version}/password-confirm

Request samples

application/json
Copy
Expand all Collapse all
{
  • "username": "user@rayt.io",
  • "verification_code": "123456789",
  • "password": "abcdefabcdef"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "Password for user@rayt.io has been reset."
}

updatePassword

The password-change endpoint allows an authenticated user to change their password. The existing password must be provided, together with the new password.

path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Request Body schema: application/json

Request details for password-change

access_token
string
Value:"1234abcd"

A valid authentication token. Note that this is the access_token as returned by the token endpoint, not the identity_token.

password_existing
string
Value:"abcdefabcdef"

The user's current password.

password_new
string
Value:"abcdefabcdefg"

The password to update to.

Responses

200

200 OK

400

Bad Request

401

Unauthorized

500

Internal Server Error

502

Bad Gateway

post /oauth/{version}/password-change

Production server (uses live data)

https://api.rayt.io//oauth/{version}/password-change

Sandbox server (uses test data)

https://api-sandbox.rayt.io//oauth/{version}/password-change

Request samples

application/json
Copy
Expand all Collapse all
{
  • "access_token": "1234abcd",
  • "password_existing": "abcdefabcdef",
  • "password_new": "abcdefabcdefg"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "Password for user@rayt.io has been changed."
}

org

Raytio Organisation APIs

getOrgs

Retrieves the details of all organisations that the authenticated user can access.

Authorizations:
path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Responses

200

200 OK

401

Unauthorized

500

Internal Server Error

502

Bad Gateway

get /org/{version}

Production server (uses live data)

https://api.rayt.io//org/{version}

Sandbox server (uses test data)

https://api-sandbox.rayt.io//org/{version}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "user": "dc734422-375a-4bea-abf8-a98ddd5456ab",
  • "organizations":
    [
    ],
  • "message": "Organizations assigned to the user dc734422-375a-4bea-abf8-a98ddd5456ab : yJUOp003tkWNqBl-hH-OOA,f0017d23_c8da_4501_9339_d84202c421f4."
}

addOrg

Creates a new organisation object.

Authorizations:
path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Request Body schema: application/json

Organisation request details

name
string
address
Array of objects

Responses

200

200 OK

401

Unauthorized

500

Internal Server Error

502

Bad Gateway

post /org/{version}

Production server (uses live data)

https://api.rayt.io//org/{version}

Sandbox server (uses test data)

https://api-sandbox.rayt.io//org/{version}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "name": "Test Organization 5",
  • "address":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "name": "Test Organization 5",
  • "address":
    {
    },
  • "id": "de16ed4f-2dc1-4325-a41c-489cf6bad744"
}

getOrgById

Retrieves the details of an existing organisation. You need only supply the unique organisation identifier that was returned upon organisation creation.

Authorizations:
path Parameters
version
required
string (api_version)
Value:"v1"

The API version

ID
required
string
Example: "de16ed4f-2dc1-4325-a41c-489cf6bad744"

The identifier of the organisation to be retrieved.

Responses

200

200 OK

401

Unauthorized

500

Internal Server Error

502

Bad Gateway

get /org/{version}/{ID}

Production server (uses live data)

https://api.rayt.io//org/{version}/{ID}

Sandbox server (uses test data)

https://api-sandbox.rayt.io//org/{version}/{ID}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "name": "Test Organization 5",
  • "address":
    {
    },
  • "id": "de16ed4f-2dc1-4325-a41c-489cf6bad744"
}

updateOrg

Updates an existing organisation.

Authorizations:
path Parameters
version
required
string (api_version)
Value:"v1"

The API version

ID
required
string

The identifier of the organisation to be updated.

Request Body schema: application/json

Organisation request details

name
string
address
Array of objects

Responses

200

200 OK

401

Unauthorized

500

Internal Server Error

502

Bad Gateway

post /org/{version}/{ID}

Production server (uses live data)

https://api.rayt.io//org/{version}/{ID}

Sandbox server (uses test data)

https://api-sandbox.rayt.io//org/{version}/{ID}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "name": "Test Organization 5",
  • "address":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "name": "Test Organization 5",
  • "address":
    {
    },
  • "id": "de16ed4f-2dc1-4325-a41c-489cf6bad744"
}

inviteOrgMember

Invite an existing or new user to become a member of an organisation.

Authorizations:
path Parameters
version
required
string (api_version)
Value:"v1"

The API version

ID
required
string

The identifier of the organisation.

Request Body schema: application/json

Organisation invite request details

email
required
string

The email address of the user being invited to the organisation.

Responses

200

200 OK

400

Bad Request

401

Unauthorized

500

Internal Server Error

502

Bad Gateway

post /org/{version}/{ID}/invite

Production server (uses live data)

https://api.rayt.io//org/{version}/{ID}/invite

Sandbox server (uses test data)

https://api-sandbox.rayt.io//org/{version}/{ID}/invite

Request samples

application/json
Copy
Expand all Collapse all
{
  • "email": "user@rayt.io"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "The user user@rayt.io has been invited to join the Testing organization and an email with a verification code has been sent."
}

verifyOrgMember

Validates the verification code and adds an invited user to the organisation.

path Parameters
version
required
string (api_version)
Value:"v1"

The API version

ID
required
string

The identifier of the organisation.

Request Body schema: application/json

Organisation request details

verification_code_org
required
string

The verification code for the user being invited to the organisation.

Responses

200

200 OK

400

Bad Request

401

Unauthorized

500

Internal Server Error

502

Bad Gateway

post /org/{version}/{ID}/verify

Production server (uses live data)

https://api.rayt.io//org/{version}/{ID}/verify

Sandbox server (uses test data)

https://api-sandbox.rayt.io//org/{version}/{ID}/verify

Request samples

application/json
Copy
Expand all Collapse all
{
  • "verification_code_org": "abcd1234"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "User is verified."
}

graph

Raytio Graph APIs

Add profile object

Create new profile object(s). Will link the new profile object(s) with the current user via an 'Owns' relationship.

Authorizations:
path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Request Body schema: application/json

Profile object details

Array
schema
string

The name of the schema to allocate to the profile object. The properties will be validated against this schema.

labels
Array of strings

The object node type.

properties
object

The profile object. The object content depends on the profile object (schema) type.

Responses

200

200 OK

401

Unauthorized

403

Forbidden

500

Internal Server Error

502

Bad Gateway

post /graph/{version}/profile_object

Production server (uses live data)

https://api.rayt.io//graph/{version}/profile_object

Sandbox server (uses test data)

https://api-sandbox.rayt.io//graph/{version}/profile_object

Request samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

application/json
Copy
Expand all Collapse all
{
  • "n_id": "6bf57004-1afe-4edf-9b6d-ede97b6a59fc",
  • "labels":
    [
    ],
  • "properties": { }
}

Update profile object

Update a profile object.

Authorizations:
path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Request Body schema: application/json

Profile object details

Array
n_id
string

The id of the profile object.

labels
Array of strings

The object node type.

params
object

The profile object. Depends on the profile type.

Responses

200

200 OK

401

Unauthorized

403

Forbidden

500

Internal Server Error

502

Bad Gateway

put /graph/{version}/profile_object

Production server (uses live data)

https://api.rayt.io//graph/{version}/profile_object

Sandbox server (uses test data)

https://api-sandbox.rayt.io//graph/{version}/profile_object

Request samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

application/json
Copy
Expand all Collapse all
{
  • "n_id": "6bf57004-1afe-4edf-9b6d-ede97b6a59fc",
  • "labels":
    [
    ],
  • "properties": { }
}

Get profile objects

Read profile objects. Returns nodes based on node ids (n_id) or based on current user's permissions.

Authorizations:
path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Request Body schema: application/json

Profile object details

profile_objects
Array of objects

An array of profile objects to match.

permissions
Array of strings

The permissions to match.

Responses

200

200 OK

401

Unauthorized

403

Forbidden

500

Internal Server Error

502

Bad Gateway

post /graph/{version}/profile_object/read

Production server (uses live data)

https://api.rayt.io//graph/{version}/profile_object/read

Sandbox server (uses test data)

https://api-sandbox.rayt.io//graph/{version}/profile_object/read

Request samples

application/json
Copy
Expand all Collapse all
{
  • "profile_objects":
    [
    ],
  • "permissions": "IS_OWNER"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "profile_objects":
    [
    ],
  • "relationships":
    [
    ]
}

Get profile object by Id

Retrieve a specified profile object.

Authorizations:
path Parameters
version
required
string (api_version)
Value:"v1"

The API version

n_id
required
string

The identifier of the profile object.

Responses

200

200 OK

401

Unauthorized

403

Forbidden

500

Internal Server Error

502

Bad Gateway

get /graph/{version}/profile_object/{n_id}

Production server (uses live data)

https://api.rayt.io//graph/{version}/profile_object/{n_id}

Sandbox server (uses test data)

https://api-sandbox.rayt.io//graph/{version}/profile_object/{n_id}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "n_id": "6bf57004-1afe-4edf-9b6d-ede97b6a59fc",
  • "labels":
    [
    ],
  • "properties": { }
}

Add schema

Create a new schema.

Authorizations:
path Parameters
version
required
string (api_version)
Value:"v1"

The API version

Request Body schema: application/json

Profile object details

name
string

The name of the schema.

type
string
Enum:"ps" "ss" "us"

The object node type.

Responses

200

200 OK

401

Unauthorized

500

Internal Server Error

502

Bad Gateway

post /graph/{version}/schema

Production server (uses live data)

https://api.rayt.io//graph/{version}/schema

Sandbox server (uses test data)

https://api-sandbox.rayt.io//graph/{version}/schema

Request samples

application/json
Copy
Expand all Collapse all
{
  • "name": "person",
  • "type": "ss"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "name": "person",
  • "type": "us"
}

Get schema by Id

Read an existing schema.

Authorizations:
path Parameters
version
required
string (api_version)
Value:"v1"

The API version

schema_ID
required
string

The identifier of the schema object.

schema_type
required
string
Enum:"os" "ps" "us" "ss"

The type of the schema