# GetAction Method

## Description

Retrieves the latest version of an action, or a specific version of an action.

## HTTP Request

`GET https://api.skeddly.com/api/Actions/<id>`

## URL Parameters

### id

Action ID or Action Version ID of the action to return. When specifying an action ID for `id`, the latest version of the action will be returned. When specifying an action version ID for `id`, the specified version will be returned.

Type: `string`

Required: Yes

## Query Parameters

### include

A comma-separated list of extra data to include

Type: `string`

Valid Values:

* `displayData`
* `lastExecution`
* `parameters`

Required: No

## Returns

An [Action](/data-types/action-object.md) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Actions/a-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Actions/a-00000001"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}

{% tab title="Python" %}

```python
import skeddly
client = skeddly.Client()
action = client.get_action("a-12345678")
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "actionId": "a-00000001",
    "actionType": "amazon-start-ec2-instances",
    "actionVersionId": "av-00000001",
    "comments": "Comments about this action",
    "isCurrentVersion": true,
    "isEnabled": true,
    "lastModifiedBy": "u-00000001",
    "lastModifiedDate": "2016-06-09T12:21:00Z",
    "managedInstanceId": "mi-00000001",
    "name": "Start My Instances",
    "nextExecutionDate": "2016-06-10T12:23:00Z",
    "projectId": "proj-00000001",
    "schedule": {
        "scheduleType": "daily",
        "startDate": "2016-06-10",
        "timeOfDay": "12:23:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    "tags": [
        "cost-reduction"
    ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.skeddly.com/resources/actions/getaction-method.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
