Create or replace the SSO configuration of an organization
curl --request PUT \
--url https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"email_domains": [
"<string>"
],
"allow_idp_initiated": true,
"allow_jit_provisioning": true,
"enforce_sso": true,
"saml": {
"idp_metadata_url": "<string>",
"idp_metadata_xml": "<string>",
"attribute_mapping": {}
},
"oidc": {
"issuer": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": "<string>",
"attribute_mapping": {}
}
}
'import requests
url = "https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso"
payload = {
"email_domains": ["<string>"],
"allow_idp_initiated": True,
"allow_jit_provisioning": True,
"enforce_sso": True,
"saml": {
"idp_metadata_url": "<string>",
"idp_metadata_xml": "<string>",
"attribute_mapping": {}
},
"oidc": {
"issuer": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": "<string>",
"attribute_mapping": {}
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_domains: ['<string>'],
allow_idp_initiated: true,
allow_jit_provisioning: true,
enforce_sso: true,
saml: {
idp_metadata_url: '<string>',
idp_metadata_xml: '<string>',
attribute_mapping: {}
},
oidc: {
issuer: '<string>',
client_id: '<string>',
client_secret: '<string>',
scopes: '<string>',
attribute_mapping: {}
}
})
};
fetch('https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email_domains' => [
'<string>'
],
'allow_idp_initiated' => true,
'allow_jit_provisioning' => true,
'enforce_sso' => true,
'saml' => [
'idp_metadata_url' => '<string>',
'idp_metadata_xml' => '<string>',
'attribute_mapping' => [
]
],
'oidc' => [
'issuer' => '<string>',
'client_id' => '<string>',
'client_secret' => '<string>',
'scopes' => '<string>',
'attribute_mapping' => [
]
]
]),
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"
payload := strings.NewReader("{\n \"email_domains\": [\n \"<string>\"\n ],\n \"allow_idp_initiated\": true,\n \"allow_jit_provisioning\": true,\n \"enforce_sso\": true,\n \"saml\": {\n \"idp_metadata_url\": \"<string>\",\n \"idp_metadata_xml\": \"<string>\",\n \"attribute_mapping\": {}\n },\n \"oidc\": {\n \"issuer\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"<string>\",\n \"attribute_mapping\": {}\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email_domains\": [\n \"<string>\"\n ],\n \"allow_idp_initiated\": true,\n \"allow_jit_provisioning\": true,\n \"enforce_sso\": true,\n \"saml\": {\n \"idp_metadata_url\": \"<string>\",\n \"idp_metadata_xml\": \"<string>\",\n \"attribute_mapping\": {}\n },\n \"oidc\": {\n \"issuer\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"<string>\",\n \"attribute_mapping\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_domains\": [\n \"<string>\"\n ],\n \"allow_idp_initiated\": true,\n \"allow_jit_provisioning\": true,\n \"enforce_sso\": true,\n \"saml\": {\n \"idp_metadata_url\": \"<string>\",\n \"idp_metadata_xml\": \"<string>\",\n \"attribute_mapping\": {}\n },\n \"oidc\": {\n \"issuer\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"<string>\",\n \"attribute_mapping\": {}\n }\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"
}{
"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
Create or replace the SSO configuration of an organization
PUT
/
v1
/
organizations
/
{organization_id}
/
sso
Create or replace the SSO configuration of an organization
curl --request PUT \
--url https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"email_domains": [
"<string>"
],
"allow_idp_initiated": true,
"allow_jit_provisioning": true,
"enforce_sso": true,
"saml": {
"idp_metadata_url": "<string>",
"idp_metadata_xml": "<string>",
"attribute_mapping": {}
},
"oidc": {
"issuer": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": "<string>",
"attribute_mapping": {}
}
}
'import requests
url = "https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso"
payload = {
"email_domains": ["<string>"],
"allow_idp_initiated": True,
"allow_jit_provisioning": True,
"enforce_sso": True,
"saml": {
"idp_metadata_url": "<string>",
"idp_metadata_xml": "<string>",
"attribute_mapping": {}
},
"oidc": {
"issuer": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": "<string>",
"attribute_mapping": {}
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_domains: ['<string>'],
allow_idp_initiated: true,
allow_jit_provisioning: true,
enforce_sso: true,
saml: {
idp_metadata_url: '<string>',
idp_metadata_xml: '<string>',
attribute_mapping: {}
},
oidc: {
issuer: '<string>',
client_id: '<string>',
client_secret: '<string>',
scopes: '<string>',
attribute_mapping: {}
}
})
};
fetch('https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email_domains' => [
'<string>'
],
'allow_idp_initiated' => true,
'allow_jit_provisioning' => true,
'enforce_sso' => true,
'saml' => [
'idp_metadata_url' => '<string>',
'idp_metadata_xml' => '<string>',
'attribute_mapping' => [
]
],
'oidc' => [
'issuer' => '<string>',
'client_id' => '<string>',
'client_secret' => '<string>',
'scopes' => '<string>',
'attribute_mapping' => [
]
]
]),
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"
payload := strings.NewReader("{\n \"email_domains\": [\n \"<string>\"\n ],\n \"allow_idp_initiated\": true,\n \"allow_jit_provisioning\": true,\n \"enforce_sso\": true,\n \"saml\": {\n \"idp_metadata_url\": \"<string>\",\n \"idp_metadata_xml\": \"<string>\",\n \"attribute_mapping\": {}\n },\n \"oidc\": {\n \"issuer\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"<string>\",\n \"attribute_mapping\": {}\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email_domains\": [\n \"<string>\"\n ],\n \"allow_idp_initiated\": true,\n \"allow_jit_provisioning\": true,\n \"enforce_sso\": true,\n \"saml\": {\n \"idp_metadata_url\": \"<string>\",\n \"idp_metadata_xml\": \"<string>\",\n \"attribute_mapping\": {}\n },\n \"oidc\": {\n \"issuer\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"<string>\",\n \"attribute_mapping\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shareofmodel.ai/v1/organizations/{organization_id}/sso")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_domains\": [\n \"<string>\"\n ],\n \"allow_idp_initiated\": true,\n \"allow_jit_provisioning\": true,\n \"enforce_sso\": true,\n \"saml\": {\n \"idp_metadata_url\": \"<string>\",\n \"idp_metadata_xml\": \"<string>\",\n \"attribute_mapping\": {}\n },\n \"oidc\": {\n \"issuer\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"<string>\",\n \"attribute_mapping\": {}\n }\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"
}{
"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*/*
saml- samloidc- oidc
Available options:
saml, oidc Maximum string length:
255organization_guest- Organization Guestorganization_viewer- Organization Viewerorganization_editor- Organization Editor
Available options:
organization_guest, organization_viewer, organization_editor Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
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