question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Design Management API surface

See original GitHub issue

The Management API should allow for control plane and eventually data plane operations to provision resources , list metadata about resources, update the state of resources etc.

The Management API will evolve as new concepts and features are introduced but we anticipate the core operations to manage workspaces and services to be part of the initial API version.

We envision a RESTful HTTP API along the lines of:

  • GET /workspaces - Get workspaces
  • POST /workspaces - Create workspace
  • GET /workspaces/{workspace_id} - Get specific workspace
  • DELETE /workspaces/{workspace_id} - Delete specific workspace
  • GET /sharedservices - Get core (shared) services
  • GET /sharedservices/{shared_service_id} - Get core (shared) service
  • GET /workspaces/{workspace_id}/services - Get workspace services
  • POST /workspaces/{workspace_id}/services - Create workspace service
  • DELETE /workspaces/{workspace_id}/services - Delete workspace service
  • GET /workspaces/{workspace_id}/services/{workspace_service_id}/resources - Create workspace service resources
  • POST /workspaces/{workspace_id}/services/{workspace_service_id}/resources - Create a workspace service resource
  • GET /workspaces/{workspace_id}/services/{workspace_service_id}/resources/{workspace_service_resource_id} - Get workspace service resource
  • DELETE /workspaces/{workspace_id}/services/{workspace_service_id}/resources/{workspace_service_resource_id} - Get workspace service resource

Examples

These requests are very simplistic just to illustrate the conceptual journey of creating a workspace containing a Data Science Virtual Machine. Actual spec to be developed as part of closing this issue.

Create workspace

POST /workspaces
Content-Type: application/json

{
    "name": "Workspace One",
    "owner": "chris"
}
# this will probably have to be async with a 202 Accepted in reality
201 Created
Location: /workspaces/1

{
    "id": 1,
    "name": "Workspace One",
    "owner": "chris"
}

Create workspace service - Virtual Desktops with shared Firewall

POST /workspaces/1/services
Content-Type: application/json

{
    "service_type": "virtual_desktops",
    "firewall": "shared"
}
201 Created
Location: /workspaces/1/services/2

{
    "id": 2,
    "service_type": "virtual_desktops",
    "firewall": "shared"
}

Create workspace service resource - Linux DS VM

POST /workspaces/1/services/2/resources
Content-Type: application/json

{
    "name": "DS VM One",
    "size": "Standard_DS3_v2",
    "image": {
        "publisher": "microsoft-dsvm",
        "offer": "ubuntu-1804",
        "version": "latest"
}
201 Created
Location: /workspaces/1/services/2/resources/3

{
    "id": 3,
    "name": "DS VM One",
    "size": "Standard_DS3_v2",
    "image": {
        "publisher": "microsoft-dsvm",
        "offer": "ubuntu-1804",
        "version": "latest"
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jjcollingecommented, Mar 11, 2021

A service can be anything defined by a terraform configuration. The workspace provides a virtual network for which the service can be deployed. We only have a definition for a DSVM service in our implementation which means we haven’t got a concrete design for ingress etc.

1reaction
christoferlofcommented, Mar 11, 2021

Thanks @jjcollinge . I fixed the formatting of the table, why the post says it was edited by me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

API design - Azure Architecture Center | Microsoft Learn
Learn about good API design in a microservices architecture. APIs should be efficient and have well-defined semantics and versioning schemes.
Read more >
Guide to building an enterprise API strategy | TechTarget
A formal, detailed API management strategy defines desired API features and roadmaps, and codifies and outlines key elements of API design, ...
Read more >
Layered API design in Azure API Management
They define three layers of APIs: Experience APIs: purpose-built APIs for specific apps, also known as BFFs (Backend for Frontend) Process APIs: ...
Read more >
General Guidelines: API Design | Azure SDKs
The API surface of your client library must have the most thought as it is the primary interaction that the consumer has with...
Read more >
Techniques For Designing Your API and Microservices - Tyk.io
One way of validating your API and microservice designs is to use some design techniques to surface issues before we commit to our...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found