Skip to content
Skip to Content
Coder Docs

Get workspace agent port shares

GET
/api/v2/workspaces/{workspace}/port-share

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

workspace*string

Workspace ID

Formatuuid

Response Body

OK

application/json
  1. response
shares?array<>

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X GET \	"$CODER_URL/api/v2/workspaces/{workspace}/port-share" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response200
{  "shares": [    {      "agent_name": "string",      "port": 0,      "protocol": "http",      "share_level": "owner",      "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9"    }  ]}