Workspace Notifications
List workspace recipients for a notification
Returns a paginated list of workspaces receiving the specified notification within the authorized organization. If the notification does not exist in the authorized scope, respond with 404. If it exists with workspace target but has no recipients, respond with 200 and empty data. If it exists with a target other than workspaces, respond with 400. Aggregation not available on this endpoint.
GET
/
v2
/
organizations
/
{organization_id}
/
workspace-notifications
/
{workspace_notification_id}
/
sessions
List workspace recipients for a notification
curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions', 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.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions",
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.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions"
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.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions")
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{
"has_next": false,
"data": [
{
"id": "507f1f77bcf86cd799439012",
"name": "LAPTOP-001",
"status": "updated",
"total_users_accepted": 3,
"session_id": 42,
"workspace_id": "507f1f77bcf86cd799439099"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Organization identifier.
Required string length:
24Pattern:
^[0-9a-f]{24}$Workspace notification ID
Required string length:
36Pattern:
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Query Parameters
Page number.
Required range:
x >= 1Number of items per page.
Required range:
1 <= x <= 100Response fields separated by commas for each element.
Maximum string length:
2048JSON expression of filters on filterable resource fields.
Maximum string length:
5120Sorting expression with format :asc|desc. Default name:asc.
Pattern:
^([a-z_]+):(asc|desc)$⌘I
List workspace recipients for a notification
curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions', 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.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions",
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.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions"
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.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/workspace-notifications/{workspace_notification_id}/sessions")
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{
"has_next": false,
"data": [
{
"id": "507f1f77bcf86cd799439012",
"name": "LAPTOP-001",
"status": "updated",
"total_users_accepted": 3,
"session_id": 42,
"workspace_id": "507f1f77bcf86cd799439099"
}
]
}