NAV
cURL

Introduction

Strigo’s v1 REST API allows you to perform most basic actions Strigo supports for non-live interaction with Strigo’s platform.

Some actions, like changing billing settings, are only available via the web interface.

API Endpoint

The default API endpoint for all v1 requests is:

https://app.strigo.io/api/v1

All paths shown here are relative to this path.

Authentication

Basic usage

$ curl -X METHOD \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://<STRIGO_ENDPOINT>/api/v1/<endpoint>" [-d <data>]

Authentication is done using a Bearer token split into two parts:

Assuming you’re an organization’s owner, you can generate an API key for your org. If not, you can retrieve the generated key and org ID.

The creds can be found here.

We’ll be adding additional authentication methods in the future.

Response Structure

Successful Request Response Example

{
  "result": "success",
  "data": [
    {
      "level": "owner",
      "email": "user1@strigo.io",
      "id": "rMWNrMT2PCySh2PSo"
    },
    {
      "level": "member",
      "email": "user2@strigo.io",
      "id": "AsEM3RtnbuudJBLD5"
    }
  ]
}

Failed Request Response Example

{
  "result": "failure",
  "error": {
    "type": "ClassNotFound",
    "message": "Class hd3ALTaLAbhfzmBbf could not be found."
  }
}

Each response, (except for /health) contains at the very least one high-level key (result) and two optional ones (data and error).

The result Key

The result key is supposed to help you identify, before proceeding any further in your code, whether the request was successful or not. This is merely a convenience. The values can either be success or failure.

The data Key

The data key is only included when we need to return any data to act on. DELETE actions, for example, don’t return data.

The error Key

The error key is only included when an error occurs, and has two fields (type and message).

Request validation errors also return an errors array as part of the error:

{
  "result": "failure",
  "error": {
    "message": "The request is not valid",
    "type": "RequestValidationError",
    "errors": [
      {
        "location": "body",
        "param": "class_id",
        "msg": "Must be a valid class ID"
      },
      {
        "location": "body",
        "param": "owner",
        "msg": "Must be a valid email address"
      },
      {
        "location": "body",
        "param": "date_start",
        "msg": "Must be an ISO8601 compliant date"
      },
      {
        "location": "body",
        "param": "date_end",
        "msg": "Must be an ISO8601 compliant date"
      }
    ]
  }
}

Errors and Validations

Validation errors

Request validations are performed on all request query and body parameters. This should allow users to understand exactly which parameter is invalid.

For all validation errors, the RequestValidationError error type is returned with HTTP error 422.

Granular Error Types (WIP)

We provide rather granular error types that should allow you to programmatically respond to errors.

For example, given a DELETE request to delete an event that is currently live, an EventNotInReadyState error type will be returned.

Error Codes

We use standard response codes for all requests.

Actions and Methods

We use the common pattern of performing actions based on the HTTP method used:

Health Check

Request

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/health"

Response

{
  "status": "ok",
  "message": "Healthy"
}

Endpoint

GET /health

Usage

This can be used to verify server integrity and to validate your credentials.

Rate Limiting

We currently allow ~1xx-~2xx RPM. This will change in the future.

All responses contain headers indicating the current limit status.

Response Example

HTTP/1.1 201 Created
connection: keep-alive
content-length: 176
content-type: application/json; charset=utf-8
date: Sun, 28 Oct 2018 08:14:55 GMT
etag: W/"b0-oyLnTncCdwzOLaMEktxD6NJ1PL0"
vary: Accept-Encoding
x-powered-by: Express
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
x-ratelimit-reset: 1540714538

...

Passed the limit

HTTP/1.1 429 Too Many Requests
connection: keep-alive
content-length: 42
content-type: text/html; charset=utf-8
date: Sun, 28 Oct 2018 08:37:49 GMT
etag: W/"2a-UpTsLJ74nYuiLgNgEwlQMxGqwrE"
retry-after: 60
vary: Accept-Encoding
x-powered-by: Express
x-ratelimit-limit: 60
x-ratelimit-remaining: 0
x-ratelimit-reset: 1540715901

Too many requests, please try again later.

Classes

The Class Resource

Attributes:

Attribute Type Description
id String The class’s unique identifier.
name String The class’s name.
owner String The email or unique ID of the org member who created the class. Note that this is currently automatically inferred from the request, and has not effect on functionality.
description String The class’s description.
resources List The lab resources chosen for the class (see resources).
presentation_notes List The presentation notes added to the class’s presentation (see presentation notes).
presentation_filename String The name of the presentation file (see presentations).
created_at Datetime The time when the class was created.
updated_at Datetime The time when the class was last updated.
labels List The list of labels applied to the class template.

Retrieve all classes

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes"

Response Example

[
  {
    "id": "K6inELDjusK76rwGw",
    "name": "Intro to Docker",
    "owner": {
        "email": "me@strigo.io",
        "id": "rMWNrMT2PCySh2PGo"
    },
    "presentation_notes": [],
    "resources": [
      {
        "id": "32xuu5Ap8G93CWA6X",
        "image_id": "ami-614dcd0e",
        "image_user": "ubuntu",
        "instance_type": "t2.large",
        "is_custom_image": false,
        "name": "Docker Node 1",
        "type": "lab_instance"
      },
      {
        "id": "DcnEqgGiBuisXadqe",
        "image_id": "ami-12312321",
        "image_user": "boot",
        "instance_type": "t2.medium",
        "is_custom_image": true,
        "name": "Docker Node 2",
        "type": "lab_instance"
      }
    ]
  }
]

Usage

Lists all classes for your organization.

GET "/classes"

Retrieve a single class

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/p3bdnrweEystFToCq"

Response Example

  {
    "id": "K6inELDjusK76rwGw",
    "name": "Intro to Docker",
    "owner": {
        "email": "me@strigo.io",
        "id": "rMWNrMT2PCySh2PGo"
    },
    "presentation_notes": [],
    "resources": [
      {
        "id": "32xuu5Ap8G93CWA6X",
        "image_id": "ami-614dcd0e",
        "image_user": "ubuntu",
        "instance_type": "t2.large",
        "is_custom_image": false,
        "name": "Docker Node 1",
        "type": "lab_instance"
      },
      {
        "id": "DcnEqgGiBuisXadqe",
        "image_id": "ami-12312321",
        "image_user": "boot",
        "instance_type": "t2.medium",
        "is_custom_image": true,
        "name": "Docker Node 2",
        "type": "lab_instance"
      }
    ]
  }

Usage

Get a single class.

GET "/classes/:class_id"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.

Create a class

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes" \
    -d @- <<EOF
    {
      "name":"Intro to Docker"
    }
EOF

Response Example

{
  "id": "K6inELDjusK76rwGw",
  "name": "Intro to Docker",
  "owner": {
      "email": "me@strigo.io",
      "id": "rMWNrMT2PCySh2PGo"
  },
  "presentation_notes": [],
  "resources": []
}

Usage

Create a new class.

POST "/classes"

BODY Parameters

Attribute Type Required Description
name String Yes The class’s name.
description String No The class’s description.
labels List No The list of labels to apply to the class template.

Modify a class

Request Example

$ curl -X PATCH \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes" \
    -d @- <<EOF
    {
      "name":"Intro to Docker",
      "description": "Learning how to run and use Docker"
    }
EOF

Response Example

{
  "id": "K6inELDjusK76rwGw",
  "name": "Intro to Docker",
  "description": "Learning how to run and use Docker",
  "owner": {
      "email": "me@strigo.io",
      "id": "rMWNrMT2PCySh2PGo"
  },
  "presentation_notes": [],
  "resources": []
}

Usage

Modify a class.

PATCH "/classes/:class_id"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.

BODY Parameters

Attribute Type Required Description
name String No The class’s name.
description String No The class’s description.
labels List No The list of labels to apply to the class template.

Delete a single class

Request Example

$ curl -X DELETE \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/K6inELDjusK76rwGw"

Response Example

204 No Content

Usage

Delete a single class.

DELETE "/classes/:class_id"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.

Class Lab Resources

The Class Lab Resource

Attributes:

Attribute Type Description
id String The resources’s unique identifier.
type String Currently instance_type.
name String The resource’s display name.
image_id String The instance’s AMI ID.
image_user String The user with which to connect to the instance.
is_custom_image Boolean Whether the configured image is a custom one or a build-in one.
webview_links List A list of webview links.
post_launch_script String A multiline script to run after all instances in the workspace have loaded.
userdata String A multiline script to run after the intance loads.
ec2_region String The AWS region in which the instance is running.
instance_type String The type of the instance.
image_region_mapping Object A mapping of AWS regions to AMI IDs.

Retrieve all lab resources

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/K6inELDjusK76rwGw/resources"

Response Example

[
  {
    "id": "32xuu5Ap8G93CWA6X",
    "image_id": "ami-614dcd0e",
    "image_user": "ubuntu",
    "instance_type": "t2.large",
    "is_custom_image": false,
    "name": "Docker Node 1",
    "type": "lab_instance"
  },
  {
    "id": "DcnEqgGiBuisXadqe",
    "image_id": "ami-12312321",
    "image_user": "boot",
    "instance_type": "t2.medium",
    "is_custom_image": true,
    "name": "Docker Node 2",
    "type": "lab_instance"
  }
]

Request Example with AMI region mapping

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/KsK766inELDjurwGw/resources"

Response Example with AMI region mapping

{
  "result": "success",
  "data": [
    {
      "type": "lab_instance",
      "id": "640d9bc7dcd2f2152Sxc82fd",
      "name": "centos",
      "instance_type": "t3.medium",
      "image_id": "ami-03aae0a64be2fab88",
      "image_user": "Admin",
      "image_region_mapping": {
        "us-east-1": "ami-03aae688d154e2fab88",
        "us-west-1": "ami-00f6e688d14e2fab885"
      },
      "is_custom_image": true,
      "webview_links": [],
      "ec2_region": "us-east-1",
      "view_interface": "terminal"
    },
    {
      "type": "lab_instance",
      "id": "uJQi9fku97WQLRo5",
      "name": "My Lab 12-02-24",
      "instance_type": "t3.medium",
      "image_user": "ubuntu",
      "image_region_mapping": {
        "eu-west-1": "ami-0e6463ab1952d9fc3"
      },
      "is_custom_image": true,
      "webview_links": [],
      "ec2_region": "eu-west-1",
      "view_interface": "terminal"
    },
    {
      "type": "lab_instance",
      "id": "3khf5ooi9fku97WQN",
      "name": "My global lab",
      "instance_type": "t3.medium",
      "image_user": "ubuntu",
      "image_region_mapping": {
        "eu-west-1": "ami-030ba4e58e4fabsa",
        "us-east-1": "ami-0cf5430f423ed73c14a7",
        "ap-northeast-1": "ami-c9c7cd833009a4079",
        "ap-southeast-1": "ami-6981eeb0fab165bfb"
      },
      "is_custom_image": true,
      "webview_links": [],
      "ec2_region": "eu-west-1",
      "view_interface": "terminal"
    }
  ]
}

Usage

Lists all lab resources for a class.

GET "/classes/:class_id/resources"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.

Retrieve a single lab resource

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/K6inELDjusK76rwGw/resources/DcnEqgGiBuisXadqe"

Response Example

{
  "id": "DcnEqgGiBuisXadqe",
  "image_id": "ami-12312321",
  "image_user": "boot",
  "instance_type": "t2.medium",
  "is_custom_image": true,
  "name": "Docker Node 2",
  "type": "lab_instance"
}

Usage

Get a single lab resource.

GET "/classes/:class_id/resources/:resource_id"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.
resource_id String Yes The resource’s unique identifier.

Create a lab resource

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/K6inELDjusK76rwGw/resources" \
    -d @- <<EOF
    {
      "image_id":"ami-0ea21e760f354e854",
      "image_user": "ubuntu",
      "name": "My Lab",
      "webview_links": [{"url": "http://instance.autolab.strigo.io", "name":"My Lab Link"}]
    }
EOF

Response Example

{
  "type": "lab_instance",
  "id": "4mh5E8HwFYzeYSMAD",
  "name": "My Lab",
  "instance_type": "t2.medium",
  "image_id": "ami-0ea21e760f354e854",
  "image_user": "ubuntu",
  "is_custom_image": true,
  "webview_links": [
    {
      "name": "My Lab Link",
      "url": "://instance.autolab.strigo.io"
    }
  ]
}

Request Example with AMI region mapping

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/K6inELDjusK76rwGw/resources" \
    -d @- <<EOF
    {
      "image_user": "ubuntu",
      "name": "My Lab",
      "webview_links": [{"url": "http://instance.autolab.strigo.io", "name":"My Lab Link"}]
      "image_region_mapping": {"us-east-1": "ami-0ea214e760f354e85", "eu-west-1": "ami-a21e760f354e8540e"}
    }
EOF

Response Example with AMI region mapping

{
  "type": "lab_instance",
  "id": "4mh5E8HwFYzeYSMAD",
  "name": "My Lab",
  "instance_type": "t2.medium",
  "image_user": "ubuntu",
  "is_custom_image": true,
  "webview_links": [
    {
      "name": "My Lab Link",
      "url": "://instance.autolab.strigo.io"
    }
  ],
  "image_region_mapping": { 
    "us-east-1": "ami-0ea214e760f354e85", 
    "eu-west-1": "ami-a21e760f354e8540e"
  }
}

Usage

Create a new lab resource.

PATCH "/classes/:class_id/resources"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.

BODY Parameters

Attribute Type Required Description
name String Yes The resource’s display name.
image_id String Yes The instance’s AMI ID.
image_user String Yes The user with which to connect to the instance.
webview_links List No A list of webview links.
post_launch_script String No A multiline script to run after all instances in the workspace have loaded.
userdata String No A multiline script to run after the intance loads.
ec2_region String No The AWS region in which the instance is running (default: eu-central-1).
instance_type String No The type of the instance available for your org (default: t2.medium).
image_region_mapping Object No A mapping of AWS regions to AMI IDs.
Attribute Type Required Description
name String Yes The display name for the link.
url String Yes The url to use.

Modify a lab resource

Request Example

$ curl -X PATCH \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/K6inELDjusK76rwGw/resources/DcnEqgGiBuisXadqe" \
    -d @- <<EOF
    {
      "image_id":"ami-1111111111",
      "image_user": "ubuntu",
      "name": "My Lab 2",
      "webview_links": [{"url": "http://instance.autolab.strigo.io", "name":"My Lab Link"}]
    }
EOF

Response Example

{
  "type": "lab_instance",
  "id": "4mh5E8HwFYzeYSMAD",
  "name": "My Lab 2",
  "instance_type": "t2.medium",
  "image_id": "ami-0ea21e760f354e854",
  "image_user": "ubuntu",
  "is_custom_image": true,
  "webview_links": [
    {
      "name": "My Lab Link",
      "url": "://instance.autolab.strigo.io"
    }
  ]
}

Request Example with AMI region mapping

$ curl -X PATCH \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/K6inELDjusK76rwGw/resources/DcnEqgGiBuisXadqe" \
    -d @- <<EOF
    {
      "image_user": "ubuntu",
      "name": "My Lab 2",
      "webview_links": [{"url": "http://instance.autolab.strigo.io", "name":"My Lab Link"}],
      "image_region_mapping": {"us-east-1": "ami-0ea214e760f354e85", "eu-west-1": "ami-a21e760f354e8540e"}
    }
EOF

Response Example with AMI region mapping

{
  "type": "lab_instance",
  "id": "4mh5E8HwFYzeYSMAD",
  "name": "My Lab 2",
  "instance_type": "t2.medium",
  "image_user": "ubuntu",
  "is_custom_image": true,
  "webview_links": [
    {
      "name": "My Lab Link",
      "url": "://instance.autolab.strigo.io"
    }
  ],
  "image_region_mapping": {
    "us-east-1": "ami-0ea214e760f354e85",
    "eu-west-1": "ami-a21e760f354e8540e"
  }
}

Usage

Modify a lab resource.

PATCH "/classes/:class_id/resources/:resource_id"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.
resource_id String Yes The resource’s unique identifier.

BODY Parameters

Attribute Type Required Description
name String No The resource’s display name.
image_id String No The instance’s AMI ID.
image_user String No The user with which to connect to the instance.
webview_links List No A list of webview links.
post_launch_script String No A multiline script to run after all instances in the workspace have loaded.
userdata String No A multiline script to run after the intance loads.
ec2_region String No The AWS region in which the instance is running (default: eu-central-1).
instance_type String No The type of the instance available for your org (default: t2.medium).
image_region_mapping Object No A mapping of AWS regions to AMI IDs.
Attribute Type Required Description
name String Yes The display name for the link.
url String Yes The url to use.

Delete a single lab resource

Request Example

$ curl -X DELETE \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/K6inELDjusK76rwGw/resources/DcnEqgGiBuisXadqe"

Response Example

204 No Content

Usage

Delete a single lab resource.

DELETE "/classes/:class_id/resources/:resource_id"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.
resource_id String Yes The resource’s unique identifier.

Presentations

The Presentation Resource

Attributes:

Attribute Type Description
id String The presentation’s unique identifier.
class_id String The class’s unique identifier to which this presentation is assigned.
md5 String The md5 hash of the presentation.
upload_date Datetime The date in which the presentation was uploaded.
size_bytes Integer The size of the file in bytes.
filename String The name of the uploaded file.
content_type List List of types of the file.

Retrieve all presentations

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/RXKeXmMBjptt3EMQt/presentations"

Response Example

[
  {
    "id": "455e6c87af85c916d9bc2e7c",
    "md5": "e802201fc6f26d210b07d6da31763ce3",
    "upload_date": "2019-10-17T09:59:44.171Z",
    "size_bytes": 657049,
    "filename": "pres.pdf",
    "content_type": ["application/pdf"],
    "class_id": "RXKeXmMBjptt3EMQt"
  }
]

Usage

Lists all presentations.

GET "/classes/:class_id/presentations"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.

Retrieve a single presentation

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/RXKeXmMBjptt3EMQt/presentations/455e6c87af85c916d9bc2e7c"

Response Example

{
  "id": "455e6c87af85c916d9bc2e7c",
  "md5": "e802201fc6f26d210b07d6da31763ce3",
  "upload_date": "2019-10-17T09:59:44.171Z",
  "size_bytes": 657049,
  "filename": "pres.pdf",
  "content_type": ["application/pdf"],
  "class_id": "RXKeXmMBjptt3EMQt"
}

Usage

Get a single presentation.

GET "/classes/:class_id/presentations/:presentation_id"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.
presentation_id String Yes The presentation’s unique identifier.

Create a presentation

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    "https://app.strigo.io/api/v1/classes/RXKeXmMBjptt3EMQt/presentations" \
    -F 'presentation=@/path/to/pres.pdf'

Response Example

{
  "id": "455e6c87af85c916d9bc2e7c",
  "md5": "e802201fc6f26d210b07d6da31763ce3",
  "upload_date": "2019-10-17T09:59:44.171Z",
  "size_bytes": 657049,
  "filename": "pres.pdf",
  "content_type": ["application/pdf"],
  "class_id": "RXKeXmMBjptt3EMQt"
}

Usage

Uploads a presentation.

POST "/classes/:class_id/presentations"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.

FORM Parameters

Attribute Type Required Description
presentation List Yes A path to a presentation file.

Delete a presentation

Request Example

$ curl -X DELETE \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/RXKeXmMBjptt3EMQt/presentations/455e6c87af85c916d9bc2e7c"

Response Example

204 No Content

Usage

Delete a presentation.

DELETE "/classes/:class_id/presentations/:presentation_id"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.
presentation_id String Yes The presentation’s unique identifier.

Presentation Notes

The Presentation Notes Resource

Attribute Type Description
notes List A list of Note objects.

Retrieve all notes

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/RXKeXmMBjptt3EMQt/presentations/455e6c87af85c916d9bc2e7c/notes"

Response Example

[
  {
      "content": "yo",
      "page": 1
  }
]

Usage

Lists all presentation notes for your presentation.

GET "/classes/:class_id/presentations/:presentation_id/notes"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.
presentation_id String Yes The presentation’s unique identifier.

Create notes for a presentation

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/RXKeXmMBjptt3EMQt/presentations/455e6c87af85c916d9bc2e7c/notes" \
    -d @- <<EOF
    {
      "notes": [
        {
          "page": "1",
          "content": "yo"
        }
      ]
    }
EOF

Response Example

[
  {
      "content": "yo",
      "page": 1
  }
]

Usage

Assign notes to a presentaiton.

POST "/classes/:class_id/presentations/:presentation_id/notes"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.
presentation_id String Yes The presentation’s unique identifier.

BODY Parameters

Attribute Type Required Description
notes List Yes A list of NOTE objects.

NOTE Parameters

Attribute Type Required Description
page Integer Yes The page in the presentation to which this note applies.
content String Yes The textual content of the note.

Delete all notes for a presentation

Request Example

$ curl -X DELETE \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/classes/RXKeXmMBjptt3EMQt/presentations/455e6c87af85c916d9bc2e7c/notes"

Response Example

204 No Content

Usage

Delete all notes for a presentation.

DELETE "/classes/:class_id/presentations/:presentation_id/notes"

URL Parameters

Attribute Type Required Description
class_id String Yes The class’s unique identifier.
presentation_id String Yes The presentation’s unique identifier.

Events

The Event Resource

Attributes:

Attribute Type Description
id String The event’s unique identifier.
owner Object The email and id of the org member hosting the event.
name String The event’s name.
event_link String The event’s link.
token String The event’s public access token.
class_id String The unique id of the class the event is based on.
availability String public/private
description String The event’s description.
date_start Datetime The date when the event starts (ISO8601).
date_end Datetime The date when the event ends (ISO8601).
include_chat Boolean Whether the event should include chat.
include_video Boolean Whether the event should include video.
tas List A list of training assistant emails.
trainees List A list of learner emails (for private only).
status String The status of the event.
partner_id String The unique ID of the partner entity to which this event belongs.
include_lab_exercises Boolean Whether to include lab exercises in the event (if there are exercises configured in the class template).
labels List The list of labels applied to the event.
is_recorded Boolean Whether the event should be recorded

Retrieve all events

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/events"

Response Example

[
    {
        "availability": "public",
        "class_id": "hd3ALTaLAbhfzmBbf",
        "date_end": "2018-09-20T12:00:00.000Z",
        "date_start": "2018-09-20T11:00:00.000Z",
        "event_link": "https://app.strigo.io/event/p3bQnrweEystFToCq",
        "id": "p3bdnrweEystFToCq",
        "include_chat": false,
        "include_video": false,
        "name": "My Event",
        "owner": {
            "email": "me@strigo.io",
            "id": "rMWNrMT2pCySh2PGo"
        },
        "status": "live",
        "tas": [],
        "token": "9NX4",
        "is_recorded": false,
        "trainees": []
    }
]

Usage

Lists all events for your organization, regardless of their status.

GET "/events"

Retrieve a single event

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/events/p3bdnrweEystFToCq"

Response Example

{
    "availability": "public",
    "class_id": "hd3ALTaLAbhfzmBbf",
    "date_end": "2018-09-20T12:00:00.000Z",
    "date_start": "2018-09-20T11:00:00.000Z",
    "event_link": "https://app.strigo.io/event/p3bQnrweEystFToCq",
    "id": "p3bdnrweEystFToCq",
    "include_chat": false,
    "include_video": false,
    "name": "My Event",
    "owner": {
        "email": "me@strigo.io",
        "id": "rMWNrMT2pCySh2PGo"
    },
    "status": "live",
    "tas": [],
    "token": "9NX4",
    "is_recorded":false,
    "trainees": []
}

Usage

Get a single event.

GET "/events/:event_id"

URL Parameters

Attribute Type Required Description
event_id String Yes The event’s unique identifier.

Create an event

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/events" \
    -d @- <<EOF
    {
      "name":"My Event",
      "date_end": "2018-10-30T13:00:00.000Z",
      "date_start": "2018-09-20T11:00:00.000Z",
      "owner": "me@strigo.io",
      "class_id": "hd3ALTaLAbhfzmBbf"
    }
EOF

Response Example

{
    "availability": "public",
    "class_id": "hd3ALTaLAbhfzmBbf",
    "date_end": "2018-10-30T13:00:00.000Z",
    "date_start": "2018-09-20T11:00:00.000Z",
    "event_link": "https://app.strigo.io/event/p3bQnrweEystFToCq",
    "id": "p3bdnrweEystFToCq",
    "include_chat": false,
    "include_video": false,
    "name": "My Event",
    "owner": {
        "email": "me@strigo.io",
        "id": "rMWNrMT2pCySh2PGo"
    },
    "status": "live",
    "tas": [],
    "token": "9NX4",
    "is_recorded": false,
    "trainees": []
}

Usage

Create a new event.

POST "/events"

BODY Parameters

Attribute Type Required Description
name String Yes The event’s name (limited to 256 chars).
owner String Yes The email of the org member hosting the event.
class_id String Yes The unique id of the class the event is based on.
description String No The event’s description (limited to 65536 chars).
date_start Datetime Yes The date when the event starts (ISO8601).
date_end Datetime Yes The date when the event ends (ISO8601).
include_chat Boolean No Whether the event should include chat.
include_video Boolean No Whether the event should include video.
tas List No A list of training assistant emails.
trainees List No A list of learner emails (adding trainees implicitly creates a private event).
availability String No The availability of the event [“public”/“private”].
include_lab_exercises Boolean No Whether to include lab exercises in the event (if there are exercises configured in the class template).
labels List No The list of labels to apply to the event.
timezone String No The timezone in which the start and end dates are set. See timezone list, Default is Etc/UTC
captions_language String No The BCP-47 code for a spoken language used on this event’s live captions. The default value is “en-US”. The following language codes are supported: “en-AU” (English, Australia), “en-GB” (Englsh, UK), “es-US” (English, US), “zh-CN” (Chinese, Simplified), “fr-FR” (French), “fr-CA” (French, Canadian), “de-DE” (German), “hi-IN” (Hindi, Indian), “it-IT” (Italian), “ja-JP” (Japanese), “ko-KR” (Korean), “pt-BR” (Portuguese, Brazilian), “th-TH” (Thai)
is_recorded Boolean No Whether the event should be recorded.

Modify an event

Request Example

$ curl -X PATCH \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/events" \
    -d @- <<EOF
    {
        "name": "Another Event",
        "owner": "someone.else@strigo.io"
    }
EOF

Response Example

{
    "availability": "public",
    "class_id": "hd3ALTaLAbhfzmBbf",
    "date_end": "2018-10-30T13:00:00.000Z",
    "date_start": "2018-09-20T11:00:00.000Z",
    "event_link": "https://app.strigo.io/event/p3bQnrweEystFToCq",
    "id": "p3bdnrweEystFToCq",
    "include_chat": false,
    "include_video": false,
    "name": "Another Event",
    "owner": {
        "email": "someone.else@strigo.io",
        "id": "LLWdr8TFpRTS022Go"
    },
    "status": "live",
    "tas": [],
    "token": "9NX4",
    "is_recorded": false,
    "trainees": []
}

Usage

Modify an existing event.

PATCH "/events/:event_id"

URL Parameters

Attribute Type Required Description
event_id String Yes The event’s unique identifier.

BODY Parameters

Attribute Type Required Description
name String No The event’s name (limited to 256 chars).
owner String No The email of the org member hosting the event.
description String No The event’s description (limited to 65536 chars).
date_start Datetime No The date when the event starts (ISO8601).
date_end Datetime No The date when the event ends (ISO8601).
class_id String No The unique id of the class the event is based on.
include_chat Boolean No Whether the event should include chat.
include_video Boolean No Whether the event should include video.
tas List No A list of training assistant emails.
trainees List No A list of learner emails (adding trainees implicitly means a private event).
availability String No The availability of the event [“public”/“private”]. * Setting a private event to “public” will remove the event ‘trainees’ list.
include_lab_exercises Boolean No Whether to include lab exercises in the event (if there are exercises configured in the class template).
labels List No The list of labels to apply to the event.
timezone String No The timezone in which the start and end dates are set. See timezone list, Default is Etc/UTC
captions_language String No The BCP-47 code for a spoken language used on this event’s live captions. The default value is “en-US”. The following language codes are supported: “en-AU” (English, Australia), “en-GB” (Englsh, UK), “es-US” (English, US), “zh-CN” (Chinese, Simplified), “fr-FR” (French), “fr-CA” (French, Canadian), “de-DE” (German), “hi-IN” (Hindi, Indian), “it-IT” (Italian), “ja-JP” (Japanese), “ko-KR” (Korean), “pt-BR” (Portuguese, Brazilian), “th-TH” (Thai)
is_recorded Boolean No Whether the event should be recorded.

Delete an event

Request Example

$ curl -X DELETE \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/events/p3bdnrweEystFToCq"

Response Example

204 No Content

Usage

Delete a single event.

DELETE "/events/:event_id"

URL Parameters

Attribute Type Required Description
event_id String Yes The event’s unique identifier.

Event Reports

Exercises report

This data represents all workspaces’ exercise results that related to a specific event.

Attributes:

Attribute Type Description
event_id String A unique identifier of the event.

URL Parameters

Attribute Type Required Description
event_id String Yes The event’s unique identifier.

Query Parameters

Attribute Type Required Description
output String No The desired output type (json, csv). Default is json.

Usage

Generates a report of all workspaces’ exercise results of the event.

GET "/events/:event_id/reports/exercises"

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/events/${event_id}/reports/exercises"

Response Example

[
  {
    "event_id": "45f2305650328ac7afd34a61",
    "event_name": "Erlich Bachman's new event",
    "email": "erlich@strigo.io",
    "name": "Erlich Bachman",
    "workspace_id": "J5SEv6sXeJQcSFwAG",
    "exercises_finished": 2,
    "exercises_count": 2,
    "all_exercises_completed": true,
    "exercise_1_title": "First question",
    "exercise_1_type": "question",
    "exercise_1_result": "success",
    "exercise_1_finished_at": "2023-11-21T09:43:59.285Z",
    "exercise_2_title": "Second exercise",
    "exercise_2_type": "exercise",
    "exercise_2_result": "success",
    "exercise_2_finished_at": "2023-11-21T09:59:59.285Z",
  }
]

CSV Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: text/csv" \
    -H "Content-Type: text/csv" \
    "https://app.strigo.io/api/v1/events/${event_id}/reports/exercises?output=csv"

Response Example

event_id,event_name,email,name,workspace_id,exercises_finished,exercises_count,all_exercises_completed,exercise_1_title,exercise_1_type,exercise_1_result,exercise_1_finished_at,exercise_2_title,exercise_2_type,exercise_2_result,exercise_2_finished_at
"45f2305650328ac7afd34a61","Erlich Bachman's new event","erlich@strigo.io","Erlich Bachman","J5SEv6sXeJQcSFwAG",2,2,true,"First question","question","success","2023-11-21T09:43:59.285Z","Second exercise","exercise","failure","2023-11-21T09:59:59.285Z"

User activity report

Lists event’s user activity sessions.

Attributes:

Attribute Type Required Description
event_id String yes A unique identifier of the event.
from Date no Start date to filter activity by.
to Date no End date to filter activity by.

from - defaults to one month ago.

to - defaults to current request execution time.

URL Parameters

Attribute Type Required Description
event_id String Yes The event’s unique identifier.

Body Parameters

Attribute Type Required Description
from Date no Start date to filter activity by.
to Date no End date to filter activity by.

Usage

Generate a report of attendees’ user activity of the event.

POST "/events/:event_id/reports/user-activity"

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/events/${event_id}/reports/user-activity" \
    -d @- <<EOF
    {
      "from":"2022-10-07T15:10:52.934Z",
      "to": "2022-11-06T15:10:52.934Z"
    }
EOF

Response Example

{
  "result": "success",
  "data": [
    {
      "eventId": "635xxxxx0273addadxxxxxxx",
      "workspaceId": "roxxxxnphJohxxxxx",
      "name": "Bertram Gilfoyle",
      "email": "gilfoyle@pp.io",
      "role": "host",
      "status": "done",
      "startedAt": "2022-10-31T13:37:21.150Z",
      "sessions": [
        {
          "sessionStartTime": "2022-10-31T13:37:22.784Z",
          "sessionEndTime": "2022-10-31T13:41:45.386Z",
          "sessionDurationInSeconds": 262.602
        },
        {
          "sessionStartTime": "2022-10-31T14:31:01.863Z",
          "sessionEndTime": "2022-10-31T14:33:22.659Z",
          "sessionDurationInSeconds": 140.796
        }
      ],
      "totalSessionTime": 403.39799999999997,
      "from": "2022-10-07T15:10:52.934Z",
      "to": "2022-11-06T15:10:52.934Z"
    },
    {
      "eventId": "635xxxxx0273addadxxxxxxx",
      "workspaceId": "yyyYqh65taB3yyyy",
      "name": "Dinesh Chugtai",
      "email": "dinesh@pp.io",
      "role": "student",
      "status": "done",
      "startedAt": "2022-10-31T13:37:50.280Z",
      "sessions": [
        {
          "sessionStartTime": "2022-10-31T13:37:50.753Z",
          "sessionEndTime": "2022-10-31T13:46:22.528Z",
          "sessionDurationInSeconds": 511.775
        },
        {
          "sessionStartTime": "2022-10-31T14:31:07.156Z",
          "sessionEndTime": "2022-10-31T14:32:07.156Z",
          "sessionDurationInSeconds": 60
        },
        {
          "sessionStartTime": "2022-10-31T15:21:15.918Z",
          "sessionEndTime": "2022-10-31T15:22:15.918Z",
          "sessionDurationInSeconds": 60
        }
      ],
      "totalSessionTime": 631.775,
      "from": "2022-10-07T15:10:52.934Z",
      "to": "2022-11-06T15:10:52.934Z"
    }
  ]
}

Workspace Exercises

Workspace exercises represent the manifestation of an exercise for a specific workspace in a live event or and on-demand course.

This representation has information about the status and progress of the exercises within the workspace.

The Workspace Exercise Resource

Attributes:

Attribute Type Description
id String A unique identifier of the workspace exercise.
title String The title of the exercise.
status String The completion status of the exercise, i.e. OPEN or DONE.
finished_at Datetime The date and time the exercise has been completed on. Will be omitted if the exercise had not been complete at all.

Workspace Lab Resources

A workspace lab resource is a reference to the actual lab created for a workspace.

The Workspace Lab Resource

Attributes:

Attribute Type Description
id String The resource’s unique identifier.
event_id String The event id the resource belongs to.
type String The type of the resource.
public_ip String The publically accessible IP of the resource.
private_ip String The private IP of the resource (accessible from other lab resources).
workspace_id String The id of the workspace the resource belongs to.
connection_type String The type of interface this resource is accessed by (RDP/SSH).
host String The publically accessible host string of the resource.
port String The port through which which this resource can be accessed.
status String The status of the resource.
strigo_dns String The publically accessible DNS name of the resource.

Retrieve all workspace resources

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/events/K6inELDjusK76rwGw/workspaces/ECANkhaMraTFjFBSk/resources"

Response Example

[
  {
    "id": "asANksdMTqjegKTLM",
    "event_id": "K6inELDjusK76rwGw",
    "workspace_id": "ECANkhaMraTFjFBSk",
    "public_ip": "3.124.187.66",
    "private_ip": "172.31.23.29",
    "type": "lab_instance",
    "host": "ec2-3-124-187-66.eu-central-1.compute.amazonaws.com",
    "port": "22",
    "connection_type": "ssh",
    "status": "running",
    "strigo_dns": "ecankhamratfjfbsk-heflvgbrrknpdfi2y.labs.strigo.io"
  }
]

Usage

Lists all resources for an workspace.

GET "/events/:event_id/workspaces/:workspace_id/resources"

URL Parameters

Attribute Type Required Description
event_id String Yes The event’s unique identifier.
workspace_id String Yes The workspace’s unique identifier.

Event Workspaces

Workspaces are the technical entities which represent learners in an event.

A workspace contains some information about learner activities and state.

The Workspace Resource

Attributes:

Attribute Type Description
id String The workspace’s unique identifier.
event_id String The event id the workspace belongs to.
created_at Datetime The time when the workspace was created (attendee attended the event).
type String The type of the workspace (host, ta, learner).
owner Object The email and id of the org member hosting the event.
viewstate String The position in the classroom the attendee is currently in.
online_status String Whether the attendee is currently considered active or not.
last_seen Datetime The time when the user was last seen active.
need_assistance Boolean Whether the workspace is currently asking for assistance.

Retrieve all workspaces

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/events/K6inELDjusK76rwGw/workspaces"

Response Example

[
  {
    "created_at": "2018-09-20T10:38:18.656Z",
    "id": "ECANkhaMraTFjFBSk",
    "last_seen": "2018-09-20T10:40:11.013Z",
    "need_assistance": false,
    "online_status": "online",
    "owner": {
      "email": "me@strigo.io",
      "id": "rMWNrMT2PCySh2PGo"
    },
    "type": "host"
  }
]

Usage

Lists all workspaces for an event.

GET "/events/:event_id/workspaces"

Retrieve a single workspace

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/events/K6inELDjusK76rwGw/workspaces/ECANkhaMraTFjFBSk"

Response Example

{
  "created_at": "2018-09-20T10:38:18.656Z",
  "id": "ECANkhaMraTFjFBSk",
  "last_seen": "2018-09-20T10:40:11.013Z",
  "need_assistance": false,
  "online_status": "online",
  "owner": {
    "email": "me@strigo.io",
    "id": "rMWNrMT2PCySh2PGo"
  },
  "type": "host"
}

Usage

Get a single workspace.

GET "/events/:event_id/workspaces/:workspace_id"

URL Parameters

Attribute Type Required Description
event_id String Yes The event’s unique identifier.
workspace_id String Yes The workspace’s unique identifier.

On Demand Courses

The On Demand Course Resource

Attributes:

Attribute Type Description
id String The course’s unique identifier.
name String The name of the course.
course_link String The course’s attendance link.
class_id String The class’s unique ID the course is based on.
external_id String The user provided external ID of the course.
duration Number The time each enrollment will be available once started.
duration_unit String The duration unit, either ‘days’ or ‘hours’.
activity_hours_limit Number The number of work hours each enrollment will be limited to.
features.video Boolean The flag for including video in the course.
features.slides Boolean The flag for including slides in the course.
features.lab_manual_pause Boolean The flag for hiding workspace pause button.
status String The status of the course (online, offline).
labels List The list of labels applied to the course.

Retrieve all courses

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand"

Response Example

[
  {
    "activity_hours_limit": 10,
    "class_id": "hd3ALTaLAbhfzmBbf",
    "course_link": "https://app.strigo.io/training/ondemand/nE5pDWGzFRRQ8uMrN",
    "duration": 5,
    "duration_unit": "days",
    "external_id": "course1",
    "id": "nE5pDWGzFRRQ8uMrN",
    "name": "Elastic Stack for beginners",
    "status": "online",
    "features": {
      "video": true,
      "slides": true,
      "lab_manual_pause": true
    }
  }
]

Usage

Lists all on demand courses for your organization, regardless of their status.

GET "/ondemand"

Retrieve a single course

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/nE5pDWGzFRRQ8uMrN"

Response Example

{
  "activity_hours_limit": 10,
  "class_id": "hd3ALTaLAbhfzmBbf",
  "course_link": "https://app.strigo.io/training/ondemand/nE5pDWGzFRRQ8uMrN",
  "duration": 5,
  "duration_unit": "days",
  "external_id": "course1",
  "id": "nE5pDWGzFRRQ8uMrN",
  "name": "Elastic Stack for beginners",
  "status": "online",
  "features": {
    "video": true,
    "slides": true,
    "lab_manual_pause": true
  }
}

Usage

Get a single on demand course.

GET "/ondemand/:course_id"

URL Parameters

Attribute Type Required Description
course_id String Yes The course’s unique identifier.

Create a course

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand" \
    -d @- <<EOF
      "name":"My Event",
      "class_id": "hd3ALTaLAbhfzmBbf",
      "duration": 5,
      "duration_unit": "days",
      "activity_hours_limit": 10,
      "status": "online",
      "external_id": "course1",
      "features": {
        "video": true,
        "slides": true,
        "lab_manual_pause": true
      }
    }
EOF

Response Example

{
  "activity_hours_limit": 10,
  "class_id": "hd3ALTaLAbhfzmBbf",
  "course_link": "https://app.strigo.io/training/ondemand/i7gHDXnDzpRFQqFZP",
  "duration": 5,
  "duration_unit": "days",
  "external_id": "course1",
  "id": "i7gHDXnDzpRFQqFZP",
  "name": "ooo",
  "status": "online",
  "features": {
    "video": true,
    "slides": true,
    "lab_manual_pause": true
  }
}

Usage

Create a new on demand course.

POST "/ondemand"

BODY Parameters

Attribute Type Required Description
name String Yes The name of the course.
class_id String Yes The class’s unique ID the course is based on.
external_id String No The user provided external ID of the course.
duration Number Yes The time each enrollment will be available once started.
duration_unit Number Yes The duration unit, either ‘days’ or ‘hours’.
activity_hours_limit Number Yes The number of work hours each enrollment will be limited to.
features.video Boolean Yes The flag for including video in the course.
features.slides Boolean Yes The flag for including slides in the course.
features.lab_manual_pause Boolean Yes The flag for hiding workspace pause button.
status String Yes The status of the course (online, offline).
labels List No The list of labels to apply to the course.

Update a course

Request Example

$ curl -X PATCH \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/i7gHDXnDzpRFQqFZP" \
    -d @- <<EOF
      "name":"My Event",
      "class_id": "hd3ALTaLAbhfzmBbf",
      "duration": 5,
      "duration_unit": "days",
      "activity_hours_limit": 10,
      "status": "online",
      "external_id": "course1",
      "features": {
        "video": true,
        "slides": true,
        "lab_manual_pause": true
      }
    }
EOF

Response Example

{
  "activity_hours_limit": 10,
  "class_id": "hd3ALTaLAbhfzmBbf",
  "course_link": "https://app.strigo.io/training/ondemand/i7gHDXnDzpRFQqFZP",
  "duration": 5,
  "duration_unit": "days",
  "external_id": "course1",
  "id": "i7gHDXnDzpRFQqFZP",
  "name": "ooo",
  "status": "online",
  "features": {
    "video": true,
    "slides": true,
    "lab_manual_pause": true
  }
}

Usage

Update an on demand course.

PATCH "/ondemand/:ondemand_id"

BODY Parameters

Attribute Type Required Description
name String No The name of the course.
class_id String No The class’s unique ID the course is based on.
external_id String No The user provided external ID of the course.
duration Number No The time each enrollment will be available once started.
duration_unit Number No The duration unit, either ‘days’ or ‘hours’.
activity_hours_limit Number No The number of work hours each enrollment will be limited to.
features.video Boolean No The flag for including video in the course.
features.slides Boolean No The flag for including slides in the course.
features.lab_manual_pause Boolean No The flag for hiding workspace pause button.
status String No The status of the course (online, offline).
labels List No The list of labels to apply to the course.

Delete a course

Request Example

$ curl -X DELETE \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/i7gHDXnDzpRFQqFZP"

Response Example

204 No Content

Usage

Delete a single course.

DELETE "/ondemand/:course_id"

URL Parameters

Attribute Type Required Description
course_id String Yes The course’s unique identifier.

On Demand Course Enrollments

Enrollments represent single, learner-specific access definitions to on demand courses.

The Enrollment Resource

Attributes:

Attribute Type Description
id String The enrollments’s unique identifier.
course_id String The on-demand course’s unique ID the enrollment belongs to.
email String The email of the learner.
status String The current status of the enrollment (enrolled, started, expired, …)
enrolled_at Datetime The time in which the learner was enrolled.
started_at Datetime The time in which the learner started the course.
expired_at Datetime The time in which the enrollment expired.
finished_at Datetime The time in which the enrollment was finished.
inactivated_at Datetime The time in which the enrollment became inactive.
stopped_at Datetime The time in which the enrollment was stopped.
paused_at Datetime The time in which the enrollment was paused.
end_date Datetime The designated time for the enrollment to end.
first_activity Datetime The time in which the learner was first active in the course.
exercises List The exercises for this enrollment (see exercises).
expiration_date Datetime A fixed deadline. Regardless of when a student starts, their access to the course will end on this specific date (ISO8601).
timezone String The timezone in which the expiration date is set to.See timezone list, Default is Etc/UTC
active_time_left Number The remaining activity time left for the enrollment (in minutes)
enrollment_time_left Number The remaining time left until the enrollment end date (in minutes)

Retrieve all enrollments

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/nE5pDWGzFRRQ8uMrN/enrollments"

Response Example

[
  {
    "course_id": "NFdFJBSwwA8BrSpxk",
    "email": "me1@strigo.io",
    "enrolled_at": "2018-10-16T11:40:11.239Z",
    "id": "xK8cPmPYEuXwjxbu3",
    "started_at": "2018-10-16T11:40:27.929Z",
    "end_date": "2018-10-26T11:40:27.929Z",
    "status": "expired",
    "exercises": [
      {
        "id": "pB6H3XaTS2Tf53z3p",
        "title": "Introduction",
        "status": "DONE",
        "finished_at": "2018-09-20T10:39:35.425Z"
      },
      {
        "id": "BSY4hBSTGYfpXzN5G",
        "title": "Databases Overview",
        "status": "OPEN"
      }
    ],
    "active_time_left": 627,
    "enrollment_time_left": 155705
  },
  {
    "course_id": "NFdFJBSwwA8BrSpxk",
    "email": "me2@strigo.io",
    "enrolled_at": "2018-10-18T14:09:38.832Z",
    "id": "9hQ5zitwbZh4zrga8",
    "status": "enrolled"
  }
]

Request Example with Pagination and Filtering

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/NF3adeSwwA8BrSpxk/enrollments?page=1&limit=10&email=me1@strigo.io&status=enrolled,expired&include_exercises=true"

Response Example with Pagination Metadata

{
  "data": [
    {
      "course_id": "NF3adeSwwA8BrSpxk",
      "email": "me1@strigo.io",
      "enrolled_at": "2018-10-16T11:40:11.239Z",
      "id": "xK8cPmPYEuXwjxbu3",
      "started_at": "2018-10-16T11:40:27.929Z",
      "end_date": "2018-10-26T11:40:27.929Z",
      "status": "expired",
      "exercises": [
        {
          "id": "pB6H3XaTS2Tfadz3p",
          "title": "Introduction",
          "status": "DONE",
          "finished_at": "2018-09-20T10:39:35.425Z"
        },
        {
          "id": "BSY4hBSTsdfpXzN5G",
          "title": "Databases Overview",
          "status": "OPEN"
        }
      ],
      "active_time_left": 627,
      "enrollment_time_left": 155705
    },
    {
      "course_id": "NFdFJBSwwA8BrSpxk",
      "email": "me2@strigo.io",
      "enrolled_at": "2018-10-18T14:09:38.832Z",
      "id": "9hQ5zitwbZh4zrad8",
      "status": "enrolled"
    }
  ],
  "metadata": {
    "total_items": 2,
    "total_pages": 1,
    "current_page": 1,
    "limit": 10
  }
}

Usage

Lists all enrollments for the course, regardless of their status.

GET "/ondemand/:course_id/enrollments"

URL Parameters

Attribute Type Required Description
course_id String Yes The course’s unique identifier.
email String No Filter enrollments by learner’s email.
page Integer No The page number for pagination.
limit Integer No The number of enrollments per page for pagination.
status String No Filter enrollments by their status. Can be a comma-delimited list of statuses (enrolled, started, inactive, paused, expired, finished).
include_exercises Boolean No Whether to include exercises in the response. Default is true.

Retrieve a single enrollment

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/NFdFJBSwwA8BrSpxk/enrollments/9hQ5zitwbZh4zrga8"

Response Example

{
  "course_id": "NFdFJBSwwA8BrSpxk",
  "email": "me2@strigo.io",
  "enrolled_at": "2018-10-18T14:09:38.832Z",
  "id": "9hQ5zitwbZh4zrga8",
  "status": "enrolled"
}

Usage

Get a single enrollment.

GET "/ondemand/:course_id/enrollment/:enrollment_id"

URL Parameters

Attribute Type Required Description
course_id String Yes The course’s unique identifier.
enrollment_id String Yes The enrollment’s unique identifier.
expiration_date Datetime No A fixed deadline. Regardless of when a student starts, their access to the course will end on this specific date (ISO8601).
timezone String No The timezone in which the expiration date is set to.See timezone list, Default is Etc/UTC

Enroll a learner

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/NFdFJBSwwA8BrSpxk/enrollments" \
    -d @- <<EOF
    {
      "email":"me@strigo.io"
    }
EOF

Response Example

{
  "course_id": "NFdFJBSwwA8BrSpxk",
  "email": "me@strigo.io",
  "enrolled_at": "2018-10-28T08:14:55.743Z",
  "id": "yvTSaihvDRs7Kukeq",
  "status": "enrolled"
}

Request Example with expiration date

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/NFdFJBSwwA8BrSpxk/enrollments" \
    -d @- <<EOF
    {
      "email":"me@strigo.io"
      "expiration_date": "2023-10-14T10:30:00.000Z",
      "timezone": "Europe/Paris"
    }
EOF

Response Example

{
  "course_id": "NFdFJBSwwA8BrSpxk",
  "email": "me@strigo.io",
  "enrolled_at": "2018-10-28T08:14:55.743Z",
  "id": "yvTSaihvDRs7Kukeq",
  "status": "enrolled",
  "expiration_date": "2023-10-14T10:30:00.000Z",
  "timezone": "Europe/Paris"
}

Usage

Enroll a learner to an on-demand course.

POST "/ondemand/:course_id/enrollments"

URL Parameters

Attribute Type Required Description
course_id String Yes The course’s unique identifier.

BODY Parameters

Attribute Type Required Description
email String Yes The email of the learner to invite.
expiration_date Datetime No A fixed deadline. Regardless of when a student starts, their access to the course will end on this specific date (ISO8601).
timezone String No The timezone in which the expiration date is set to.See timezone list, Default is Etc/UTC

Modify an enrollment

Request Example for explicit enrollment expiration

$ curl -X PATCH \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/NFdFJBSwwA8BrSpxk/enrollments/9hQ5zitwbZh4zrga8" \
    -d @- <<EOF
    {
      "status": "expired"
    }
EOF

Response Example

{
  "result": "success",
  "data": {
    "id": "d2iRTXOp8UcxvST",
    "course_id": "XYZ3uityordf66XQ",
    "email": "me18@strigo.io",
    "status": "expired",
    "enrolled_at": "2023-10-08T08:54:31.624Z",
    "expired_at": "2023-10-08T08:54:41.686Z",
    "exercises": []
  }
}

Request Example for modifying expiration date

$ curl -X PATCH \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/NFdFJBSwwA8BrSpxk/enrollments/9hQ5zitwbZh4zrga8" \
    -d @- <<EOF
    {
      "expiration_date": "2024-10-14T10:30:00.000Z",
      "timezone": "America/Los_Angeles"
    }
EOF

Response Example

{
  "course_id": "NFdFJBSwwA8BrSpxk",
  "email": "me@strigo.io",
  "enrolled_at": "2018-10-28T08:14:55.743Z",
  "started_at": "2018-10-16T11:40:27.929Z",
  "end_date": "2018-10-26T11:40:27.929Z",
  "id": "yvTSaihvDRs7Kukeq",
  "status": "enrolled",
  "expiration_date": "2024-10-14T10:30:00.000Z",
  "timezone": "America/Los_Angeles"
}

Usage

Modify an existing enrollment.

PATCH "/ondemand/:course_id/enrollments/:enrollment_id"

URL Parameters

Attribute Type Required Description
course_id String Yes The course’s unique identifier.
enrollment_id String Yes The enrollment’s unique identifier.

BODY Parameters

Attribute Type Required Description
status String No The status to set the enrollment to (expired)
expiration_date Datetime No A fixed deadline. Regardless of when a student starts, their access to the course will end on this specific date (ISO8601).
timezone String No The timezone in which the expiration date is set to.See timezone list, Default is Etc/UTC

Unenroll a learner

Request Example

$ curl -X DELETE \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/NFdFJBSwwA8BrSpxk/enrollments/9hQ5zitwbZh4zrga8"

Response Example

204 No Content

Usage

Unenroll a previously enrolled learner.

DELETE "/ondemand/:course_id/enrollments/:enrollment_id"

Attribute Type Required Description
course_id String Yes The course’s unique identifier.
enrollment_id String Yes The enrollment’s unique identifier (or leaner email. See note above.).

Enroll multiple learners

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/NFdFJBSwwA8BrSpxk/enrollments/batch" \
    -d @- <<EOF
    {
      "emails":["me@strigo.io", "not_me@strigo.io"]
    }
EOF

Successful Response Example

[
  {
    "course_id": "NFdFJBSwwA8BrSpxk",
    "email": "me@strigo.io",
    "enrolled_at": "2018-10-28T08:14:55.743Z",
    "id": "yvTSaihvDRs7Kukeq",
    "status": "enrolled"
  },
  {
    "course_id": "NFdFJBSwwA8BrSpxk",
    "email": "not_me@strigo.io",
    "enrolled_at": "2018-10-28T08:14:55.743Z",
    "id": "avTSaihvDRs7Kukew",
    "status": "enrolled"
  }
]

Request Example with expiration date

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand/NFdFJBSwwA8BrSpxk/enrollments/batch" \
    -d @- <<EOF
    {
      "emails":["me@strigo.io", "not_me@strigo.io"],
       "expiration_date": "2023-10-14T10:30:00.000Z",
       "timezone": "Asia/Jayapura"
    }
EOF

Successful Response Example

[
  {
    "course_id": "NFdFJBSwwA8BrSpxk",
    "email": "me@strigo.io",
    "enrolled_at": "2018-10-28T08:14:55.743Z",
    "id": "yvTSaihvDRs7Kukeq",
    "status": "enrolled",
    "expiration_date": "2023-10-14T10:30:00.000Z",
    "timezone": "Asia/Jayapura"
  },
  {
    "course_id": "NFdFJBSwwA8BrSpxk",
    "email": "not_me@strigo.io",
    "enrolled_at": "2018-10-28T08:14:55.743Z",
    "id": "avTSaihvDRs7Kukew",
    "status": "enrolled",
    "expiration_date": "2023-10-14T10:30:00.000Z",
    "timezone": "Asia/Jayapura"
  }
]

Partial Success Response Example

{
  "result": "failure",
  "error": {
    "message": "Could not enroll users",
    "type": "EnrollmentsCreateFailure",
    "errors": [
      {
        "type": "EnrollmentCreateFailure",
        "value": "me@strigo.io",
        "message": "User with provided email address has been already enrolled for the course"
      }
    ]
  },
  "data": [
    {
      "course_id": "NFdFJBSwwA8BrSpxk",
      "email": "not_me@strigo.io",
      "enrolled_at": "2018-10-28T08:14:55.743Z",
      "id": "avTSaihvDRs7Kukew",
      "status": "enrolled"
    }
  ]
}

Usage

Enroll multiple learners to an on-demand course.

POST "/ondemand/:course_id/enrollments/batch"

URL Parameters

Attribute Type Required Description
course_id String Yes The course’s unique identifier.

BODY Parameters

Attribute Type Required Description
emails List Yes A list of learner emails to invite.
expiration_date Datetime No A fixed deadline. Regardless of when a student starts, their access to the course will end on this specific date (ISO8601).
timezone String No The timezone in which the expiration date is set to.See timezone list, Default is Etc/UTC

On Demand Course Reports

Enrollments report

This data represents all enrollments that related to a specific on demand course.

Attributes:

Attribute Type Description
course_id String A unique identifier of the course.
output String The desired output type (json, csv). Default is json.

URL Parameters

Attribute Type Required Description
course_id String Yes The course’s unique identifier.

Query Parameters

Attribute Type Required Description
output String No The desired output type (json, csv). Default is json.

Usage

Generates a report of all enrollments of the on demand course.

GET "/ondemand-courses/:course_id/reports/enrollments"

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand-courses/${course_id}/reports/enrollments?output=json"

Response Example

{
  "result": "success",
  "data": [
    {
      "course_id": "6363d3d399533fd52834c620",
      "course_name": "My on demand course",
      "enrollment_id": "65ae4e111113937279ef",
      "email": "monica@raviga.com",
      "name": "Monica Hall",
      "workspace_id": "9kxwQn3BvkGsFFT4Y",
      "enrolled_at": "2024-01-22T11:18:07.161Z",
      "started_at": "2024-01-22T12:24:53.411Z",
      "status": "finished",
      "exercises_finished": 0,
      "exercises_count": 2,
      "all_exercises_completed": false
    }
  ]
}

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: text/csv" \
    -H "Content-Type: text/csv" \
    "https://app.strigo.io/api/v1/ondemand-courses/${course_id}/reports/exercises?output=csv"

Response Example

"course_id","course_name","enrollment_id","email","name","workspace_id","enrolled_at","started_at","exercises_finished","exercises_count","all_exercises_completed"
"6363d3d399533fd52834c620","My on demand course","65ae4e111113937279ef","monica@raviga.com","Monica Hall","9kxwQn3BvkGsFFT4Y","2024-01-22T11:18:07.161Z","2024-01-22T12:24:53.411Z","finished",0,2,false

Exercises report

This data represents all workspaces exercise results that related to a specific on demand course.

Attributes:

Attribute Type Description
course_id String A unique identifier of the course.
output String The desired output type (json, csv). Default is json.

URL Parameters

Attribute Type Required Description
course_id String Yes The course’s unique identifier.

Query Parameters

Attribute Type Required Description
output String No The desired output type (json, csv). Default is json.

Usage

Generates a report of all workspaces’ exercise results of the on demand course.

GET "/ondemand-courses/:course_id/reports/exercises"

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand-courses/${course_id}/reports/exercises?output=json"

Response Example

{
  "result": "success",
  "data": [
    {
      "course_id": "eb917a943d6d0365784e8779",
      "course_name": "My course",
      "enrollment_id": "6578571c59421c82c1f5a44f",
      "email": "erlich@strigo.io",
      "name": "Erlich Bachman",
      "workspace_id": "J5SEv6sXeJQcSFwAG",
      "exercises_finished": 2,
      "exercises_count": 2,
      "all_exercises_completed": true,
      "exercise_1_title": "First question",
      "exercise_1_type": "question",
      "exercise_1_result": "success",
      "exercise_1_finished_at": "2023-11-21T09:43:59.285Z",
      "exercise_2_title": "Second exercise",
      "exercise_2_type": "exercise",
      "exercise_2_result": "success",
      "exercise_2_finished_at": "2023-11-21T09:59:59.285Z"
    }
  ]
}

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: text/csv" \
    -H "Content-Type: text/csv" \
    "https://app.strigo.io/api/v1/ondemand-courses/${course_id}/reports/exercises?output=csv"

Response Example

"course_id","course_name","enrollment_id","email","name","workspace_id","exercises_finished","exercises_count","all_exercises_completed","exercise_1_title","exercise_1_type","exercise_1_result","exercise_1_finished_at","exercise_2_title","exercise_2_type","exercise_2_result","exercise_2_finished_at"
"eb917a943d6d0365784e8779","My course","6578571c59421c82c1f5a44f","erlich@strigo.io","Erlich Bachman","J5SEv6sXeJQcSFwAG",2,2,true,"First question","question","success","2023-11-21T09:43:59.285Z","Second exercise","exercise","failure","2023-11-21T09:59:59.285Z"

User activity report

Lists on demand course user activity sessions.

Attributes:

Attribute Type Required Description
course_id String yes A unique identifier of the course.
from Date no Start date to filter activity by.
to Date no End date to filter activity by.

from - defaults to one month ago.

to - defaults to current request execution time.

URL Parameters

Attribute Type Required Description
course_id String Yes The course’s unique identifier.

Body Parameters

Attribute Type Required Description
from Date no Start date to filter activity by.
to Date no End date to filter activity by.

Usage

Generate a report of attendees’ user activity of the on demand course.

POST "/ondemand-courses/:course_id/reports/user-activity"

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ondemand-courses/${course_id}/reports/user-activity" \
    -d @- <<EOF
    {
      "from": "2018-10-28T08:14:55.743Z",
      "to": "2022-11-07T08:14:55.743Z"
    }
EOF

Response Example

{
  "result": "success",
  "data": [
    {
      "courseId": "6363d3d399533fd52834c620",
      "workspaceId": "gF29ttALksgieTfYh",
      "enrollmentId": "63677b1f41cb30b50754d28e",
      "name": "Monica Hall",
      "email": "monica@raviga.com",
      "status": "started",
      "enrolledAt": "2022-11-06T09:15:11.572Z",
      "startedAt": "2022-11-06T09:15:32.425Z",
      "sessions": [
        {
          "sessionStartTime": "2022-11-06T09:15:32.468Z",
          "sessionEndTime": "2022-11-06T09:28:52.239Z",
          "sessionDurationInSeconds": 799.771
        }
      ],
      "totalSessionTime": 799.771,
      "from": "2018-10-28T08:14:55.743Z",
      "to": "2022-11-07T08:14:55.743Z"
    }
  ]
}

Members

The Member Resource

Attributes:

Attribute Type Description
id String The member’s unique identifier.
email String The member’s email.
level String The member’s role.

Retrieve all members

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/members"

Response Example

[
  {
    "email": "me@strigo.io",
    "id": "rMWNrMT2PCySh2PGo",
    "role": "owner"
  },
  {
    "email": "me2@strigo.io",
    "id": "AsEM3RtnbuudJBZD5",
    "role": "member"
  }
]

Usage

Lists all members for your organization.

GET "/members"

Organization Partners

The Partner Resource

Attributes:

Attribute Type Description
id String The partner’s unique identifier.
name String The name of the partner as set by the parent organization.

Retrieve all partners

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/partners"

Response Example

{
  "data": [
    {
      "id": "yCoaiix2pRjxMjCn7",
      "name": "w00t"
    },
    {
      "id": "x6GHbXKBTPeAHpjmS",
      "name": "w00t1"
    },
    {
      "id": "hMJrmcqPDDjKwLN7Z",
      "name": "woot13"
    },
    {
      "id": "cYCk2Yq45qMQXGZkh",
      "name": "w00t3"
    },
    {
      "id": "ozSjhvAr8hMaQCLND",
      "name": "newa"
    },
    {
      "id": "mYsEBS6PeBeMpFCfQ",
      "name": "BLUASD"
    },
    {
      "id": "ggKqkNgY4KzQQoFsM",
      "name": "w00tasd"
    },
    {
      "id": "ntvXb3L2qdPbayRKZ",
      "name": "nur"
    }
  ],
  "result": "success"
}

Usage

Lists all partners for your organization.

GET "/partners"

Retrieve a single partner

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/ntvXb3L2qdPbayRKZ/ntvXb3L2qdPbayRKZ"

Response Example

{
  "data": {
    "id": "ntvXb3L2qdPbayRKZ",
    "name": "nur"
  },
  "result": "success"
}

Usage

Get a single partner.

GET "/partners/:partner_id"

URL Parameters

Attribute Type Required Description
partner_id String Yes The partner’s unique identifier.

Create a partner

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/partners" \
    -d @- <<EOF
    {
      "name":"My New Partner"
    }
EOF

Response Example

{
  "data": {
    "id": "Z3XKk7Swzr3MuaTGJ",
    "name": "My New Parnter"
  },
  "result": "success"
}

Usage

Create a new partner.

POST "/partners"

BODY Parameters

Attribute Type Required Description
name String Yes The name of the partner.

Modify a partner

Request Example

$ curl -X PATCH \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/partner/Z3XKk7Swzr3MuaTGJ" \
    -d @- <<EOF
    {
      "name":"New name for partner"
    }
EOF

Response Example

{
  "data": {
    "id": "Z3XKk7Swzr3MuaTGJ",
    "name": "New name for partner"
  },
  "result": "success"
}

Usage

Modify a partner.

PATCH "/partners/:partner_id"

URL Parameters

Attribute Type Required Description
partner_id String Yes The partner’s unique identifier.

BODY Parameters

Attribute Type Required Description
name String Yes The partner’s new name.

Retrieve partner members

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/partners/Z3XKk7Swzr3MuaTGJ/members"

Response Example

{
  "data": [
    {
      "email": "niro@strigo.io",
      "id": "MzkRF9fPnq34SatJB",
      "partner_id": "yCoaiix2pRjxMjCn7",
      "role": "partner"
    },
    {
      "email": "nira@strigo.io",
      "id": "BSwKLejmQtSsEyzE9",
      "partner_id": "yCoaiix2pRjxMjCn7",
      "role": "partner"
    }
  ],
  "result": "success"
}

Usage

Retrieve parter members.

GET "/partners/:partner_id/members"

URL Parameters

Attribute Type Required Description
partner_id String Yes The partner’s unique identifier.

Invite a partner member

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/partners/Z3XKk7Swzr3MuaTGJ/members" \
    -d @- <<EOF
    {
      "email":"trainer@partner-company.com"
    }
EOF

Response Example

{
  "data": {
    "created_at": "2019-01-07T15:42:21.932Z",
    "email": "trainer@partner-company.com",
    "id": "8unc2Gt4sGcqJgBqX",
    "link": "https://app.strigo.io/team/invite/LKOONmxKR2XcsbgKaz79xVVkAaPQyQ8PrX_1fVv3qFp",
    "partner_id": "Z3XKk7Swzr3MuaTGJ",
    "status": "pending"
  },
  "result": "success"
}

Usage

Invite someone to join as a member in your defined partner entity.

POST "/partners/:partner_id/members"

URL Parameters

Attribute Type Required Description
partner_id String Yes The partner’s unique identifier.

BODY Parameters

Attribute Type Required Description
email String Yes Email of partner trainer to invite.

Subscriptions

The Subscription Resource

Attributes:

Attribute Type Description
id String The event’s unique identifier.
target String The URL to send the payload to.
event String The type of event to send notifications to.
status String The status of the subscription (Can be either active or inactive).
createdAt Datetime The date when the subscription was created (ISO8601).
updatedAt Datetime The date when the subscription was updated (ISO8601).

Available event types:

See our Subscriptions API help article for more info.

Retrieve all subscriptions

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/subscriptions"

Response Example

{
  "result": "success",
  "data": [
    {
      "id": "dZXxzYYhgEGayy7Mc",
      "event": "enrollment.create",
      "target": "https://example.com",
      "status": "active",
      "createdAt": "2021-10-26T06:32:18.655Z",
      "updatedAt": "2021-10-26T06:32:18.655Z"
    },
    {
      "id": "WtYjHKG3qPfhbb3sx",
      "event": "event.create",
      "target": "https://example.com",
      "status": "active",
      "createdAt": "2021-10-26T17:59:08.109Z",
      "updatedAt": "2021-10-26T17:59:08.109Z"
    }
  ]
}

Usage

Lists all subscriptions for your organization, regardless of their status.

GET "/subscriptions"

Retrieve a single subscription

Request Example

$ curl -X GET \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/subscriptions/dZXxzYYhgEGayy7Mc"

Response Example

{
  "result": "success",
  "data": {
    "id": "dZXxzYYhgEGayy7Mc",
    "event": "enrollment.create",
    "target": "https://example.com",
    "status": "active",
    "createdAt": "2021-10-26T06:32:18.655Z",
    "updatedAt": "2021-10-26T06:32:18.655Z"
  }
}

Usage

Get a single subscription.

GET "/subscriptions/:subscription_id"

URL Parameters

Attribute Type Required Description
subscription_id String Yes The subscription’s unique identifier.

Create an subscription

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/subscription" \
    -d @- <<EOF
    {
      "target":"https://example.com",
      "event": "partner.create"
    }
EOF

Response Example

{
  "result": "success",
  "data": {
    "id": "x6L3vCNXcvkJXYdd3",
    "event": "partner.create",
    "target": "https://example.com",
    "status": "active",
    "createdAt": "2021-10-28T09:57:14.354Z",
    "updatedAt": "2021-10-28T09:57:14.354Z"
  }
}

Usage

Create a new subscription.

POST "/subscriptions"

BODY Parameters

Attribute Type Required Description
target String Yes The target to send the notification to.
event String Yes The type of the event to subscribe to.
status String No The status of the subscription (Can be either active or inactive).

Modify a subscription

Request Example

$ curl -X PATCH \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/subscription" \
    -d @- <<EOF
    {
      "target":"https://example.com",
      "event": "partner.create",
      "status": "inactive"
    }
EOF

Response Example

{
  "result": "success",
  "data": {
    "id": "x6L3vCNXcvkJXYdd3",
    "event": "partner.create",
    "target": "https://example.com",
    "status": "inactive",
    "createdAt": "2021-10-28T09:57:14.354Z",
    "updatedAt": "2021-10-28T09:57:14.354Z"
  }
}

Usage

Modify an existing subscription.

PATCH "/subscriptions/:subscription_id"

URL Parameters

Attribute Type Required Description
subscription_id String Yes The subscription’s unique identifier.

BODY Parameters

Attribute Type Required Description
target String Yes The target to send the notification to.
event String Yes The type of the event to subscribe to.
status String No The status of the subscription (Can be either active or inactive).

Delete a subscription

Request Example

$ curl -X DELETE \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/subscriptions/x6L3vCNXcvkJXYdd3"

Response Example

204 No Content

Usage

Delete a single subscription.

DELETE "/subscription/:subscription_id"

URL Parameters

Attribute Type Required Description
subscription_id String Yes The subscription’s unique identifier.

SDK User token

Before calling the setup method in the SDK, you need to generate a user token to identify the SDK user

The User Token Resource

Attributes:

Attribute Type Description
email String The user’s unique email.
name String The name of the user.
externalUserId String The user’s identifier in your system.
expiration Number Expiration date for the token - can be up to 2 months after the token creation (UNIX time).

Create a user token

Create a new user token.

POST "/academy/users/token"

BODY Parameters

Attribute Type Required Default Description
email String Yes The user’s unique email.
name String No "" The name of the user.
externalUserId String No "" The user’s identifier in your system.
expiration Number No 2 months Expiration date for the token - can be up to 2 months after the token creation (UNIX time).
groups Array No [] The groups this user is assigned to. Users with groups will be able to view only courses that are tagged with the groups that they are assigned to.

Request Example

$ curl -X POST \
    -H "Authorization: Bearer ${ORG_ID}:${API_KEY}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    "https://app.strigo.io/api/v1/academy/users/token" \
    -d @- <<EOF
    {
      email: "user1@strigo.io",
      name: "user1",
      externalUserId: "external-user-id",
      expiration: Date.now() + 2592000000,
      groups: ["group1", "advancedUsers"]
    }
EOF

Response Example

{
  "result": "success",
  "data": {
    "user_id": "X7TnEwMSg66pBi8GZ",
    "expiration": 1648100582468,
    "token": "HfT31jk4WLIJ4f4ebR2MGzBIK0jp1M3tlbdvP20TBGd"
  }
}