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 ,
)
Parameter Type Default Description 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
Method Signature Returns list(**filters)(...) -> list[MonitorDto]Auto-fetches all pages list_page(page, size, **filters)(int, int, ...) -> Page[MonitorDto]Single page get(id)(int | str) -> MonitorDtocreate(body)(RequestBody[CreateMonitorRequest]) -> MonitorDtoupdate(id, body)(int | str, RequestBody[UpdateMonitorRequest]) -> MonitorDtodelete(id)(int | str) -> Nonepause(id)(int | str) -> MonitorDtoresume(id)(int | str) -> MonitorDtotest(id)(int | str) -> AssertionTestResultDtoresults(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
Method Signature Returns list()() -> list[IncidentDto]list_page(page, size)(int, int) -> Page[IncidentDto]get(id)(int | str) -> IncidentDetailDtocreate(body)(RequestBody[CreateManualIncidentRequest]) -> IncidentDetailDtoresolve(id, body=None)(int | str, RequestBody[ResolveIncidentRequest]?) -> IncidentDetailDtoBody optional
Incidents have no delete method — they are resolved, not deleted.
client.alert_channels
Method Signature list()() -> list[AlertChannelDto]list_page(page, size)(int, int) -> Page[AlertChannelDto]get(id)(int | str) -> AlertChannelDtocreate(body)(RequestBody[CreateAlertChannelRequest]) -> AlertChannelDtoupdate(id, body)(int | str, RequestBody[UpdateAlertChannelRequest]) -> AlertChannelDtodelete(id)(int | str) -> Nonetest(id)(int | str) -> TestChannelResult
client.notification_policies
Method Signature list() / list_page(page, size)list[NotificationPolicyDto] / Page[NotificationPolicyDto]get(id)NotificationPolicyDtocreate(body) / update(id, body)NotificationPolicyDtodelete(id) / test(id)None / None
Method Signature list() / list_page(page, size)list[TagDto] / Page[TagDto]get(id)TagDtocreate(body) / update(id, body)TagDtodelete(id)None
client.environments
Method Signature list() / list_page(page, size)list[EnvironmentDto] / Page[EnvironmentDto]get(slug)EnvironmentDtocreate(body) / update(slug, body)EnvironmentDtodelete(slug)None
client.secrets
Method Signature list() / list_page(page, size)list[SecretDto] / Page[SecretDto] (metadata only — values are never returned)create(body) / update(key, body)SecretDtodelete(key)None
client.resource_groups
Method Signature list() / list_page(page, size)list[ResourceGroupDto] / Page[ResourceGroupDto]get(id)ResourceGroupDtocreate(body) / update(id, body)ResourceGroupDtodelete(id)Noneadd_member(group_id, body)ResourceGroupMemberDtoremove_member(group_id, member_id)None
client.webhooks
Method Signature list() / list_page(page, size)list[WebhookEndpointDto] / Page[WebhookEndpointDto]get(id) / create(body) / update(id, body)WebhookEndpointDtodelete(id)Nonetest(id)WebhookTestResult
client.api_keys
Method Signature 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
Method Signature list() / list_page(page, size)list[ServiceSubscriptionDto] / Page[ServiceSubscriptionDto]get(id)ServiceSubscriptionDtotrack(slug, *, component_id?, alert_sensitivity?)ServiceSubscriptionDtoupdate_alert_sensitivity(subscription_id, alert_sensitivity)ServiceSubscriptionDtodelete(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
Method Signature acquire(body)DeployLockDto (body must include lockedBy; ttlMinutes optional, default 30, max 60)current()DeployLockDto | Nonerelease(lock_id) / force_release()None / None
client.maintenance_windows
Method Signature list(monitor_id?, status?)list[MaintenanceWindowDto]list_page(page, size, ...)Page[MaintenanceWindowDto]get(id)MaintenanceWindowDtocreate(body) / update(id, body)MaintenanceWindowDtocancel(id)None (alerts resume immediately)
client.services
Read-only access to the third-party service status catalog (GitHub, Stripe, AWS, …).
Method Signature list(...)CursorPage[ServiceCatalogDto] (filters: query, category, cursor, limit)get(slug_or_id, summary?)ServiceDetailDtolive_status(slug_or_id)ServiceLiveStatusDtocategories() / summary()list[CategoryDto] / GlobalStatusSummaryDtocomponents(slug_or_id)list[ServiceComponentDto]uptime(slug_or_id, period?)ServiceUptimeResponsecomponent_uptime(slug_or_id, component_id, period?)per-component uptime history batch_component_uptime(slug_or_id, period?)BatchComponentUptimeDtoday(slug_or_id, date)ServiceDayDetailDtoincidents(...) / incident(slug_or_id, incident_id)Page[ServiceIncidentDto] / ServiceIncidentDetailDtomaintenances(slug_or_id, status?)list[ScheduledMaintenanceDto]
client.status
Method Signature overview()DashboardOverviewDto
client.status_pages
The largest namespace; root operations plus five sub-namespaces.
Method Signature list()list[StatusPageDto]get(id) / create(body) / update(id, body)StatusPageDtodelete(id)Nonereorder_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.
Method Signature Returns 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
from devhelm import Page, CursorPage
Page
Attribute Type Description 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
Attribute Type Description 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.