Response

class domainrobot.response.DomainrobotResponse(status_code, body, headers, model=None)[source]

Wrapper around a successful API response.

When a model class is provided the items in data are instances of that model, giving IDE autocompletion and type safety. Otherwise they remain plain dicts.

Parameters:
status_code

HTTP status code.

stid: str | None

Server transaction ID.

ctid: str | None

Client transaction ID.

status: dict | None

Response status object.

messages: list[dict] | None

Response messages.

headers

HTTP response headers.

data: list[T] | None

Response data — typed model instances when a model is set, otherwise plain dicts.