curl --request POST \ --url 'https://api.flashcat.cloud/incident/resolve?app_key=' \ --header 'Content-Type: application/json' \ --data '{ "incident_ids": [ "69da451ef77b1b51f40e83ee" ], "root_cause": "Memory leak in the connection pool caused by a missing cleanup call.", "resolution": "Deployed hotfix v2.3.1 and restarted the affected service."}'
import requests
url = "https://api.flashcat.cloud/incident/resolve?app_key="
payload = {
"incident_ids": ["69da451ef77b1b51f40e83ee"],
"root_cause": "Memory leak in the connection pool caused by a missing cleanup call.",
"resolution": "Deployed hotfix v2.3.1 and restarted the affected service."
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
incident_ids: ['69da451ef77b1b51f40e83ee'],
root_cause: 'Memory leak in the connection pool caused by a missing cleanup call.',
resolution: 'Deployed hotfix v2.3.1 and restarted the affected service.'
})
};
fetch('https://api.flashcat.cloud/incident/resolve?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/incident/resolve?app_key="
payload := strings.NewReader("{\n \"incident_ids\": [\n \"69da451ef77b1b51f40e83ee\"\n ],\n \"root_cause\": \"Memory leak in the connection pool caused by a missing cleanup call.\",\n \"resolution\": \"Deployed hotfix v2.3.1 and restarted the affected service.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/incident/resolve?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"incident_ids\": [\n \"69da451ef77b1b51f40e83ee\"\n ],\n \"root_cause\": \"Memory leak in the connection pool caused by a missing cleanup call.\",\n \"resolution\": \"Deployed hotfix v2.3.1 and restarted the affected service.\"\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/incident/resolve?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"incident_ids\": [\n \"69da451ef77b1b51f40e83ee\"\n ],\n \"root_cause\": \"Memory leak in the connection pool caused by a missing cleanup call.\",\n \"resolution\": \"Deployed hotfix v2.3.1 and restarted the affected service.\"\n}"
response = http.request(request)
puts response.read_body
{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}
状态流转
恢复故障
关闭一个或多个故障,可同时记录根因、解决方案和关闭表单的填写内容。
POST
/
incident
/
resolve
恢复故障
curl --request POST \ --url 'https://api.flashcat.cloud/incident/resolve?app_key=' \ --header 'Content-Type: application/json' \ --data '{ "incident_ids": [ "69da451ef77b1b51f40e83ee" ], "root_cause": "Memory leak in the connection pool caused by a missing cleanup call.", "resolution": "Deployed hotfix v2.3.1 and restarted the affected service."}'
import requests
url = "https://api.flashcat.cloud/incident/resolve?app_key="
payload = {
"incident_ids": ["69da451ef77b1b51f40e83ee"],
"root_cause": "Memory leak in the connection pool caused by a missing cleanup call.",
"resolution": "Deployed hotfix v2.3.1 and restarted the affected service."
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
incident_ids: ['69da451ef77b1b51f40e83ee'],
root_cause: 'Memory leak in the connection pool caused by a missing cleanup call.',
resolution: 'Deployed hotfix v2.3.1 and restarted the affected service.'
})
};
fetch('https://api.flashcat.cloud/incident/resolve?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/incident/resolve?app_key="
payload := strings.NewReader("{\n \"incident_ids\": [\n \"69da451ef77b1b51f40e83ee\"\n ],\n \"root_cause\": \"Memory leak in the connection pool caused by a missing cleanup call.\",\n \"resolution\": \"Deployed hotfix v2.3.1 and restarted the affected service.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/incident/resolve?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"incident_ids\": [\n \"69da451ef77b1b51f40e83ee\"\n ],\n \"root_cause\": \"Memory leak in the connection pool caused by a missing cleanup call.\",\n \"resolution\": \"Deployed hotfix v2.3.1 and restarted the affected service.\"\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/incident/resolve?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"incident_ids\": [\n \"69da451ef77b1b51f40e83ee\"\n ],\n \"root_cause\": \"Memory leak in the connection pool caused by a missing cleanup call.\",\n \"resolution\": \"Deployed hotfix v2.3.1 and restarted the affected service.\"\n}"
response = http.request(request)
puts response.read_body
{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}