Cancel a remote request
curl --request POST \
--url https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel \
--cookie apsio_session=import requests
url = "https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel"
headers = {"cookie": "apsio_session="}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {cookie: 'apsio_session='}};
fetch('https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel', 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.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_COOKIE => "apsio_session=",
]);
$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.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cookie", "apsio_session=")
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.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel")
.header("cookie", "apsio_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'apsio_session='
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"kind": "send",
"subject_kind": "install",
"subject_hint": "<string>",
"families": [
"summary"
],
"created_by": "<string>",
"created_at": "<string>",
"expires_at": "<string>",
"canceled_at": "<string>",
"state": "open"
}Console API
Cancel a remote request
Takes an open request out of the policies: devices stop seeing it at their next fetch. A device that already served it is not affected. Owners and admins; audited as device_request.cancel.
POST
/
orgs
/
{orgId}
/
projects
/
{projectId}
/
device-requests
/
{requestId}
/
cancel
Cancel a remote request
curl --request POST \
--url https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel \
--cookie apsio_session=import requests
url = "https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel"
headers = {"cookie": "apsio_session="}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {cookie: 'apsio_session='}};
fetch('https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel', 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.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_COOKIE => "apsio_session=",
]);
$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.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cookie", "apsio_session=")
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.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel")
.header("cookie", "apsio_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'apsio_session='
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"kind": "send",
"subject_kind": "install",
"subject_hint": "<string>",
"families": [
"summary"
],
"created_by": "<string>",
"created_at": "<string>",
"expires_at": "<string>",
"canceled_at": "<string>",
"state": "open"
}Authorizations
The console session, set by /v1/auth/callback (__Host-apsio_session when host-only).
Path Parameters
Pattern:
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Example:
"0192f3a4-0000-7000-8000-00000000a001"
Pattern:
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Example:
"0192f3a4-0000-7000-8000-00000000a001"
Pattern:
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Example:
"0192f3a4-0000-7000-8000-00000000a001"
Response
200 - application/json
The canceled request
Available options:
send, delete Available options:
install, user The install id's or user hash's last four characters.
Null: every family.
Available options:
summary, errors, logs, spans, network, metrics, replay Open: in the policy every device of the project fetches.
Available options:
open, expired, canceled