OpenCode.Generated.OpencodeHttpApi (opencode_sdk v0.1.89)

Copy Markdown View Source

Provides API endpoints related to opencode http api

Summary

Types

v2_agent_list_200_json_resp()

@type v2_agent_list_200_json_resp() :: %{
  data: [OpenCode.Generated.AgentV2Info.t()],
  location: OpenCode.Generated.LocationInfo.t()
}

v2_health_get_200_json_resp()

@type v2_health_get_200_json_resp() :: %{healthy: true}

Functions

v2_agent_list(opts \\ [])

List agents

Retrieve currently registered agents.

Options

  • location

v2_credential_remove(credentialID, opts \\ [])

@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

v2_credential_update(credentialID, body, opts \\ [])

@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

v2_health_get(opts \\ [])

Check server health

Check whether the API server is ready to accept requests.

v2_location_get(opts \\ [])

Get location

Resolve the requested location or the server default location.

Options

  • location