Add user to organization
curl --request POST \
--url https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid} \
--header 'Content-Type: application/json' \
--header 'X-Aegister-Token: <api-key>' \
--data '
{
"alerts": {
"atb": true,
"cloud_defender": true,
"v_ciso": true
},
"email": "jsmith@example.com"
}
'import requests
url = "https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
payload = {
"alerts": {
"atb": True,
"cloud_defender": True,
"v_ciso": True
},
"email": "jsmith@example.com"
}
headers = {
"X-Aegister-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Aegister-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
alerts: {atb: true, cloud_defender: true, v_ciso: true},
email: 'jsmith@example.com'
})
};
fetch('https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}', 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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}",
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([
'alerts' => [
'atb' => true,
'cloud_defender' => true,
'v_ciso' => true
],
'email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Aegister-Token: <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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
payload := strings.NewReader("{\n \"alerts\": {\n \"atb\": true,\n \"cloud_defender\": true,\n \"v_ciso\": true\n },\n \"email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Aegister-Token", "<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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}")
.header("X-Aegister-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"alerts\": {\n \"atb\": true,\n \"cloud_defender\": true,\n \"v_ciso\": true\n },\n \"email\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Aegister-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alerts\": {\n \"atb\": true,\n \"cloud_defender\": true,\n \"v_ciso\": true\n },\n \"email\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"error": 0,
"messages": [],
"data": {
"organization": 123,
"user": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": 1,
"messages": [
"Invalid data provided"
]
}{
"error": 1,
"messages": [
9153
]
}{
"error": 1,
"messages": []
}Utenti
Aggiungi utente all'organizzazione
Aggiunge un utente a un’organizzazione. L’utente autenticato deve appartenere all’organizzazione e disporre dei privilegi di Owner. Aegister invia al nuovo utente un’email di invito.
POST
/
api
/
v1
/
organizations
/
{organizationid}
/
users
/
{userid}
Add user to organization
curl --request POST \
--url https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid} \
--header 'Content-Type: application/json' \
--header 'X-Aegister-Token: <api-key>' \
--data '
{
"alerts": {
"atb": true,
"cloud_defender": true,
"v_ciso": true
},
"email": "jsmith@example.com"
}
'import requests
url = "https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
payload = {
"alerts": {
"atb": True,
"cloud_defender": True,
"v_ciso": True
},
"email": "jsmith@example.com"
}
headers = {
"X-Aegister-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Aegister-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
alerts: {atb: true, cloud_defender: true, v_ciso: true},
email: 'jsmith@example.com'
})
};
fetch('https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}', 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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}",
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([
'alerts' => [
'atb' => true,
'cloud_defender' => true,
'v_ciso' => true
],
'email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Aegister-Token: <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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
payload := strings.NewReader("{\n \"alerts\": {\n \"atb\": true,\n \"cloud_defender\": true,\n \"v_ciso\": true\n },\n \"email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Aegister-Token", "<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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}")
.header("X-Aegister-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"alerts\": {\n \"atb\": true,\n \"cloud_defender\": true,\n \"v_ciso\": true\n },\n \"email\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Aegister-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alerts\": {\n \"atb\": true,\n \"cloud_defender\": true,\n \"v_ciso\": true\n },\n \"email\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"error": 0,
"messages": [],
"data": {
"organization": 123,
"user": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": 1,
"messages": [
"Invalid data provided"
]
}{
"error": 1,
"messages": [
9153
]
}{
"error": 1,
"messages": []
}Autorizzazioni
ApiKeyAuthApiKeyQueryParam
Parametri del percorso
If the user is not already registered, this parameter can be 0.
In case is 0, the email field is required in the request body.
Corpo
application/jsonmultipart/form-data
Define user role inside the organization.
Assignable roles are:
owner: can manage all aspect of the organizationsecurity_officer: can edit basic informations of the organizationviewer: can only view informations of the organization
Opzioni disponibili:
viewer, security_officer, owner Alert areas to sign this member up for, or off.
Merged with what is already stored, so sending one area leaves the others untouched.
An area the organization holds no licence for is rejected with 400.
Show child attributes
Show child attributes
This is required if userid path parameter is 0.

