curl --request GET \
--url https://api.olostep.com/v1/monitors/{monitor_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.olostep.com/v1/monitors/{monitor_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.olostep.com/v1/monitors/{monitor_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.olostep.com/v1/monitors/{monitor_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.olostep.com/v1/monitors/{monitor_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.olostep.com/v1/monitors/{monitor_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olostep.com/v1/monitors/{monitor_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "monitor",
"query": "<string>",
"tracked": {
"type": "<string>",
"urls": [
"<string>"
],
"web_query": "<string>"
},
"source_policy": {
"include_urls": [
"<string>"
],
"exclude_urls": [
"<string>"
],
"include_domains": [
"<string>"
],
"exclude_domains": [
"<string>"
]
},
"schedule": {
"frequency": "<string>",
"cron": "<string>",
"timezone": "UTC",
"next_run_at": "2023-11-07T05:31:56Z"
},
"notification": {
"events": [
"changed"
],
"channels": [
{
"type": "email",
"target": "<string>",
"events": [
"changed"
]
}
]
},
"webhook": {
"url": "<string>"
},
"output_schema": {},
"status": "provisioning",
"error_message": "<string>",
"last_run": {
"id": "<string>",
"status": "completed",
"change_detected": true,
"ran_at": "2023-11-07T05:31:56Z"
},
"agent": {
"id": "<string>"
},
"metadata": {},
"created": 123,
"updated": 123,
"total_count": 123,
"mermaid_diagram": "<string>"
}{
"error": "<string>",
"monitor_id": "<string>"
}モニターを取得
IDでモニターを取得し、last_runとtotal_countを含みます。Mermaid DAG図を含めるにはinclude-diagram=trueを使用し、スナップショット数を省略するにはinclude_total_count=falseを使用します。
curl --request GET \
--url https://api.olostep.com/v1/monitors/{monitor_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.olostep.com/v1/monitors/{monitor_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.olostep.com/v1/monitors/{monitor_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.olostep.com/v1/monitors/{monitor_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.olostep.com/v1/monitors/{monitor_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.olostep.com/v1/monitors/{monitor_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olostep.com/v1/monitors/{monitor_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "monitor",
"query": "<string>",
"tracked": {
"type": "<string>",
"urls": [
"<string>"
],
"web_query": "<string>"
},
"source_policy": {
"include_urls": [
"<string>"
],
"exclude_urls": [
"<string>"
],
"include_domains": [
"<string>"
],
"exclude_domains": [
"<string>"
]
},
"schedule": {
"frequency": "<string>",
"cron": "<string>",
"timezone": "UTC",
"next_run_at": "2023-11-07T05:31:56Z"
},
"notification": {
"events": [
"changed"
],
"channels": [
{
"type": "email",
"target": "<string>",
"events": [
"changed"
]
}
]
},
"webhook": {
"url": "<string>"
},
"output_schema": {},
"status": "provisioning",
"error_message": "<string>",
"last_run": {
"id": "<string>",
"status": "completed",
"change_detected": true,
"ran_at": "2023-11-07T05:31:56Z"
},
"agent": {
"id": "<string>"
},
"metadata": {},
"created": 123,
"updated": 123,
"total_count": 123,
"mermaid_diagram": "<string>"
}{
"error": "<string>",
"monitor_id": "<string>"
}承認
Bearer認証ヘッダーの形式はBearer で、はあなたの認証トークンです。
パスパラメータ
^monitor_クエリパラメータ
total_count を省略するには false または 0 に設定します。
true, false, 0, 1 true の場合、モニターDAGの mermaid_diagram を含みます。
true, 1 レスポンス
モニターが取得されました。
ユニークなモニター識別子(monitor_…)。
"monitor"
自然言語でのモニタリングの意図。
計画が完了した後にモニターが追跡する解決済みのターゲット。
Show child attributes
Show child attributes
計画と実行中に適用されるオプションのURL/ドメイン許可および拒否リスト。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
構造化抽出出力のためのオプションのJSONスキーマ。
ライフサイクルステータスを監視。
provisioning, active, paused, failed, deleted statusがfailedのときに表示。
最新のスナップショット概要。GET /v1/monitors/{monitor_id}で含まれる。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Unixタイムスタンプ(秒)。
Unixタイムスタンプ(秒)。
スナップショットの総数。include_total_count=falseでない限り、GET /v1/monitors/{monitor_id}で含まれる。
モニターDAGのMermaidフローチャート。include-diagram=trueで取得時に含まれる。
このページは役に立ちましたか?