Replace the https origins of this Pages site that may receive a viewer assertion for one audience
curl --request POST \
--url http://localhost:3000/api/v1/pages/assertion/audiences/set \
--header 'Content-Type: application/json' \
--data '
{
"aud": "<string>",
"console": "<string>",
"execute": true,
"origin": [
"<string>"
],
"project": "<string>",
"site": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/pages/assertion/audiences/set"
payload = {
"aud": "<string>",
"console": "<string>",
"execute": True,
"origin": ["<string>"],
"project": "<string>",
"site": "<string>"
}
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({
aud: '<string>',
console: '<string>',
execute: true,
origin: ['<string>'],
project: '<string>',
site: '<string>'
})
};
fetch('http://localhost:3000/api/v1/pages/assertion/audiences/set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/pages/assertion/audiences/set",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'aud' => '<string>',
'console' => '<string>',
'execute' => true,
'origin' => [
'<string>'
],
'project' => '<string>',
'site' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/v1/pages/assertion/audiences/set"
payload := strings.NewReader("{\n \"aud\": \"<string>\",\n \"console\": \"<string>\",\n \"execute\": true,\n \"origin\": [\n \"<string>\"\n ],\n \"project\": \"<string>\",\n \"site\": \"<string>\"\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("http://localhost:3000/api/v1/pages/assertion/audiences/set")
.header("Content-Type", "application/json")
.body("{\n \"aud\": \"<string>\",\n \"console\": \"<string>\",\n \"execute\": true,\n \"origin\": [\n \"<string>\"\n ],\n \"project\": \"<string>\",\n \"site\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/pages/assertion/audiences/set")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"aud\": \"<string>\",\n \"console\": \"<string>\",\n \"execute\": true,\n \"origin\": [\n \"<string>\"\n ],\n \"project\": \"<string>\",\n \"site\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"action": "remove",
"aud": "<string>",
"audiences": [
{
"aud": "<string>",
"origins": [
"<string>"
]
}
],
"consoleUrl": "<string>",
"jwksUrl": "<string>",
"origins": [
"<string>"
],
"projectRef": "<string>",
"siteRef": "<string>",
"success": true
}pages
Replace the https origins of this Pages site that may receive a viewer assertion for one audience
POST
/
api
/
v1
/
pages
/
assertion
/
audiences
/
set
Replace the https origins of this Pages site that may receive a viewer assertion for one audience
curl --request POST \
--url http://localhost:3000/api/v1/pages/assertion/audiences/set \
--header 'Content-Type: application/json' \
--data '
{
"aud": "<string>",
"console": "<string>",
"execute": true,
"origin": [
"<string>"
],
"project": "<string>",
"site": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/pages/assertion/audiences/set"
payload = {
"aud": "<string>",
"console": "<string>",
"execute": True,
"origin": ["<string>"],
"project": "<string>",
"site": "<string>"
}
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({
aud: '<string>',
console: '<string>',
execute: true,
origin: ['<string>'],
project: '<string>',
site: '<string>'
})
};
fetch('http://localhost:3000/api/v1/pages/assertion/audiences/set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/pages/assertion/audiences/set",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'aud' => '<string>',
'console' => '<string>',
'execute' => true,
'origin' => [
'<string>'
],
'project' => '<string>',
'site' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/v1/pages/assertion/audiences/set"
payload := strings.NewReader("{\n \"aud\": \"<string>\",\n \"console\": \"<string>\",\n \"execute\": true,\n \"origin\": [\n \"<string>\"\n ],\n \"project\": \"<string>\",\n \"site\": \"<string>\"\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("http://localhost:3000/api/v1/pages/assertion/audiences/set")
.header("Content-Type", "application/json")
.body("{\n \"aud\": \"<string>\",\n \"console\": \"<string>\",\n \"execute\": true,\n \"origin\": [\n \"<string>\"\n ],\n \"project\": \"<string>\",\n \"site\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/pages/assertion/audiences/set")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"aud\": \"<string>\",\n \"console\": \"<string>\",\n \"execute\": true,\n \"origin\": [\n \"<string>\"\n ],\n \"project\": \"<string>\",\n \"site\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"action": "remove",
"aud": "<string>",
"audiences": [
{
"aud": "<string>",
"origins": [
"<string>"
]
}
],
"consoleUrl": "<string>",
"jwksUrl": "<string>",
"origins": [
"<string>"
],
"projectRef": "<string>",
"siteRef": "<string>",
"success": true
}Body
application/json
Assertion audience identifier for the third-party API
Console base URL
Register the audience; default is a dry-run that only shows the plan (exit 3)
HTTPS origin of this Pages site (default host or active custom hostname), not the third-party API. Repeat or comma-separate
Console project id or slug; overrides saved Console scope
Pages host slug, site id, or hostname. Console accepts all three as siteRef
Response
Success — body conforms to the @Returns schema.