Skip to content

Workspace


Endpoints

GET       /workspaces
GET       /workspaces/:id
POST      /workspaces
PUT       /workspaces/:id
DELETE    /workspaces/:id

A workspace is a group of entities inside the Everysk platform. Portfolios, datastores, files, reports, report templates and workflows belong to a workspace. Custom indexes, private securities and user apps do not belong to a workspace.

The workspace name is its identifier. In /workspaces/:id, :id is the workspace name.

The workspace object

What a workspace object looks like?

{
  "updated": 1625775417.0,
  "description": "This is my first workspace",
  "name": "sandbox",
  "group": null,
  "version": "v1",
  "created": 1625775417.0
}
Property Description
name string The unique identifier of the workspace. 1 to 50 characters: letters, digits and _ only (^[a-zA-Z0-9_]*$).
created timestamp Time at which the workspace was created. Measured in seconds since the Unix epoch.
updated timestamp Time at which the workspace was updated. Measured in seconds since the Unix epoch.
description string A text attached to the workspace. Up to 100 characters. "" when not set.
group string A label that groups workspaces. Up to 50 characters. null when not set.
version string Indicates the workspace's current version.

Creating a workspace

To create a new workspace, run the following:

curl https://api.everysk.com/v2/workspaces \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -d '{
        "name": "sandbox",
        "description": "This is my first workspace"
      }' \
  -X POST

The above call returns the following JSON object:

{
  "workspace": {
    "updated": 1625775417.0,
    "description": "This is my first workspace",
    "name": "sandbox",
    "group": null,
    "version": "v1",
    "created": 1625775417.0
  }
}

Creates and then returns the new workspace.

HTTP Request

POST /workspaces

HTTP Parameters

Parameter Description
name string REQUIRED The unique identifier of the workspace. 1 to 50 characters: letters, digits and _ only. You cannot use preview or temp. A name that already exists returns 400.
description string optional, default is "" Provides detailed information about your workspace. Up to 100 characters.
group string optional, default is null A label that groups workspaces. Up to 50 characters.

List all workspaces

To list all workspaces, run the following:

curl https://api.everysk.com/v2/workspaces \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -G

The above call returns the following JSON object:

{
  "workspaces": [
    {
      "updated": 1625775417.0,
      "description": "This is my first workspace",
      "name": "sandbox",
      "group": null,
      "version": "v1",
      "created": 1625775417.0
    }
  ],
  "next_page_token": null
}

Returns a list of your workspaces. The most recently updated workspace comes first. With query, the workspaces come in alphabetical order.

HTTP Request

GET /workspaces

HTTP Parameters

Parameter Description
query string optional, default is null Returns the workspaces whose name starts with this text. The search ignores case.
page_size integer optional, default is 10 Set the number of objects that will be listed per page.
page_token string optional, default is null The next_page_token from the previous response. See the pagination guide.

Retrieve a workspace

To retrieve a workspace, run the following:

curl https://api.everysk.com/v2/workspaces/sandbox \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -G

The above call returns the following JSON object:

{
  "workspace": {
    "updated": 1625775417.0,
    "description": "This is my first workspace",
    "name": "sandbox",
    "group": null,
    "version": "v1",
    "created": 1625775417.0
  }
}

Retrieves the details of an existing workspace. Put the workspace name in the path. A workspace that does not exist returns 404.

HTTP Request

GET /workspaces/:id

HTTP Parameters

Parameter Description
id string REQUIRED The workspace name, in the path.

Update a workspace

To update a workspace, run the following:

curl https://api.everysk.com/v2/workspaces/sandbox \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -d '{
        "name": "sandbox",
        "description": "This is my new workspace description"
      }' \
  -X PUT

The above call returns the following JSON object:

{
  "workspace": {
    "updated": 1625779017.0,
    "description": "This is my new workspace description",
    "name": "sandbox",
    "group": null,
    "version": "v1",
    "created": 1625775417.0
  }
}

Updates a workspace and then returns the updated workspace. The API uses the name in the body to find the workspace, not the name in the path. You cannot change the name of a workspace. Only the fields you send change.

HTTP Request

PUT /workspaces/:id

HTTP Parameters

Parameter Description
name string REQUIRED The name of the workspace to update. The workspace name can't be changed. A workspace that does not exist returns 404.
description string optional Provides detailed information about your workspace. Up to 100 characters. Leave it out to keep the current value.
group string optional A label that groups workspaces. Up to 50 characters. Leave it out to keep the current value.

Delete a workspace

To delete a workspace, run the following:

curl https://api.everysk.com/v2/workspaces/sandbox \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -X DELETE

The above call returns the following JSON object:

{
  "workspace": {
    "deleted": true,
    "name": "sandbox"
  }
}

Permanently deletes a workspace. It cannot be undone. Put the workspace name in the path. Returns an object with the workspace name and an attribute that tells whether the workspace was deleted. You cannot delete the main workspace.

Warning: Deleting a workspace does not delete its objects!

HTTP Request

DELETE /workspaces/:id

HTTP Parameters

Parameter Description
id string REQUIRED The workspace name, in the path.