Sep 20, 2024
Monitoring API client
This client is new in v9 of the Swift API clients.
The Monitoring 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: "Monitoring", package: "algoliasearch-client-swift")
]
)
]
)
To use the Monitoring client, add this import to your files:
Copy
1
import Monitoring
To create an instance of the client:
Copy
1
let client = try MonitoringClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY")
List of methods
Each method makes one request to the Monitoring API.
Status
client.getStatus | Retrieve status of all clusters |
client.getClusterStatus | Retrieve cluster status |
Incidents
client.getIncidents | Retrieve all incidents |
client.getClusterIncidents | Retrieve cluster incidents |
Monitoring
client.getServers | Retrieve servers |
client.getLatency | Retrieve search latency times |
client.getIndexingTime | Retrieve indexing times |
client.getReachability | Test the reachability of clusters |
Infrastructure
client.getMetrics | Retrieve metrics |
Did you find this page helpful?