# Splunk

> Run Splunk search jobs, read results and events, manage saved searches, inspect fired alerts, and discover indexes, apps and source types.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/splunk

## Actions

### Control search job

Control search job.

**Inputs**

- Sid (`sid`, text, required): The search job ID from Create search job or Dispatch saved search.
- Operation (`operation`, text, required): How to change the search job. One of: `pause`, `unpause`, `finalize`, `cancel`, `touch`.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Create saved search

Create saved search.

**Inputs**

- Owner (`owner`, text, required): Saved-search owner. Use nobody for a search shared within the app.
- App (`app`, text, required): Select the Splunk app namespace.
- Name (`name`, text, required): The name.
- Search (`search`, text, required): A complete SPL query, beginning with search or a generating command such as | makeresults.
- Description (`description`, text): The description.
- Is scheduled (`is_scheduled`, true/false): The is scheduled.
- Cron schedule (`cron_schedule`, text): Cron expression when scheduling is enabled.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Create search job

Create search job.

**Inputs**

- Search (`search`, text, required): A complete SPL query, beginning with search or a generating command such as | makeresults.
- Earliest time (`earliest_time`, date and time): Earliest event time. The date and time picker is converted to Unix seconds.
- Latest time (`latest_time`, date and time): Latest event time. The date and time picker is converted to Unix seconds.
- Max count (`max_count`, number): The max count. From 1 to 500000.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "sid": "qa-search-job"
  }
}
```

### Delete saved search

Delete saved search.

**Inputs**

- Owner (`owner`, text, required): Saved-search owner. Use nobody for a search shared within the app.
- App (`app`, text, required): Select the Splunk app namespace.
- Search name (`search_name`, text, required): The saved search name.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Delete search job

Delete search job.

**Inputs**

- Sid (`sid`, text, required): The search job ID from Create search job or Dispatch saved search.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Dispatch saved search

Dispatch saved search.

**Inputs**

- Owner (`owner`, text, required): Saved-search owner. Use nobody for a search shared within the app.
- App (`app`, text, required): Select the Splunk app namespace.
- Search name (`search_name`, text, required): The saved search name.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "sid": "qa-search-job"
  }
}
```

### Get app

Get app.

**Inputs**

- App (`app`, text, required): Select the Splunk app namespace.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Get current context

Get current context.

**Inputs**: None.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Get fired alerts

Get fired alerts.

**Inputs**

- Alert name (`alert_name`, text, required): The alert name.
- Count (`count`, number): The count. From 1 to 1000.
- Offset (`offset`, number): The offset. At least 0.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Get index

Get index.

**Inputs**

- Index name (`index_name`, text, required): The index name.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Get saved search

Get saved search.

**Inputs**

- Owner (`owner`, text, required): Saved-search owner. Use nobody for a search shared within the app.
- App (`app`, text, required): Select the Splunk app namespace.
- Search name (`search_name`, text, required): The saved search name.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Get search events

Get search events.

**Inputs**

- Sid (`sid`, text, required): The search job ID from Create search job or Dispatch saved search.
- Count (`count`, number): The count. From 1 to 1000.
- Offset (`offset`, number): The offset. At least 0.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Get search job

Get search job.

**Inputs**

- Sid (`sid`, text, required): The search job ID from Create search job or Dispatch saved search.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Get search preview

Get search preview.

**Inputs**

- Sid (`sid`, text, required): The search job ID from Create search job or Dispatch saved search.
- Count (`count`, number): The count. From 1 to 1000.
- Offset (`offset`, number): The offset. At least 0.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Get search results

Get search results.

**Inputs**

- Sid (`sid`, text, required): The search job ID from Create search job or Dispatch saved search.
- Count (`count`, number): The count. From 1 to 1000.
- Offset (`offset`, number): The offset. At least 0.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Get server info

Get server info.

**Inputs**: None.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### Get sourcetype

Get sourcetype.

**Inputs**

- Sourcetype (`sourcetype`, text, required): The sourcetype.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```

### List apps

List apps.

**Inputs**

- Count (`count`, number): The count. From 1 to 1000.
- Offset (`offset`, number): The offset. At least 0.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "entry": [],
    "paging": {
      "offset": 0,
      "total": 0
    }
  }
}
```

### List fired alerts

List fired alerts.

**Inputs**

- Count (`count`, number): The count. From 1 to 1000.
- Offset (`offset`, number): The offset. At least 0.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "entry": [],
    "paging": {
      "offset": 0,
      "total": 0
    }
  }
}
```

### List indexes

List indexes.

**Inputs**

- Count (`count`, number): The count. From 1 to 1000.
- Offset (`offset`, number): The offset. At least 0.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "entry": [],
    "paging": {
      "offset": 0,
      "total": 0
    }
  }
}
```

### List saved search history

List saved search history.

**Inputs**

- Owner (`owner`, text, required): Saved-search owner. Use nobody for a search shared within the app.
- App (`app`, text, required): Select the Splunk app namespace.
- Search name (`search_name`, text, required): The saved search name.
- Count (`count`, number): The count. From 1 to 1000.
- Offset (`offset`, number): The offset. At least 0.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "entry": [],
    "paging": {
      "offset": 0,
      "total": 0
    }
  }
}
```

### List saved searches

List saved searches.

**Inputs**

- Owner (`owner`, text, required): Saved-search owner. Use nobody for a search shared within the app.
- App (`app`, text, required): Select the Splunk app namespace.
- Count (`count`, number): The count. From 1 to 1000.
- Offset (`offset`, number): The offset. At least 0.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "entry": [],
    "paging": {
      "offset": 0,
      "total": 0
    }
  }
}
```

### List search jobs

List search jobs.

**Inputs**

- Count (`count`, number): The count. From 1 to 1000.
- Offset (`offset`, number): The offset. At least 0.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "entry": [],
    "paging": {
      "offset": 0,
      "total": 0
    }
  }
}
```

### List sourcetypes

List sourcetypes.

**Inputs**

- Count (`count`, number): The count. From 1 to 1000.
- Offset (`offset`, number): The offset. At least 0.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "entry": [],
    "paging": {
      "offset": 0,
      "total": 0
    }
  }
}
```

### Update saved search

Update saved search.

**Inputs**

- Owner (`owner`, text, required): Saved-search owner. Use nobody for a search shared within the app.
- App (`app`, text, required): Select the Splunk app namespace.
- Search name (`search_name`, text, required): The saved search name.
- Search (`search`, text): A complete SPL query, beginning with search or a generating command such as | makeresults.
- Description (`description`, text): The description.
- Is scheduled (`is_scheduled`, true/false): The is scheduled.
- Cron schedule (`cron_schedule`, text): The cron schedule.
- Disabled (`disabled`, true/false): The disabled.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "results": []
  }
}
```
