Get a user secret by name
GET
CoderSessionTokenheader
Coder-Session-Token<token>user*stringUser ID, username, or me
name*stringSecret name
OK
application/json- response
created_at?stringFormat
date-timedescription?stringenabled?booleanEnabled controls whether the secret is injected into workspaces. Disabled secrets remain visible and editable, but are not added to the agent manifest, so they are not exposed as environment variables or written to secret files.
env_name?stringfile_path?stringid?stringFormat
uuidname?stringupdated_at?stringFormat
date-timeThe samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X GET \ "$CODER_URL/api/v2/users/{user}/secrets/{name}" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN"Example Response200
{ "created_at": "2019-08-24T14:15:22Z", "description": "string", "enabled": true, "env_name": "string", "file_path": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "updated_at": "2019-08-24T14:15:22Z"}