Provides API endpoints related to opencode http api
Summary
Types
@type v2_agent_list_200_json_resp() :: %{ data: [OpenCode.Generated.AgentV2Info.t()], location: OpenCode.Generated.LocationInfo.t() }
@type v2_health_get_200_json_resp() :: %{healthy: true}
Functions
@spec v2_agent_list(opts :: keyword()) :: {:ok, v2_agent_list_200_json_resp()} | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
List agents
Retrieve currently registered agents.
Options
location
@spec v2_credential_remove(credentialID :: String.t(), opts :: keyword()) :: :ok | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
Remove credential
Remove a stored integration credential.
Options
location
@spec v2_credential_update( credentialID :: String.t(), body :: map(), opts :: keyword() ) :: :ok | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
Update credential
Update a stored credential label.
Options
location
Request Body
Content Types: application/json
@spec v2_health_get(opts :: keyword()) :: {:ok, v2_health_get_200_json_resp()} | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
Check server health
Check whether the API server is ready to accept requests.
@spec v2_location_get(opts :: keyword()) :: {:ok, OpenCode.Generated.LocationInfo.t()} | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
Get location
Resolve the requested location or the server default location.
Options
location