Sep 20, 2024
Ingestion API client
This client is new in v9 of the Swift API clients.
The Ingestion API client is part of the Algolia.Search
package.
You can add this package to your Package.swift
file:
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Algolia API clients",
platforms: [
.macOS(.v11)
],
dependencies: [
.package(
url: "https://github.com/algolia/algoliasearch-client-swift.git", from: "9.14.1")
],
targets: [
.executableTarget(
name: "Algolia API clients",
dependencies: [
.product(name: "Ingestion", package: "algoliasearch-client-swift")
]
)
]
)
To use the Ingestion client, add this import to your files:
Copy
1
import Ingestion
To create an instance of the client:
Copy
1
let client = try IngestionClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY", region: .us)
Make sure to use the region that matches your Algolia application’s analytics region:
region.us
for the United States and region.eu
for Europe.
You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.
List of methods
Each method makes one request to the Ingestion API.
Authentications
client.listAuthentications | List authentication resources |
client.createAuthentication | Create an authentication resource |
client.searchAuthentications | Search for authentication resources |
client.getAuthentication | Retrieve an authentication resource |
client.updateAuthentication | Update an authentication resource |
client.deleteAuthentication | Delete an authentication resource |
Destinations
client.listDestinations | List destinations |
client.createDestination | Create a destination |
client.searchDestinations | Search for destinations |
client.getDestination | Retrieve a destination |
client.updateDestination | Update a destination |
client.deleteDestination | Delete a destination |
Sources
client.listSources | List sources |
client.createSource | Create a source |
client.validateSource | Validates a source payload |
client.searchSources | Search for sources |
client.getSource | Retrieve a source |
client.updateSource | Update a source |
client.deleteSource | Delete a source |
client.validateSourceBeforeUpdate | Validates an update of a source payload |
client.triggerDockerSourceDiscover | Trigger a stream-listing request |
client.runSource | Run all tasks linked to a source |
Tasks
client.listTasks | List tasks |
client.createTask | Create a task |
client.searchTasks | Search for tasks |
client.getTask | Retrieve a task |
client.updateTask | Update a task |
client.deleteTask | Delete a task |
client.runTask | Run a task |
client.pushTask | Push a `batch` request payload through the Pipeline |
client.enableTask | Enable a task |
client.disableTask | Disable a task |
client.listTasksV1 | List tasks V1 |
client.createTaskV1 | Create a task V1 |
client.searchTasksV1 | Search for tasks V1 |
client.getTaskV1 | Retrieve a task V1 |
client.updateTaskV1 | Update a task V1 |
client.deleteTaskV1 | Delete a task |
client.runTaskV1 | Run a task V1 |
client.enableTaskV1 | Enable a task V1 |
client.disableTaskV1 | Disable a task V1 |
Transformations
client.listTransformations | List transformations |
client.createTransformation | Create a transformation |
client.tryTransformation | Try a transformation before creating it |
client.searchTransformations | Search for transformations |
client.getTransformation | Retrieve a transformation |
client.updateTransformation | Update a transformation |
client.deleteTransformation | Delete a transformation |
client.tryTransformationBeforeUpdate | Try a transformation before updating it |
Observability
client.listRuns | List task runs |
client.getRun | Retrieve a task run |
client.listEvents | List task run events |
client.getEvent | Retrieve a task run event |
Did you find this page helpful?