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.

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.

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.

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

{
  "result": "success"
}

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.

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

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

Usage

Create a new lab resource.

POST "/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).
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"
    }
  ]
}

Usage

Modify a lab resource.

POST "/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).
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

{
  "result": "success"
}

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

{
  "result": "success"
}

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
    [
      {
        "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

{
  "result": "success"
}

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

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",
        "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",
    "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",
    "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 student emails (adding trainees implicitly creates a private event).

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",
    "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 student emails (adding trainees implicitly means a private event).

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

{
  "result": "success"
}

Usage

Delete a single event.

DELETE "/events/:event_id"

URL Parameters

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

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.

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

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 students in an event.

A workspace contains some information about student 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, student).
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.
days_limit Number The number of the days each enrollment will be limited to.
activity_hours_limit Number The number of work hours each enrollment will be limited to.
public_access_token String The course’s public access token.
status String The status of the course (online, offline).

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",
    "days_limit": 5,
    "external_id": "course1",
    "id": "nE5pDWGzFRRQ8uMrN",
    "name": "Elastic Stack for beginners",
    "public_access_token": "DQGT",
    "status": "online"
  }
]

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",
  "days_limit": 5,
  "external_id": "course1",
  "id": "nE5pDWGzFRRQ8uMrN",
  "name": "Elastic Stack for beginners",
  "public_access_token": "DQGT",
  "status": "online"
}

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",
      "days_limit": 5,
      "activity_hours_limit": 10,
      "status": "online",
      "external_id": "course1"
    }
EOF

Response Example

{
  "activity_hours_limit": 10,
  "class_id": "hd3ALTaLAbhfzmBbf",
  "course_link": "https://app.strigo.io/training/ondemand/i7gHDXnDzpRFQqFZP",
  "days_limit": 5,
  "external_id": "course1",
  "id": "i7gHDXnDzpRFQqFZP",
  "name": "ooo",
  "public_access_token": "MEWD",
  "status": "online"
}

Usage

Create a new event.

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.
days_limit Number Yes The number of the days each enrollment will be limited to.
activity_hours_limit Number Yes The number of work hours each enrollment will be limited to.
status String Yes The status of the course (online, offline).

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

{
  "result": "success"
}

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, student-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 student.
status String The current status of the enrollment (enrolled, started, expired, …)
enrolled_at Datetime The time in which the student was enrolled.
started_at Datetime The time in which the student 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 student was first active in the course.
exercises List The exercises for this enrollment (see exercises).

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"
        }
      ]
  },
  {
      "course_id": "NFdFJBSwwA8BrSpxk",
      "email": "me2@strigo.io",
      "enrolled_at": "2018-10-18T14:09:38.832Z",
      "id": "9hQ5zitwbZh4zrga8",
      "status": "enrolled"
  }
]

Usage

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

GET "/ondemand/:course_id/enrollments"

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.

Enroll a student

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

Usage

Enroll a student 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 student to invite.

Modify an enrollment

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/NFdFJBSwwA8BrSpxk/enrollments/9hQ5zitwbZh4zrga8" \
    -d @- <<EOF
    {
      "status": "expired"
    }
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": "expired"
}

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 Yes The status to set the enrollment to (expired)

Unenroll a student

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

{
  "result": "success"
}

Usage

Unenroll a previously enrolled student.

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.

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.