Skip to content

Add a new POST edit Workload endpoint and update the GET #1392

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

lujunsan
Copy link
Contributor

@lujunsan lujunsan commented Aug 13, 2025

Adds a new Update Workload (PUT) endpoint and updates the GET endpoint to return the RunConfig information.

Example body for the POST /api/v1beta/workloads/fetch-isolated/edit :

    "image": "ghcr.io/stackloklabs/gofetch/server:latest",
    "host": "127.0.0.1",
    "cmd_arguments": [
      "--port",
      "8080"
    ],
    "target_port": 33333,
    "env_vars": [
      "FASTMCP_PORT=52814",
      "MCP_PORT=52814",
      "MCP_TRANSPORT=streamable-http"
    ],
    "secrets": [],
    "volumes": [],
    "transport": "streamable-http",
    "authz_config": "",
    "oidc": {
      "issuer": "",
      "audience": "",
      "jwks_url": "",
      "introspection_url": "",
      "client_id": "",
      "client_secret": ""
    },
    "permission_profile": {
      "network": {
        "outbound": {
          "allow_host": [
            "google.es"
          ],
          "allow_port": [
            443,
            4431
          ]
        }
      }
    },
    "proxy_mode": "sse",
    "network_isolation": true,
    "tools": null
  }

Example response for the PUT (same as POST):

{
    "name": "fetch-isolated",
    "port": 33404
}

Example response for the updated GET:

{
        "name": "fetch-isolated",
        "image": "ghcr.io/stackloklabs/gofetch/server:latest",
        "host": "127.0.0.1",
        "cmd_arguments": [
            "--port",
            "8080"
        ],
        "target_port": 33333,
        "env_vars": [
            "FASTMCP_PORT=33333",
            "MCP_PORT=33333",
            "MCP_TRANSPORT=streamable-http"
        ],
        "secrets": [],
        "volumes": [],
        "transport": "streamable-http",
        "authz_config": "",
        "oidc": {
            "issuer": "",
            "audience": "",
            "jwks_url": "",
            "introspection_url": "",
            "client_id": "",
            "client_secret": ""
        },
        "permission_profile": {
            "network": {
                "outbound": {
                    "allow_host": [
                        "google.es"
                    ],
                    "allow_port": [
                        443,
                        4431
                    ]
                }
            }
        },
        "proxy_mode": "sse",
        "network_isolation": true,
        "tools": null
}

@lujunsan lujunsan requested review from dmjb and Copilot August 13, 2025 11:32
@lujunsan lujunsan marked this pull request as ready for review August 13, 2025 11:36
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@lujunsan lujunsan changed the title Add a new PUT Workload endpoint and update the GET Add a new POST edit Workload endpoint and update the GET Aug 13, 2025
dmjb
dmjb previously approved these changes Aug 13, 2025
@lujunsan lujunsan force-pushed the new-update-workload-api-endpoint branch from d87019e to 66914f7 Compare August 18, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants