Activate a tested SSO configuration
curl --request POST \
--url https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"enforce_sso": true
}
'import requests
url = "https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate"
payload = { "enforce_sso": True }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({enforce_sso: true})
};
fetch('https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate', 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.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate",
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([
'enforce_sso' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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 := "https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate"
payload := strings.NewReader("{\n \"enforce_sso\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enforce_sso\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enforce_sso\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"protocol": "saml",
"saml": {
"idp_entity_id": "<string>",
"idp_metadata_url": "<string>",
"idp_sso_url": "<string>",
"idp_certificates": [
{
"fingerprint_sha256": "<string>",
"not_after": "2023-11-07T05:31:56Z"
}
],
"attribute_mapping": {}
},
"oidc": {
"issuer": "<string>",
"client_id": "<string>",
"client_secret_set": true,
"scopes": "<string>"
},
"sp": {
"entity_id": "<string>",
"acs_url": "<string>",
"metadata_url": "<string>",
"login_url": "<string>",
"callback_url": "<string>",
"certificate": "<string>",
"certificate_expires_at": "2023-11-07T05:31:56Z"
},
"last_test": {
"at": "2023-11-07T05:31:56Z",
"success": true,
"error": "<string>"
},
"created": "2023-11-07T05:31:56Z",
"modified": "2023-11-07T05:31:56Z",
"status": "draft",
"enforce_sso": true,
"allow_idp_initiated": true,
"allow_jit_provisioning": true,
"default_organization_role": "organization_guest",
"email_domains": [
"<string>"
],
"domains_verified": true,
"metadata_last_fetched_at": "2023-11-07T05:31:56Z"
}SSO
Activate a tested SSO configuration
POST
/
v1
/
organizations
/
{organization_id}
/
sso
/
activate
Activate a tested SSO configuration
curl --request POST \
--url https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"enforce_sso": true
}
'import requests
url = "https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate"
payload = { "enforce_sso": True }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({enforce_sso: true})
};
fetch('https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate', 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.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate",
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([
'enforce_sso' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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 := "https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate"
payload := strings.NewReader("{\n \"enforce_sso\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enforce_sso\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enforce_sso\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"protocol": "saml",
"saml": {
"idp_entity_id": "<string>",
"idp_metadata_url": "<string>",
"idp_sso_url": "<string>",
"idp_certificates": [
{
"fingerprint_sha256": "<string>",
"not_after": "2023-11-07T05:31:56Z"
}
],
"attribute_mapping": {}
},
"oidc": {
"issuer": "<string>",
"client_id": "<string>",
"client_secret_set": true,
"scopes": "<string>"
},
"sp": {
"entity_id": "<string>",
"acs_url": "<string>",
"metadata_url": "<string>",
"login_url": "<string>",
"callback_url": "<string>",
"certificate": "<string>",
"certificate_expires_at": "2023-11-07T05:31:56Z"
},
"last_test": {
"at": "2023-11-07T05:31:56Z",
"success": true,
"error": "<string>"
},
"created": "2023-11-07T05:31:56Z",
"modified": "2023-11-07T05:31:56Z",
"status": "draft",
"enforce_sso": true,
"allow_idp_initiated": true,
"allow_jit_provisioning": true,
"default_organization_role": "organization_guest",
"email_domains": [
"<string>"
],
"domains_verified": true,
"metadata_last_fetched_at": "2023-11-07T05:31:56Z"
}Authorizations
Path Parameters
A UUID string identifying the organization.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data*/*
Response
200 - application/json
Maximum string length:
64Pattern:
^[-a-zA-Z0-9_]+$saml- samloidc- oidc
Available options:
saml, oidc Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
draft- drafttested- testedactive- activedisabled- disabled
Available options:
draft, tested, active, disabled organization_guest- Organization Guestorganization_viewer- Organization Viewerorganization_editor- Organization Editororganization_owner- Organization Owner
Available options:
organization_guest, organization_viewer, organization_editor, organization_owner Maximum string length:
255Was this page helpful?
⌘I