curl --request POST \
--url https://api.doozy.live/v1/account/provisioning/preview \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"provisioning_mode": "automatic",
"auto_disable_users": true,
"filters": {
"require_groups": [
"engineering",
"sales"
],
"require_hris_connection": false
}
}
'import requests
url = "https://api.doozy.live/v1/account/provisioning/preview"
payload = {
"provisioning_mode": "automatic",
"auto_disable_users": True,
"filters": {
"require_groups": ["engineering", "sales"],
"require_hris_connection": False
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provisioning_mode: 'automatic',
auto_disable_users: true,
filters: {require_groups: ['engineering', 'sales'], require_hris_connection: false}
})
};
fetch('https://api.doozy.live/v1/account/provisioning/preview', 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.doozy.live/v1/account/provisioning/preview",
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([
'provisioning_mode' => 'automatic',
'auto_disable_users' => true,
'filters' => [
'require_groups' => [
'engineering',
'sales'
],
'require_hris_connection' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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 := "https://api.doozy.live/v1/account/provisioning/preview"
payload := strings.NewReader("{\n \"provisioning_mode\": \"automatic\",\n \"auto_disable_users\": true,\n \"filters\": {\n \"require_groups\": [\n \"engineering\",\n \"sales\"\n ],\n \"require_hris_connection\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.doozy.live/v1/account/provisioning/preview")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"provisioning_mode\": \"automatic\",\n \"auto_disable_users\": true,\n \"filters\": {\n \"require_groups\": [\n \"engineering\",\n \"sales\"\n ],\n \"require_hris_connection\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doozy.live/v1/account/provisioning/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provisioning_mode\": \"automatic\",\n \"auto_disable_users\": true,\n \"filters\": {\n \"require_groups\": [\n \"engineering\",\n \"sales\"\n ],\n \"require_hris_connection\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "account_provisioning_preview",
"enable_count": 123,
"disable_count": 123,
"unchanged_count": 123,
"total_members": 123,
"enable_match_count": 123,
"disable_match_count": 123,
"next_enable_offset": 123,
"next_disable_offset": 123,
"to_enable": [
{
"id": "<string>",
"display_name": "<string>",
"email": "<string>",
"currently_enabled": true,
"would_be_enabled": true,
"reason": "<string>"
}
],
"to_disable": [
{
"id": "<string>",
"display_name": "<string>",
"email": "<string>",
"currently_enabled": true,
"would_be_enabled": true,
"reason": "<string>"
}
]
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}Preview a provisioning change
Dry-run a provisioning configuration: report which members would be enabled vs disabled if it were applied. Writes nothing. Owner only.
curl --request POST \
--url https://api.doozy.live/v1/account/provisioning/preview \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"provisioning_mode": "automatic",
"auto_disable_users": true,
"filters": {
"require_groups": [
"engineering",
"sales"
],
"require_hris_connection": false
}
}
'import requests
url = "https://api.doozy.live/v1/account/provisioning/preview"
payload = {
"provisioning_mode": "automatic",
"auto_disable_users": True,
"filters": {
"require_groups": ["engineering", "sales"],
"require_hris_connection": False
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provisioning_mode: 'automatic',
auto_disable_users: true,
filters: {require_groups: ['engineering', 'sales'], require_hris_connection: false}
})
};
fetch('https://api.doozy.live/v1/account/provisioning/preview', 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.doozy.live/v1/account/provisioning/preview",
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([
'provisioning_mode' => 'automatic',
'auto_disable_users' => true,
'filters' => [
'require_groups' => [
'engineering',
'sales'
],
'require_hris_connection' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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 := "https://api.doozy.live/v1/account/provisioning/preview"
payload := strings.NewReader("{\n \"provisioning_mode\": \"automatic\",\n \"auto_disable_users\": true,\n \"filters\": {\n \"require_groups\": [\n \"engineering\",\n \"sales\"\n ],\n \"require_hris_connection\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.doozy.live/v1/account/provisioning/preview")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"provisioning_mode\": \"automatic\",\n \"auto_disable_users\": true,\n \"filters\": {\n \"require_groups\": [\n \"engineering\",\n \"sales\"\n ],\n \"require_hris_connection\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doozy.live/v1/account/provisioning/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provisioning_mode\": \"automatic\",\n \"auto_disable_users\": true,\n \"filters\": {\n \"require_groups\": [\n \"engineering\",\n \"sales\"\n ],\n \"require_hris_connection\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "account_provisioning_preview",
"enable_count": 123,
"disable_count": 123,
"unchanged_count": 123,
"total_members": 123,
"enable_match_count": 123,
"disable_match_count": 123,
"next_enable_offset": 123,
"next_disable_offset": 123,
"to_enable": [
{
"id": "<string>",
"display_name": "<string>",
"email": "<string>",
"currently_enabled": true,
"would_be_enabled": true,
"reason": "<string>"
}
],
"to_disable": [
{
"id": "<string>",
"display_name": "<string>",
"email": "<string>",
"currently_enabled": true,
"would_be_enabled": true,
"reason": "<string>"
}
]
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}Authorizations
API key for authentication. Generate keys in the Doozy dashboard.
Query Parameters
2001 <= x <= 100x >= 0x >= 0Body
automatic: the workspace enforces the rules and auto enables/disables members. manual: no automatic provisioning.
automatic, manual "automatic"
Whether people removed or deactivated in Slack, or (in automatic mode) no longer matching the filters, lose access.
true
Show child attributes
Show child attributes
Response
The projected impact of the change
account_provisioning_preview "account_provisioning_preview"
A page of members that would gain access. Use next_enable_offset to read the next page; enable_count is the exact total.
Show child attributes
Show child attributes
A page of members that would lose access. Use next_disable_offset to read the next page; disable_count is the exact total.
Show child attributes
Show child attributes
Was this page helpful?