Response manager
nexthink_api.Clients.NxtResponse
Bases: BaseModel
Build different types of Nexthink API responses based on the provided Response object.
Parameters
response : Response
The response object to build the response from.
Returns
ResponseType
Raises
NxtApiException
If the status code is not one of the expected values.
response: ResponseApiType = Field(alias='value', default=None)
class-attribute
instance-attribute
model_config = ConfigDict(populate_by_name=True, arbitrary_types_allowed=True)
class-attribute
instance-attribute
value: ResponseApiType
property
Returns the value of the 'response' attribute.
from_response(response: Response) -> ResponseApiType
Build a Nexthink API response based on the provided Response object.
Parameters
response : Response
The response object to build the response from.
Returns
ResponseAPIType
The built response.
Raises
NxtApiException
If the status code is not one of the expected values.
build_nxt_enrichment_response(response: Response) -> EnrichmentResponseType
Create Enrichment response based on the provided response object.
Parameters
response : Response
The response object to build the response from.
Returns
EnrichmentResponseType
The response object based on the status code of the given response.
Raises
NxtApiException
If the status code is not one of the expected values.
build_nxt_act_response(response: Response) -> ActResponseType
Create Act response based on the provided response object.
Parameters
response : Response
The response object to build the response from.
Returns
ActResponseType
The response object based on the status code of the given response.
Raises
NxtApiException
If the status code is not one of the expected values.
build_nxt_workflow_response(response: Response) -> WorkflowResponseType
Create Workflow response based on the provided response object.
Parameters
response : Response
The response object to build the response from.
Returns
WorkflowResponseType
The response object based on the status code of the given response.
Raises
NxtApiException
If the status code is not one of the expected values.
build_nxt_engage_response(response: Response) -> CampaignResponseType
Create Engage response based on the provided response object.
Parameters
response : Response
The response object to build the response from.
Returns
CampaignResponseType
The response object based on the status code of the given response.
Raises
NxtApiException
If the status code is not one of the expected values.
build_nxt_nql_response(response: Response) -> NqlResponseType
Create Nql response based on the provided response object.
Parameters
response : Response
The response object to build the response from.
Returns
NqlResponseType
The response object based on the status code of the given response.
Raises
NxtApiException
If the status code is not one of the expected values.
build_nxt_token_response(response: Response) -> NxtTokenResponse
Create a Token response based on the provided response object.
Parameters
response : Response
The response object to build the Token response from.
Returns
NxtTokenResponse
The Token response object.