# Get Workspace Secret

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Get Workspace Secret"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api/v2/workspaces/{workspace_id}/secrets/{secret_id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Returns the secret with the given id.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"description":"Unique identifier of the secret.","in":"path","name":"secret_id","required":true,"schema":{"description":"Unique identifier of the secret.","format":"uuid","title":"Secret ID","type":"string"}},{"description":"Type the id of the workspace.","in":"path","name":"workspace_id","required":true,"schema":{"description":"Type the id of the workspace.","format":"uuid","title":"Workspace Id","type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"The date and time when the secret was created.","title":"Created At"},"created_by":{"anyOf":[{"properties":{"family_name":{"description":"Family name of a user.","title":"Family name","type":"string"},"given_name":{"description":"Given name of a user.","title":"Given name","type":"string"},"user_id":{"description":"Unique identifier of a user.","format":"uuid","title":"User ID","type":"string"}},"required":["given_name","family_name","user_id"],"title":"Oauth User","type":"object"},{"type":"null"}],"description":"The user who created the secret.","title":"Created By"},"last_edited_by":{"anyOf":[{"properties":{"family_name":{"description":"Family name of a user.","title":"Family name","type":"string"},"given_name":{"description":"Given name of a user.","title":"Given name","type":"string"},"user_id":{"description":"Unique identifier of a user.","format":"uuid","title":"User ID","type":"string"}},"required":["given_name","family_name","user_id"],"title":"Oauth User","type":"object"},{"type":"null"}],"description":"The user who last edited the secret.","title":"Last Edited By"},"masked_secret":{"description":"Masked secret value. The actual secret is not returned for security reasons.","title":"Masked Secret","type":"string"},"name":{"description":"The name of the secret.","title":"Secret Name","type":"string"},"secret_id":{"description":"Unique identifier of the secret.","format":"uuid","title":"Secret ID","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"The date and time when the secret was last updated.","title":"Updated At"},"workspace":{"anyOf":[{"properties":{"name":{"description":"Name of the workspace.","title":"Workspace Name","type":"string"},"workspace_id":{"description":"Unique identifier of the workspace","format":"uuid","title":"Workspace ID","type":"string"}},"required":["workspace_id","name"],"title":"Workspace","type":"object"},{"type":"null"}],"description":"The workspace the secret belongs to. If not provided, the secret is global to the organization.","title":"Workspace"}},"required":["secret_id","name","masked_secret"],"title":"Get Secret","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"}}}
>
  
</StatusCodes>
