Skip to main content
Complete reference for the devhelm Python SDK (v1.3.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. Falls back to the DEVHELM_API_TOKEN env var when empty.
base_urlstrhttps://api.devhelm.ioAPI base URL.
org_idstr | NoneNoneSets x-phelm-org-id. Falls back to DEVHELM_ORG_ID env var, then "1".
workspace_idstr | NoneNoneSets x-phelm-workspace-id. Falls back to DEVHELM_WORKSPACE_ID env var, then "1".
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 17 resources. List/get/delete signatures return Pydantic DTOs from devhelm.types; mutations accept RequestBody[...] (dict or model instance).

client.monitors

MethodSignatureReturns
list(**filters)(...) -> list[MonitorDto]Auto-fetches all pages
list_page(page, size, **filters)(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]
Both list() and list_page() accept optional server-side filter kwargs: enabled, type, managed_by, tags (comma-separated), search, and environment_id.

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]
create(body)ApiKeyCreateResponse (full key value returned once)
revoke(id) / delete(id)None / None
There is no get(id) — fetch the list and filter, or store the ID from create().

client.dependencies

MethodSignature
list() / list_page(page, size)list[ServiceSubscriptionDto] / Page[ServiceSubscriptionDto]
get(id)ServiceSubscriptionDto
track(slug, *, component_id?, alert_sensitivity?)ServiceSubscriptionDto
update_alert_sensitivity(subscription_id, alert_sensitivity)ServiceSubscriptionDto
delete(id)None
alert_sensitivity is one of ALL, INCIDENTS_ONLY, MAJOR_ONLY, or AWARENESS (the API default). component_id subscribes to a single component instead of the whole service.

client.deploy_lock

MethodSignature
acquire(body)DeployLockDto (body must include lockedBy; ttlMinutes optional, default 30, max 60)
current()DeployLockDto | None
release(lock_id) / force_release()None / None

client.maintenance_windows

MethodSignature
list(monitor_id?, status?)list[MaintenanceWindowDto]
list_page(page, size, ...)Page[MaintenanceWindowDto]
get(id)MaintenanceWindowDto
create(body) / update(id, body)MaintenanceWindowDto
cancel(id)None (alerts resume immediately)

client.services

Read-only access to the third-party service status catalog (GitHub, Stripe, AWS, …).
MethodSignature
list(...)CursorPage[ServiceCatalogDto] (filters: query, category, cursor, limit)
get(slug_or_id, summary?)ServiceDetailDto
live_status(slug_or_id)ServiceLiveStatusDto
categories() / summary()list[CategoryDto] / GlobalStatusSummaryDto
components(slug_or_id)list[ServiceComponentDto]
uptime(slug_or_id, period?)ServiceUptimeResponse
component_uptime(slug_or_id, component_id, period?)per-component uptime history
batch_component_uptime(slug_or_id, period?)BatchComponentUptimeDto
day(slug_or_id, date)ServiceDayDetailDto
incidents(...) / incident(slug_or_id, incident_id)Page[ServiceIncidentDto] / ServiceIncidentDetailDto
maintenances(slug_or_id, status?)list[ScheduledMaintenanceDto]

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)None
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.