Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.devhelm.io/llms.txt

Use this file to discover all available pages before exploring further.

Complete reference for the devhelm Python SDK (v0.4.0). Every list/get returns a Pydantic model; every body parameter accepts either a dict or the corresponding Pydantic request class.

Client initialization

from devhelm import Devhelm

client = Devhelm(
    token="dh_live_xxxxxxxx",
    base_url="https://api.devhelm.io",
    org_id=None,
    workspace_id=None,
    timeout=30.0,
)
ParameterTypeDefaultDescription
tokenstr""API token. Required for all endpoints.
base_urlstrhttps://api.devhelm.ioAPI base URL.
org_idstr | NoneNoneSets x-phelm-org-id. Required for tokens with multi-org access.
workspace_idstr | NoneNoneSets x-phelm-workspace-id. Required for orgs with multiple workspaces.
timeoutfloat30.0Per-request timeout in seconds.
The client is built on httpx.Client. It is synchronous and thread-safe; share one instance across threads (see concurrency patterns).

Resource namespaces

The client exposes 15 resources. List/get/delete signatures return Pydantic DTOs from devhelm.types; mutations accept RequestBody[...] (dict or model instance).

client.monitors

MethodSignatureReturns
list()() -> list[MonitorDto]Auto-fetches all pages
list_page(page, size)(int, int) -> Page[MonitorDto]Single page
get(id)(int | str) -> MonitorDto
create(body)(RequestBody[CreateMonitorRequest]) -> MonitorDto
update(id, body)(int | str, RequestBody[UpdateMonitorRequest]) -> MonitorDto
delete(id)(int | str) -> None
pause(id)(int | str) -> MonitorDto
resume(id)(int | str) -> MonitorDto
test(id)(int | str) -> AssertionTestResultDto
results(id, cursor?, limit?)(int | str, str?, int?) -> CursorPage[CheckResultDto]Cursor pagination
versions(id, page=0, size=20)(int | str, int, int) -> Page[MonitorVersionDto]

client.incidents

MethodSignatureReturns
list()() -> list[IncidentDto]
list_page(page, size)(int, int) -> Page[IncidentDto]
get(id)(int | str) -> IncidentDetailDto
create(body)(RequestBody[CreateManualIncidentRequest]) -> IncidentDetailDto
resolve(id, body=None)(int | str, RequestBody[ResolveIncidentRequest]?) -> IncidentDetailDtoBody optional
Incidents have no delete method — they are resolved, not deleted.

client.alert_channels

MethodSignature
list()() -> list[AlertChannelDto]
list_page(page, size)(int, int) -> Page[AlertChannelDto]
get(id)(int | str) -> AlertChannelDto
create(body)(RequestBody[CreateAlertChannelRequest]) -> AlertChannelDto
update(id, body)(int | str, RequestBody[UpdateAlertChannelRequest]) -> AlertChannelDto
delete(id)(int | str) -> None
test(id)(int | str) -> TestChannelResult

client.notification_policies

MethodSignature
list() / list_page(page, size)list[NotificationPolicyDto] / Page[NotificationPolicyDto]
get(id)NotificationPolicyDto
create(body) / update(id, body)NotificationPolicyDto
delete(id) / test(id)None / None

client.tags

MethodSignature
list() / list_page(page, size)list[TagDto] / Page[TagDto]
get(id)TagDto
create(body) / update(id, body)TagDto
delete(id)None

client.environments

MethodSignature
list() / list_page(page, size)list[EnvironmentDto] / Page[EnvironmentDto]
get(slug)EnvironmentDto
create(body) / update(slug, body)EnvironmentDto
delete(slug)None

client.secrets

MethodSignature
list() / list_page(page, size)list[SecretDto] / Page[SecretDto] (metadata only — values are never returned)
create(body) / update(key, body)SecretDto
delete(key)None

client.resource_groups

MethodSignature
list() / list_page(page, size)list[ResourceGroupDto] / Page[ResourceGroupDto]
get(id)ResourceGroupDto
create(body) / update(id, body)ResourceGroupDto
delete(id)None
add_member(group_id, body)ResourceGroupMemberDto
remove_member(group_id, member_id)None

client.webhooks

MethodSignature
list() / list_page(page, size)list[WebhookEndpointDto] / Page[WebhookEndpointDto]
get(id) / create(body) / update(id, body)WebhookEndpointDto
delete(id)None
test(id)WebhookTestResult

client.api_keys

MethodSignature
list() / list_page(page, size)list[ApiKeyDto] / Page[ApiKeyDto]
get(id)ApiKeyDto
create(body)ApiKeyCreateResponse (full key value returned once)
revoke(id) / delete(id)None / None

client.dependencies

MethodSignature
list() / list_page(page, size)list[ServiceSubscriptionDto] / Page[ServiceSubscriptionDto]
get(id)ServiceSubscriptionDto
track(slug)ServiceSubscriptionDto
delete(id)None

client.deploy_lock

MethodSignature
acquire(body)DeployLockDto (body must include reason)
current()DeployLockDto | None
release(lock_id) / force_release()None / None

client.status

MethodSignature
overview()DashboardOverviewDto

client.status_pages

The largest namespace; root operations plus five sub-namespaces.
MethodSignature
list()list[StatusPageDto]
get(id) / create(body) / update(id, body)StatusPageDto
delete(id)None
reorder_layout(id, body)StatusPageDto
Sub-namespaces:
client.status_pages.components.list(page_id)
client.status_pages.components.create(page_id, body) / .update(page_id, comp_id, body) / .delete(page_id, comp_id) / .reorder(page_id, body)

client.status_pages.groups.list(page_id) / .create / .update / .delete

client.status_pages.incidents.list(page_id) / .get / .create / .update
client.status_pages.incidents.post_update(page_id, incident_id, body)
client.status_pages.incidents.publish(page_id, incident_id)
client.status_pages.incidents.dismiss(page_id, incident_id)
client.status_pages.incidents.delete(page_id, incident_id)

client.status_pages.subscribers.list(page_id) / .add / .remove

client.status_pages.domains.list(page_id) / .add / .verify / .remove

client.forensics

Read-only audit trail for the detection engine. See Incident Forensics for the conceptual overview.
MethodSignatureReturns
incident_timeline(id)(int | str) -> IncidentTimelineDtoState transitions, triggering evals, active policy snapshot
check_trace(check_id)(str) -> CheckTraceDtoEverything recorded for a single check execution
policy_snapshot(hash_hex)(str) -> PolicySnapshotDtoFetch policy snapshot by SHA-256 hash
monitor_rule_evaluations(monitor_id, rule_type?, region?, only_matched?, from_?, to?, page=0, size=50)... -> Page[RuleEvaluationDto]Paginated rule evaluations
monitor_transitions(monitor_id, from_?, to?, page=0, size=50)... -> Page[IncidentStateTransitionDto]Paginated state transitions

Pagination types

from devhelm import Page, CursorPage

Page

AttributeTypeDescription
datalist[T]Items in this page
has_nextboolWhether more pages exist
has_prevboolWhether previous pages exist
total_elementsint | NoneServer-reported total
total_pagesint | NoneServer-reported page count

CursorPage

AttributeTypeDescription
datalist[T]Items in this page
next_cursorstr | NoneCursor for the next page
has_moreboolWhether more items exist

Pydantic models

Every request and response is a pydantic.BaseModel. The full set is re-exported from devhelm:
from devhelm import (
    CreateMonitorRequest, UpdateMonitorRequest, MonitorDto,
    CreateManualIncidentRequest, ResolveIncidentRequest, IncidentDetailDto,
    CreateAlertChannelRequest, AlertChannelDto,
    # ...
)

req = CreateMonitorRequest.model_validate({
    "name": "API Health",
    "type": "HTTP",
    "config": {"url": "https://api.example.com/health"},
    "frequencySeconds": 60,
})
The full DTO/request inventory is in devhelm/__init__.py.

Next steps

Error handling

Exception types and retry patterns.

Concurrency patterns

Run the sync client concurrently in threads or asyncio.