> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer-test.atomicwork.com/llms.txt.
> For full documentation content, see https://developer-test.atomicwork.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer-test.atomicwork.com/_mcp/server.

# Get previous actions with output fields

GET https://{tenant}.atomicwork.com/api/v1/workspaces/{workspaceId}/request-automations/{request_entity_type}/previous-actions-with-output-fields

Reference: https://developer-test.atomicwork.com/atomicwork-public-api/workflows/getapi-v-1-workspaces-workspace-id-request-automations-request-entity-type-previous-actions-with-output-fields

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/workspaces/{workspaceId}/request-automations/{request_entity_type}/previous-actions-with-output-fields:
    get:
      operationId: >-
        getapi-v-1-workspaces-workspace-id-request-automations-request-entity-type-previous-actions-with-output-fields
      summary: Get previous actions with output fields
      tags:
        - subpackage_workflows
      parameters:
        - name: workspaceId
          in: path
          description: Workspace ID (numeric). Find yours under Settings → Workspace.
          required: true
          schema:
            type: integer
            format: int64
        - name: request_entity_type
          in: path
          description: Automation entity type (see allowed values in the enum schema).
          required: true
          schema:
            $ref: >-
              #/components/schemas/ApiV1WorkspacesWorkspaceIdRequestAutomationsRequestEntityTypePreviousActionsWithOutputFieldsGetParametersRequestEntityType
        - name: automation_id
          in: query
          description: ''
          required: false
          schema:
            type: string
        - name: current_action_id
          in: query
          description: ''
          required: false
          schema:
            type: string
        - name: filter_entity
          in: query
          description: ''
          required: true
          schema:
            $ref: >-
              #/components/schemas/ApiV1WorkspacesWorkspaceIdRequestAutomationsRequestEntityTypePreviousActionsWithOutputFieldsGetParametersFilterEntity
        - name: X-Api-Key
          in: header
          required: true
          schema:
            type: string
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Workflows_getapi_v1_workspaces__workspaceId__request_automations__request_entity_type__previous_actions_with_output_fields_Response_200
servers:
  - url: https://{tenant}.atomicwork.com
components:
  schemas:
    ApiV1WorkspacesWorkspaceIdRequestAutomationsRequestEntityTypePreviousActionsWithOutputFieldsGetParametersRequestEntityType:
      type: string
      enum:
        - QUESTION_REQUEST
        - SERVICE_REQUEST
        - INCIDENT_REQUEST
        - REQUEST
        - CHANGE
        - NOTIFICATIONS
        - CUSTOM_OBJECT
        - ASSET
      title: >-
        ApiV1WorkspacesWorkspaceIdRequestAutomationsRequestEntityTypePreviousActionsWithOutputFieldsGetParametersRequestEntityType
    ApiV1WorkspacesWorkspaceIdRequestAutomationsRequestEntityTypePreviousActionsWithOutputFieldsGetParametersFilterEntity:
      type: string
      enum:
        - REQUEST
        - USER
        - SERVICE_ITEM
        - ASSET
        - CHANGE
        - CHANGE_TEMPLATE
        - CHANGE_TEMPLATE_OUTPUT
        - CHANGE_TEMPLATE_ACTION
        - REQUEST_EVENT
        - CHANGE_EVENT
        - IDENTITY_GRANT
        - IDENTITY_APP
        - CUSTOM_OBJECT
        - CUSTOM_OBJECT_EVENT
        - AUDIT_LOG
        - RECOMMENDED_POLICIES
        - MCP_STORE
      title: >-
        ApiV1WorkspacesWorkspaceIdRequestAutomationsRequestEntityTypePreviousActionsWithOutputFieldsGetParametersFilterEntity
    Workflows_getapi_v1_workspaces__workspaceId__request_automations__request_entity_type__previous_actions_with_output_fields_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: >-
        Workflows_getapi_v1_workspaces__workspaceId__request_automations__request_entity_type__previous_actions_with_output_fields_Response_200
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

```

## SDK Code Examples

```python
import requests

url = "https://{tenant}.atomicwork.com/api/v1/workspaces/1/request-automations/QUESTION_REQUEST/previous-actions-with-output-fields"

querystring = {"filter_entity":"REQUEST"}

payload = {}
headers = {
    "X-Workspace-Id": "{{workspace_id}}",
    "X-Api-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://{tenant}.atomicwork.com/api/v1/workspaces/1/request-automations/QUESTION_REQUEST/previous-actions-with-output-fields?filter_entity=REQUEST';
const options = {
  method: 'GET',
  headers: {
    'X-Workspace-Id': '{{workspace_id}}',
    'X-Api-Key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://{tenant}.atomicwork.com/api/v1/workspaces/1/request-automations/QUESTION_REQUEST/previous-actions-with-output-fields?filter_entity=REQUEST"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("X-Workspace-Id", "{{workspace_id}}")
	req.Header.Add("X-Api-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://{tenant}.atomicwork.com/api/v1/workspaces/1/request-automations/QUESTION_REQUEST/previous-actions-with-output-fields?filter_entity=REQUEST")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Workspace-Id"] = '{{workspace_id}}'
request["X-Api-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://{tenant}.atomicwork.com/api/v1/workspaces/1/request-automations/QUESTION_REQUEST/previous-actions-with-output-fields?filter_entity=REQUEST")
  .header("X-Workspace-Id", "{{workspace_id}}")
  .header("X-Api-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://{tenant}.atomicwork.com/api/v1/workspaces/1/request-automations/QUESTION_REQUEST/previous-actions-with-output-fields?filter_entity=REQUEST', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Api-Key' => '<apiKey>',
    'X-Workspace-Id' => '{{workspace_id}}',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://{tenant}.atomicwork.com/api/v1/workspaces/1/request-automations/QUESTION_REQUEST/previous-actions-with-output-fields?filter_entity=REQUEST");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Workspace-Id", "{{workspace_id}}");
request.AddHeader("X-Api-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Workspace-Id": "{{workspace_id}}",
  "X-Api-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://{tenant}.atomicwork.com/api/v1/workspaces/1/request-automations/QUESTION_REQUEST/previous-actions-with-output-fields?filter_entity=REQUEST")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```