Close a browser session.
curl --request DELETE \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions/{session_uuid} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions/{session_uuid}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions/{session_uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions/{session_uuid}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"session": {
"created_at": "2023-11-07T05:31:56Z",
"creator": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"egress_country": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z",
"project_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"viewport": {
"height": 1040,
"width": 1600
},
"close_requested_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z",
"replayed_from_session_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"terminal_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}Sessions
Close a browser session.
Idempotently requests shutdown. Creators may close their own sessions; project managers may terminate any project session. A successful request returns the durable closing or terminal resource while shutdown proceeds.
DELETE
https://api.infrawatch.com/api/v1
/
projects
/
{project_uuid}
/
sessions
/
{session_uuid}
Close a browser session.
curl --request DELETE \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions/{session_uuid} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions/{session_uuid}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions/{session_uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions/{session_uuid}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"session": {
"created_at": "2023-11-07T05:31:56Z",
"creator": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"egress_country": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z",
"project_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"viewport": {
"height": 1040,
"width": 1600
},
"close_requested_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z",
"replayed_from_session_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"terminal_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}Authorizations
Infrawatch API key. Supply the complete key directly as the header value.
Response
Close accepted or the existing terminal resource returned.
Show child attributes
Show child attributes
⌘I