Authenticate agent on Google Cloud instance
POST
CoderSessionTokenheader
Coder-Session-Token<token>Instance identity token. The optional agent_name field disambiguates when multiple agents share the same instance ID.
application/json- body
agent_name?stringAgentName optionally selects a specific agent when multiple agents share the same instance identity. An empty string is treated as unspecified.
json_web_token*stringOK
application/json- response
session_token?stringThe samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X POST \ "$CODER_URL/api/v2/workspaceagents/google-instance-identity" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "json_web_token": "string"}'Example Response200
{ "session_token": "string"}