> For the complete documentation index, see [llms.txt](https://developers.incidents.cloud.solarwinds.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/sdks/workflowsactions.md).

# Workflows.Actions

## Overview

### Available Operations

* [create](#create) - Create Action
* [get\_by\_id](#get_by_id) - Get Workflow Action By ID

## create

Create an Action for a workflow

### Example Usage

```python
from squadcast import SquadcastSDK


with SquadcastSDK(
    refresh_token_auth="<YOUR_REFRESH_TOKEN_AUTH_HERE>",
) as squadcast_sdk:

    res = squadcast_sdk.workflows.actions.create(workflow_id="<id>", v3_workflows_action_request={
        "name": "sq_add_status_page_issue",
        "data": {
            "component_and_impact": [],
            "issue_title": "<value>",
            "page_status_id": 179034,
            "status_and_message": [
                {
                    "messages": [
                        "<value 1>",
                        "<value 2>",
                        "<value 3>",
                    ],
                    "status_id": 692068,
                },
            ],
            "status_page_id": 368871,
        },
    })

    # Handle response
    print(res)

```

### Parameters

| Parameter                     | Type                                                                                                                                    | Required             | Description                                                         |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `workflow_id`                 | *str*                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `v3_workflows_action_request` | [models.V3WorkflowsActionRequest](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v3workflowsactionrequest.md) | :heavy\_check\_mark: | N/A                                                                 |
| `retries`                     | [Optional\[utils.RetryConfig\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/utils/retryconfig.md)          | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.WorkflowsCreateActionResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/workflowscreateactionresponse.md)

### Errors

| Error Type                      | Status Code | Content Type     |
| ------------------------------- | ----------- | ---------------- |
| errors.BadRequestError          | 400         | application/json |
| errors.UnauthorizedError        | 401         | application/json |
| errors.PaymentRequiredError     | 402         | application/json |
| errors.ForbiddenError           | 403         | application/json |
| errors.NotFoundError            | 404         | application/json |
| errors.ConflictError            | 409         | application/json |
| errors.UnprocessableEntityError | 422         | application/json |
| errors.InternalServerError      | 500         | application/json |
| errors.BadGatewayError          | 502         | application/json |
| errors.ServiceUnavailableError  | 503         | application/json |
| errors.GatewayTimeoutError      | 504         | application/json |
| errors.SDKDefaultError          | 4XX, 5XX    | \*/\*            |

## get\_by\_id

Get workflow action by ID

### Example Usage

```python
from squadcast import SquadcastSDK


with SquadcastSDK(
    refresh_token_auth="<YOUR_REFRESH_TOKEN_AUTH_HERE>",
) as squadcast_sdk:

    res = squadcast_sdk.workflows.actions.get_by_id(workflow_id="<id>", action_id="<id>")

    # Handle response
    print(res)

```

### Parameters

| Parameter     | Type                                                                                                                           | Required             | Description                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `workflow_id` | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `action_id`   | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `retries`     | [Optional\[utils.RetryConfig\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/utils/retryconfig.md) | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.WorkflowsGetWorkflowActionByIDResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/workflowsgetworkflowactionbyidresponse.md)

### Errors

| Error Type                      | Status Code | Content Type     |
| ------------------------------- | ----------- | ---------------- |
| errors.BadRequestError          | 400         | application/json |
| errors.UnauthorizedError        | 401         | application/json |
| errors.PaymentRequiredError     | 402         | application/json |
| errors.ForbiddenError           | 403         | application/json |
| errors.NotFoundError            | 404         | application/json |
| errors.ConflictError            | 409         | application/json |
| errors.UnprocessableEntityError | 422         | application/json |
| errors.InternalServerError      | 500         | application/json |
| errors.BadGatewayError          | 502         | application/json |
| errors.ServiceUnavailableError  | 503         | application/json |
| errors.GatewayTimeoutError      | 504         | application/json |
| errors.SDKDefaultError          | 4XX, 5XX    | \*/\*            |
