Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebooks 2.0 // Backend // Workspace Details API // Fetch YAML #200

Open
mohamedch7 opened this issue Feb 8, 2025 · 3 comments
Open

Notebooks 2.0 // Backend // Workspace Details API // Fetch YAML #200

mohamedch7 opened this issue Feb 8, 2025 · 3 comments
Assignees

Comments

@mohamedch7
Copy link

The workspace details flyover includes a YAML viewer for the Workspace. This issue involves implementing the backend functionality to fetch the Workspace YAML.

Details

  • A new HTTP path needs to be added to fetch the Workspace YAML.
  • Proposed path:
    GET /api/v1/workspaces/{namespace}/{name}/details/yaml
  • Note: There will likely be other /details/ paths and possibly /actions/ paths in the future at the same depth.

Possible JSON Payloads

Two options are being considered for the response format:

Option 1:
A normal envelope (JSON with a "data" field at the root), containing a YAML string of the Workspace YAML as the data payload.
Example:

{
  "data": "apiVersion: v1\nkind: Workspace\nmetadata:\n  name: example"
}

Option 2: JSON with a Base64-encoded YAML string under yaml_b64

{
  "yaml_b64": "encoded_yaml_string_here"
}
  • This avoids escape character issues.
@ederign
Copy link
Member

ederign commented Feb 10, 2025

/assign @mohamedch7

@ederign
Copy link
Member

ederign commented Feb 10, 2025

Option 3:
GET /api/v1/workspaces/{namespace}/{name}/details/yaml
Content-Type: text/yaml

@ederign
Copy link
Member

ederign commented Feb 10, 2025

I would go for option 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Triage
Development

No branches or pull requests

2 participants