Splunk · Arazzo Workflow

Splunk Finalize, Read, and Clean Up a Search Job

Version 1.0.0

Dispatch a long search, finalize it early, read partial results, then delete the job.

1 workflow 1 source API 1 provider
View Spec View on GitHub AnalyticsData AnalysisLoggingMachine DataMonitoringObservabilityPlatformSecuritySIEMArazzoWorkflows

Provider

splunk

Workflows

control-and-cleanup-search
Create, finalize, read, and delete a search job.
Dispatches an SPL search, finalizes it via the control endpoint, retrieves whatever results were gathered, and then deletes the job.
4 steps inputs: count, earliest_time, latest_time, search outputs: results, sid
1
createJob
Dispatch the SPL search as an asynchronous search job and capture the assigned search ID (sid).
2
finalizeJob
Issue the finalize control action to stop the search from collecting more data while preserving the results gathered so far.
3
getResults
Retrieve the results gathered before the job was finalized.
4
deleteJob
Cancel and delete the search job to release search-head resources.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Splunk Finalize, Read, and Clean Up a Search Job
  summary: Dispatch a long search, finalize it early, read partial results, then delete the job.
  description: >-
    A lifecycle-management pattern for search jobs. A search is dispatched, then
    a control action is issued to finalize it (stopping data collection while
    keeping the results gathered so far). The partial results are read back and
    the job is finally deleted to free search-head resources. Every step spells
    out its request inline so the flow can be read and executed without opening
    the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: searchApi
  url: ../openapi/splunk-search-api-openapi.yml
  type: openapi
workflows:
- workflowId: control-and-cleanup-search
  summary: Create, finalize, read, and delete a search job.
  description: >-
    Dispatches an SPL search, finalizes it via the control endpoint, retrieves
    whatever results were gathered, and then deletes the job.
  inputs:
    type: object
    required:
    - search
    properties:
      search:
        type: string
        description: The SPL search query to execute.
      earliest_time:
        type: string
        description: Earliest time boundary for the search.
      latest_time:
        type: string
        description: Latest time boundary for the search.
      count:
        type: integer
        description: Maximum number of results to return.
  steps:
  - stepId: createJob
    description: >-
      Dispatch the SPL search as an asynchronous search job and capture the
      assigned search ID (sid).
    operationId: createSearchJob
    parameters:
    - name: output_mode
      in: query
      value: json
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        search: $inputs.search
        earliest_time: $inputs.earliest_time
        latest_time: $inputs.latest_time
        exec_mode: normal
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      sid: $response.body#/sid
  - stepId: finalizeJob
    description: >-
      Issue the finalize control action to stop the search from collecting more
      data while preserving the results gathered so far.
    operationId: controlSearchJob
    parameters:
    - name: search_id
      in: path
      value: $steps.createJob.outputs.sid
    - name: output_mode
      in: query
      value: json
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        action: finalize
    successCriteria:
    - condition: $statusCode == 200
  - stepId: getResults
    description: >-
      Retrieve the results gathered before the job was finalized.
    operationId: getSearchResults
    parameters:
    - name: search_id
      in: path
      value: $steps.createJob.outputs.sid
    - name: output_mode
      in: query
      value: json
    - name: count
      in: query
      value: $inputs.count
    - name: offset
      in: query
      value: 0
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      results: $response.body#/results
      fields: $response.body#/fields
  - stepId: deleteJob
    description: >-
      Cancel and delete the search job to release search-head resources.
    operationId: deleteSearchJob
    parameters:
    - name: search_id
      in: path
      value: $steps.createJob.outputs.sid
    successCriteria:
    - condition: $statusCode == 200
  outputs:
    sid: $steps.createJob.outputs.sid
    results: $steps.getResults.outputs.results

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/splunk-control-and-cleanup-search-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.