Auth API
SaaSus Auth API Schema (1.0.0)
Schema
Get Basic Configurations
Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated.
Authorizations:
Responses
Response samples
- 200
- 500
{- "domain_name": "dev.saasus.io",
- "is_dns_validated": false,
- "certificate_dns_record": {
- "type": "CNAME",
- "name": "_k90jaskdfawehro.domain-of-saasus-client.com.",
- "value": "_cmojwc239j102mosd9.acm-validations.aws."
}, - "cloud_front_dns_record": {
- "type": "CNAME",
- "name": "_k90jaskdfawehro.domain-of-saasus-client.com.",
- "value": "_cmojwc239j102mosd9.acm-validations.aws."
}, - "dkim_dns_records": [
- {
- "type": "CNAME",
- "name": "_k90jaskdfawehro.domain-of-saasus-client.com.",
- "value": "_cmojwc239j102mosd9.acm-validations.aws."
}
], - "default_domain_name": "d78bh0l3saarv.cloudfront.net",
- "from_email_address": "test@example.com",
- "reply_email_address": "test@example.com",
- "is_ses_sandbox_granted": false
}
Update Basic Configurations
Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior.
Authorizations:
Request Body schema: application/json
domain_name required | string Domain Name |
from_email_address required | string Sender email of authentication email |
reply_email_address | string Reply-from email address of authentication email |
Responses
Request samples
- Payload
{- "domain_name": "dev.saasus.io",
- "from_email_address": "test@example.com",
- "reply_email_address": "test@example.com"
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Response samples
- 200
- 500
{- "sign_up": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "create_user": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "resend_code": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "forgot_password": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "update_user_attribute": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "verify_user_attribute": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "authentication_mfa": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "invite_tenant_user": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "verify_external_user": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}
}
Update Notification Email Template
Update notification email template.
Authorizations:
Request Body schema: application/json
object (MessageTemplate) | |
object (MessageTemplate) | |
object (MessageTemplate) | |
object (MessageTemplate) | |
object (MessageTemplate) | |
object (MessageTemplate) | |
object (MessageTemplate) | |
object (MessageTemplate) | |
object (MessageTemplate) |
Responses
Request samples
- Payload
{- "sign_up": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "create_user": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "resend_code": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "forgot_password": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "update_user_attribute": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "verify_user_attribute": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "authentication_mfa": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "invite_tenant_user": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}, - "verify_external_user": {
- "subject": "Verify your new account",
- "message": "The verification code to your new account is {####}"
}
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Get Authentication Page Setting
Get the authentication screen setting information (new registration, login, password reset, etc.).
Authorizations:
Responses
Response samples
- 200
- 500
{- "sign_up_page": {
- "html_contents": "<html><div>画面内容</div></html>",
- "is_terms_of_service": true,
- "is_privacy_policy": true
}, - "sign_in_page": {
- "html_contents": "<html><div>画面内容</div></html>",
- "is_terms_of_service": true,
- "is_privacy_policy": true
}, - "password_reset_page": {
- "html_contents": "<html><div>画面内容</div></html>",
- "is_terms_of_service": true,
- "is_privacy_policy": true
}
}
Authentication Page Setting
Update the authentication page setting information (new registration, login, password reset, etc.).
Authorizations:
Request Body schema: application/json
object (CustomizePageProps) | |
object (CustomizePageProps) | |
object (CustomizePageProps) |
Responses
Request samples
- Payload
{- "sign_up_page": {
- "html_contents": "<html><div>画面内容</div></html>",
- "is_terms_of_service": true,
- "is_privacy_policy": true
}, - "sign_in_page": {
- "html_contents": "<html><div>画面内容</div></html>",
- "is_terms_of_service": true,
- "is_privacy_policy": true
}, - "password_reset_page": {
- "html_contents": "<html><div>画面内容</div></html>",
- "is_terms_of_service": true,
- "is_privacy_policy": true
}
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Update Authentication Authorization Basic Information
Update authentication authorization basic information.
Authorizations:
Request Body schema: application/json
icon required | string <base64> service icon |
favicon required | string <base64> favicon |
title required | string service name |
terms_of_service_url required | string terms of service URL |
privacy_policy_url required | string privacy policy URL |
google_tag_manager_container_id required | string Google Tag Manager container ID |
Responses
Request samples
- Payload
{- "icon": "data:image/png;base64,ZDMiIHN0UmVmOmRvY3VtZW50SUQ9Inhtc==",
- "favicon": "data:image/png;base64,ZDMiIHN0UmVmOmRvY3VtZW50SUQ9Inhtc==",
- "title": "SaaSus",
- "google_tag_manager_container_id": "GTM-XXXXXXX"
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Update Authentication Info
Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK.
Authorizations:
Request Body schema: application/json
callback_url required | string Redirect After Authentication |
Responses
Request samples
- Payload
{
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Get Sign-In Information Via External Provider
Get sign-in information via external provider set in cognito.
Authorizations:
Responses
Response samples
- 200
- 500
{- "google": {
- "application_id": 1234567890123456,
- "application_secret": "123456789b00def123456a12345678d1",
- "approval_scope": "profile email openid",
- "is_button_hidden": false
}
}
Update Sign-In Information
Update the sign-in information for the external ID provider
Authorizations:
Request Body schema: application/json
provider required | string (ProviderName) Value: "Google" |
object (IdentityProviderProps) |
Responses
Request samples
- Payload
{- "provider": "Google",
- "identity_provider_props": {
- "application_id": 1234567890123456,
- "application_secret": "123456789b00def123456a12345678d1",
- "approval_scope": "profile email openid",
- "is_button_hidden": false
}
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Get Password Requirements
Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols.
Authorizations:
Responses
Response samples
- 200
- 500
{- "password_policy": {
- "minimum_length": 10,
- "is_require_lowercase": true,
- "is_require_numbers": true,
- "is_require_symbols": true,
- "is_require_uppercase": true,
- "temporary_password_validity_days": 10
}, - "device_configuration": {
- "device_remembering": "always"
}, - "mfa_configuration": {
- "mfa_configuration": "on"
}, - "recaptcha_props": {
- "site_key": "ede66c43-9b9d-4222-93ed-5f11c96e08e2",
- "secret_key": "d5794b1b-5f92-4dc6-aa48-085dbb08b813"
}, - "account_verification": {
- "verification_method": "code",
- "sending_to": "email"
}, - "self_regist": {
- "enable": true
}, - "identity_provider_configuration": {
- "domain": "string",
- "redirect_url": "string",
- "entity_id": "string",
- "reply_url": "string"
}
}
Update Password Requirements
Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols.
Authorizations:
Request Body schema: application/json
object (PasswordPolicy) Password Policy | |
object (DeviceConfiguration) Settings for remembering trusted devices | |
object (MfaConfiguration) MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. | |
object (RecaptchaProps) reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. | |
object (AccountVerification) Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. | |
object (SelfRegist) self sign-up permission |
Responses
Request samples
- Payload
{- "password_policy": {
- "minimum_length": 10,
- "is_require_lowercase": true,
- "is_require_numbers": true,
- "is_require_symbols": true,
- "is_require_uppercase": true,
- "temporary_password_validity_days": 10
}, - "device_configuration": {
- "device_remembering": "always"
}, - "mfa_configuration": {
- "mfa_configuration": "on"
}, - "recaptcha_props": {
- "site_key": "ede66c43-9b9d-4222-93ed-5f11c96e08e2",
- "secret_key": "d5794b1b-5f92-4dc6-aa48-085dbb08b813"
}, - "account_verification": {
- "verification_method": "code",
- "sending_to": "email"
}, - "self_regist": {
- "enable": true
}
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Create SaaS User
Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email.
Authorizations:
Request Body schema: application/json
email required | string |
password | string Password |
Responses
Request samples
- Payload
{- "email": "hoge@example.com",
- "password": "@Pass#Word1"
}
Response samples
- 201
- 400
- 500
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "email": "hoge@example.com",
- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}
}
Get User
Get user information based on user ID.
Authorizations:
path Parameters
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Responses
Response samples
- 200
- 404
- 500
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "email": "hoge@example.com",
- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}
}
Delete User
Delete all users with matching user ID from the tenant and SaaS.
Authorizations:
path Parameters
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Responses
Response samples
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Change Password
Change user's login password.
Authorizations:
path Parameters
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Request Body schema: application/json
password required | string Password |
Responses
Request samples
- Payload
{- "password": "@Pass#Word1"
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Change Email
Change user's email.
Authorizations:
path Parameters
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Request Body schema: application/json
email required | string |
Responses
Request samples
- Payload
{- "email": "hoge@example.com"
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Request User Email Update
Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours.
Authorizations:
path Parameters
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Request Body schema: application/json
email required | string Email Address |
access_token required | string (Access Token) |
Responses
Request samples
- Payload
{- "email": "hoge@example.com",
- "access_token": "string"
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Confirm User Email Update
Verify the code to confirm the user's email address update. Requires the user's access token.
Authorizations:
path Parameters
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Request Body schema: application/json
code required | string (Verification Code) |
access_token required | string (Access Token) |
Responses
Request samples
- Payload
{- "code": "123456",
- "access_token": "string"
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Update SaaS User Attributes
Update the additional attributes of the SaaS user.
Authorizations:
path Parameters
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Request Body schema: application/json
required | object Attribute information | ||
|
Responses
Request samples
- Payload
{- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Register Authentication Application
Register an authentication application.
Authorizations:
path Parameters
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Request Body schema: application/json
access_token required | string (Access Token) access token |
verification_code required | string (Verification Code) verification code |
Responses
Request samples
- Payload
{- "access_token": "string",
- "verification_code": "string"
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Create secret code for authentication application registration
Create a secret code for authentication application registration.
Authorizations:
path Parameters
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Request Body schema: application/json
access_token required | string (Access Token) access token |
Responses
Request samples
- Payload
{- "access_token": "string"
}
Response samples
- 201
- 500
{- "secret_code": "string"
}
Update User's MFA Settings
Update user's MFA settings.
Authorizations:
path Parameters
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Request Body schema: application/json
enabled required | boolean (Enable MFA) enable MFA |
method | string (MFA Method) Value: "softwareToken" MFA method (required if enabled is true) |
Responses
Request samples
- Payload
{- "enabled": true,
- "method": "softwareToken"
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Unlink external identity providers
Unlink external identity providers.
Authorizations:
path Parameters
provider_name required | string Example: Google |
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Responses
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Request External User Account Link
Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours.
Authorizations:
Request Body schema: application/json
access_token required | string (Access Token) |
Responses
Request samples
- Payload
{- "access_token": "string"
}
Response samples
- 400
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Confirm External User Account Link
Verify the code for external account user link confirmation.
Authorizations:
Request Body schema: application/json
access_token required | string (Access Token) |
code required | string (Verification Code) |
Responses
Request samples
- Payload
{- "access_token": "string",
- "code": "123456"
}
Response samples
- 400
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Sign Up
Register a new user. A temporary password will be sent to the registered email.
Authorizations:
Request Body schema: application/json
email required | string (Email Address) Email Address |
Responses
Request samples
- Payload
{- "email": "string"
}
Response samples
- 201
- 500
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "email": "hoge@example.com",
- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}
}
Resend Sign Up Confirmation Email
Resend temporary password for the new registered user.
Authorizations:
Request Body schema: application/json
email required | string (Email Address) Email Address |
Responses
Request samples
- Payload
{- "email": "string"
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Sign Up with AWS Marketplace
Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned.
Authorizations:
Request Body schema: application/json
email required | string (Email Address) Email Address |
registration_token required | string (Registration Token) Registration Token |
Responses
Request samples
- Payload
{- "email": "string",
- "registration_token": "string"
}
Response samples
- 201
- 500
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "email": "hoge@example.com",
- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}
}
Confirm Sign Up with AWS Marketplace
Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned.
Authorizations:
Request Body schema: application/json
tenant_name | string (Tenant Name) Tenant name |
access_token required | string (Access Token) Access token |
registration_token required | string (Registration Token) Registration Token |
Responses
Request samples
- Payload
{- "tenant_name": "string",
- "access_token": "string",
- "registration_token": "string"
}
Response samples
- 201
- 500
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "billing_info": {
- "name": "株式会社テストテナント",
- "address": {
- "street": "神宮前1-1-1",
- "city": "渋谷区",
- "state": "東京都",
- "country": "JP",
- "additional_address_info": "オフィスビル3階",
- "postal_code": "123-4567"
}, - "invoice_language": "ja-JP"
}, - "name": "Anti-Pattern Inc.",
- "attributes": {
- "address": "東京都",
- "employee_number": 100
}, - "back_office_staff_email": "hoge@example.com",
- "next_plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "using_next_plan_from": 1640995200,
- "next_plan_tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "proration_behavior": "create_prorations",
- "delete_usage": true,
- "plan_histories": [
- {
- "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "plan_applied_at": 1640995200,
- "tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "proration_behavior": "create_prorations",
- "delete_usage": true
}
]
}
Link an existing tenant with AWS Marketplace
Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned.
Authorizations:
Request Body schema: application/json
tenant_id required | string (Tenant ID) Tenant ID |
access_token required | string (Access Token) Access token |
registration_token required | string (Registration Token) Registration Token |
Responses
Request samples
- Payload
{- "tenant_id": "string",
- "access_token": "string",
- "registration_token": "string"
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Get Users
Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique.
Authorizations:
Responses
Response samples
- 200
- 500
{- "users": [
- {
- "id": "f94bfffc-8be2-11ec-b41a-0242ac120004",
- "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "tenant_name": "saasus",
- "email": "hoge@example.com",
- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}, - "envs": [
- {
- "id": 1,
- "name": "SaaSus dev",
- "display_name": "SaaSus dev",
- "roles": [
- {
- "role_name": "admin",
- "display_name": "管理者"
}
]
}
]
}
]
}
Get User Info
Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object.
Authorizations:
path Parameters
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Responses
Response samples
- 200
- 404
- 500
{- "users": [
- {
- "id": "f94bfffc-8be2-11ec-b41a-0242ac120004",
- "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "tenant_name": "saasus",
- "email": "hoge@example.com",
- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}, - "envs": [
- {
- "id": 1,
- "name": "SaaSus dev",
- "display_name": "SaaSus dev",
- "roles": [
- {
- "role_name": "admin",
- "display_name": "管理者"
}
]
}
]
}
]
}
Get Tenant Users
Get all the users belonging to the tenant. Id is unique.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Responses
Response samples
- 200
- 500
{- "users": [
- {
- "id": "f94bfffc-8be2-11ec-b41a-0242ac120004",
- "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "tenant_name": "saasus",
- "email": "hoge@example.com",
- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}, - "envs": [
- {
- "id": 1,
- "name": "SaaSus dev",
- "display_name": "SaaSus dev",
- "roles": [
- {
- "role_name": "admin",
- "display_name": "管理者"
}
]
}
]
}
]
}
Create Tenant User
Create a tenant user. If attributes is empty, the additional attributes will be created empty.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Request Body schema: application/json
email required | string |
required | object Attribute information (Get information set by defining user attributes in the SaaS development console) |
Responses
Request samples
- Payload
{- "email": "hoge@example.com",
- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}
}
Response samples
- 201
- 500
{- "id": "f94bfffc-8be2-11ec-b41a-0242ac120004",
- "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "tenant_name": "saasus",
- "email": "hoge@example.com",
- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}, - "envs": [
- {
- "id": 1,
- "name": "SaaSus dev",
- "display_name": "SaaSus dev",
- "roles": [
- {
- "role_name": "admin",
- "display_name": "管理者"
}
]
}
]
}
Get Tenant User
Get one tenant user by specific ID.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Responses
Response samples
- 200
- 404
- 500
{- "id": "f94bfffc-8be2-11ec-b41a-0242ac120004",
- "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "tenant_name": "saasus",
- "email": "hoge@example.com",
- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}, - "envs": [
- {
- "id": 1,
- "name": "SaaSus dev",
- "display_name": "SaaSus dev",
- "roles": [
- {
- "role_name": "admin",
- "display_name": "管理者"
}
]
}
]
}
Update Tenant User Attribute
Update tenant user attributes.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Request Body schema: application/json
required | object Attribute information (Get information set by defining user attributes in the SaaS development console) | ||
|
Responses
Request samples
- Payload
{- "attributes": {
- "address": "東京都",
- "birthday": 19940925,
- "sex": "男"
}
}
Response samples
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Delete Tenant User
Delete a user from the tenant.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
Responses
Response samples
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Create Tenant User Role
Create roles on tenant users.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
env_id required | integer (Id) Example: 1 Env ID |
Request Body schema: application/json
role_names required | Array of strings Role Info |
Responses
Request samples
- Payload
{- "role_names": [
- "admin"
]
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Remove Role From Tenant User
Remove a role from a tenant user.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
user_id required | string Example: f94bfffc-8be2-11ec-b41a-0242ac120004 User ID |
env_id required | integer (Id) Example: 1 Env ID |
role_name required | string Example: admin Role name |
Responses
Response samples
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Get User Attributes
Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition.
Authorizations:
Responses
Response samples
- 200
- 500
{- "user_attributes": [
- {
- "attribute_name": "birthday",
- "display_name": "Birthday",
- "attribute_type": "string"
}
]
}
Create User Attributes
Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition.
Authorizations:
Request Body schema: application/json
attribute_name required | string Attribute Name |
display_name required | string Display Name |
attribute_type required | string (AttributeType) Enum: "string" "number" "bool" "date" Type (date can be set to YYYY-MM-DD format.) |
Responses
Request samples
- Payload
{- "attribute_name": "birthday",
- "display_name": "Birthday",
- "attribute_type": "string"
}
Response samples
- 201
- 500
{- "attribute_name": "birthday",
- "display_name": "Birthday",
- "attribute_type": "string"
}
Delete User Attribute
Delete user attributes kept on the SaaSus Platform.
Authorizations:
path Parameters
attribute_name required | string Example: birthday Attribute Name |
Responses
Response samples
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Create SaaS User Attributes
Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants.
Authorizations:
Request Body schema: application/json
attribute_name required | string Attribute Name |
display_name required | string Display Name |
attribute_type required | string (AttributeType) Enum: "string" "number" "bool" "date" Type (date can be set to YYYY-MM-DD format.) |
Responses
Request samples
- Payload
{- "attribute_name": "birthday",
- "display_name": "Birthday",
- "attribute_type": "string"
}
Response samples
- 201
- 500
{- "attribute_name": "birthday",
- "display_name": "Birthday",
- "attribute_type": "string"
}
Get Tenant Attributes
Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API.
Authorizations:
Responses
Response samples
- 200
- 500
{- "tenant_attributes": [
- {
- "attribute_name": "birthday",
- "display_name": "Birthday",
- "attribute_type": "string"
}
]
}
Create Tenant Attribute
Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API.
Authorizations:
Request Body schema: application/json
attribute_name required | string Attribute Name |
display_name required | string Display Name |
attribute_type required | string (AttributeType) Enum: "string" "number" "bool" "date" Type (date can be set to YYYY-MM-DD format.) |
Responses
Request samples
- Payload
{- "attribute_name": "birthday",
- "display_name": "Birthday",
- "attribute_type": "string"
}
Response samples
- 201
- 500
{- "attribute_name": "birthday",
- "display_name": "Birthday",
- "attribute_type": "string"
}
Delete Tenant Attribute
Deletes tenant attributes managed by SaaSus Platform.
Authorizations:
path Parameters
attribute_name required | string Example: birthday Attribute Name |
Responses
Response samples
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Get Roles
Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong.
Authorizations:
Responses
Response samples
- 200
- 500
{- "roles": [
- {
- "role_name": "admin",
- "display_name": "管理者"
}
]
}
Create Role
Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong.
Authorizations:
Request Body schema: application/json
role_name required | string role name |
display_name required | string role display name |
Responses
Request samples
- Payload
{- "role_name": "admin",
- "display_name": "管理者"
}
Response samples
- 201
- 500
{- "role_name": "admin",
- "display_name": "管理者"
}
Response samples
- 200
- 500
{- "tenants": [
- {
- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "billing_info": {
- "name": "株式会社テストテナント",
- "address": {
- "street": "神宮前1-1-1",
- "city": "渋谷区",
- "state": "東京都",
- "country": "JP",
- "additional_address_info": "オフィスビル3階",
- "postal_code": "123-4567"
}, - "invoice_language": "ja-JP"
}, - "name": "Anti-Pattern Inc.",
- "attributes": {
- "address": "東京都",
- "employee_number": 100
}, - "back_office_staff_email": "hoge@example.com",
- "next_plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "using_next_plan_from": 1640995200,
- "next_plan_tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "proration_behavior": "create_prorations",
- "delete_usage": true,
- "plan_histories": [
- {
- "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "plan_applied_at": 1640995200,
- "tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "proration_behavior": "create_prorations",
- "delete_usage": true
}
]
}
]
}
Create Tenant
Create a tenant managed by the SaaSus Platform.
Authorizations:
Request Body schema: application/json
name required | string tenant name |
required | object attribute info |
back_office_staff_email required | string administrative staff email address |
Responses
Request samples
- Payload
{- "name": "Anti-Pattern Inc.",
- "attributes": {
- "address": "東京都",
- "employee_number": 100
}, - "back_office_staff_email": "hoge@example.com"
}
Response samples
- 201
- 500
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "billing_info": {
- "name": "株式会社テストテナント",
- "address": {
- "street": "神宮前1-1-1",
- "city": "渋谷区",
- "state": "東京都",
- "country": "JP",
- "additional_address_info": "オフィスビル3階",
- "postal_code": "123-4567"
}, - "invoice_language": "ja-JP"
}, - "name": "Anti-Pattern Inc.",
- "attributes": {
- "address": "東京都",
- "employee_number": 100
}, - "back_office_staff_email": "hoge@example.com",
- "next_plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "using_next_plan_from": 1640995200,
- "next_plan_tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "proration_behavior": "create_prorations",
- "delete_usage": true,
- "plan_histories": [
- {
- "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "plan_applied_at": 1640995200,
- "tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "proration_behavior": "create_prorations",
- "delete_usage": true
}
]
}
Get Tenant Details
Get the details of tenant managed on the SaaSus Platform.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Responses
Response samples
- 200
- 404
- 500
{- "current_plan_period_start": 1672531200,
- "current_plan_period_end": 1675209600,
- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "billing_info": {
- "name": "株式会社テストテナント",
- "address": {
- "street": "神宮前1-1-1",
- "city": "渋谷区",
- "state": "東京都",
- "country": "JP",
- "additional_address_info": "オフィスビル3階",
- "postal_code": "123-4567"
}, - "invoice_language": "ja-JP"
}, - "name": "Anti-Pattern Inc.",
- "attributes": {
- "address": "東京都",
- "employee_number": 100
}, - "back_office_staff_email": "hoge@example.com",
- "next_plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "using_next_plan_from": 1640995200,
- "next_plan_tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "proration_behavior": "create_prorations",
- "delete_usage": true,
- "plan_histories": [
- {
- "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "plan_applied_at": 1640995200,
- "tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "proration_behavior": "create_prorations",
- "delete_usage": true
}
]
}
Update Tenant Details
Update SaaSus Platform tenant details.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Request Body schema: application/json
name required | string tenant name |
required | object attribute info |
back_office_staff_email required | string administrative staff email address |
Responses
Request samples
- Payload
{- "name": "Anti-Pattern Inc.",
- "attributes": {
- "address": "東京都",
- "employee_number": 100
}, - "back_office_staff_email": "hoge@example.com"
}
Response samples
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Delete Tenant
Delete SaaSus Platform tenant.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Responses
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Update Tenant Plan Information
Update SaaSus Platform tenant plan information.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Request Body schema: application/json
next_plan_id | string (Uuid) |
using_next_plan_from | integer Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) |
next_plan_tax_rate_id | string (Uuid) |
proration_behavior | string (Proration Behavior When Changing Plans) Enum: "create_prorations" "none" "always_invoice" If you have a strine linkage, you can set the behavior of the proportional allocation when changing plans. When a plan is changed, you can set whether to prorate the billing amount and reflect it on the next invoice, to issue a prorated invoice immediately, or not to prorate at all. |
delete_usage | boolean (Proration Behavior When Changing Plans) If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. |
Responses
Request samples
- Payload
{- "next_plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "using_next_plan_from": 1640995200,
- "next_plan_tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "proration_behavior": "create_prorations",
- "delete_usage": true
}
Response samples
- 400
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Update Tenant Billing Information
Update SaaSus Platform tenant billing information.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Request Body schema: application/json
name required | string Tenant name for billing |
required | object (Tenant Billing Address) |
invoice_language required | string (InvoiceLanguage) Enum: "ja-JP" "en-US" Language of invoice |
Responses
Request samples
- Payload
{- "name": "株式会社テストテナント",
- "address": {
- "street": "神宮前1-1-1",
- "city": "渋谷区",
- "state": "東京都",
- "country": "JP",
- "additional_address_info": "オフィスビル3階",
- "postal_code": "123-4567"
}, - "invoice_language": "ja-JP"
}
Response samples
- 400
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Get identity provider per tenant
Get sign-in information via external identity provider per tenant.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Responses
Response samples
- 200
- 500
{- "saml": {
- "email_attribute": "email"
}
}
Update identity provider per tenant
Update sign-in information via external identity provider per tenant.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Request Body schema: application/json
provider_type required | string (ProviderType) Value: "SAML" |
SAML Identity Provider (object) (Tenant Identity Provider) |
Responses
Request samples
- Payload
{- "provider_type": "SAML",
- "identity_provider_props": {
- "email_attribute": "email"
}
}
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Delete all information related to rate plans
Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed.
Authorizations:
Responses
Response samples
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Get Stripe Customer
Get the Stripe Customer information associated with the tenant, including their subscriptions.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Responses
Response samples
- 200
- 500
{- "customer_id": "cus_1234567890",
- "subscription_schedule_id": "cus_1234567890"
}
Get Env Info
Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation.
Authorizations:
Responses
Response samples
- 200
- 500
{- "envs": [
- {
- "id": 1,
- "name": "saasus_dev",
- "display_name": "SaaSus dev"
}
]
}
Create Env Info
Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation.
Authorizations:
Request Body schema: application/json
id required | integer (Id) |
name required | string env name |
display_name | string env display name |
Responses
Request samples
- Payload
{- "id": 1,
- "name": "saasus_dev",
- "display_name": "SaaSus dev"
}
Response samples
- 201
- 500
{- "id": 1,
- "name": "saasus_dev",
- "display_name": "SaaSus dev"
}
Update Env Info
Update env info.
Authorizations:
path Parameters
env_id required | integer (Id) Example: 1 Env ID |
Request Body schema: application/json
name required | string env name |
display_name | string env display name |
Responses
Request samples
- Payload
{- "name": "saasus_dev",
- "display_name": "SaaSus dev"
}
Response samples
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Get Authentication/Authorization Information
Get ID token, access token, and refresh token using a temporary code or a refresh token.
Authorizations:
query Parameters
code | string (Uuid) Example: code=69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Temp Code |
auth-flow | string Enum: "tempCodeAuth" "refreshTokenAuth" Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth |
refresh-token | string Refresh Token |
Responses
Response samples
- 200
- 404
- 500
{- "id_token": "string",
- "access_token": "string",
- "refresh_token": "string"
}
Save Authentication/Authorization Information
Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance.
Authorizations:
Request Body schema: application/json
id_token required | string (ID Token) ID token |
access_token required | string (Access Token) Access token |
refresh_token | string (Refresh Token) Refresh token |
Responses
Request samples
- Payload
{- "id_token": "string",
- "access_token": "string",
- "refresh_token": "string"
}
Response samples
- 201
- 400
- 401
- 500
{- "code": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775"
}
Get Tenant Invitations
Get a list of invitations to the tenant.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Responses
Response samples
- 200
- 500
{- "invitations": [
- {
- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "email": "test@example.com",
- "envs": [
- {
- "id": 1,
- "name": "SaaSus dev",
- "display_name": "SaaSus dev",
- "roles": [
- {
- "role_name": "admin",
- "display_name": "管理者"
}
]
}
], - "expired_at": 1640995200,
- "status": "pending"
}
]
}
Create Tenant Invitation
Create an invitation to the tenant.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
Request Body schema: application/json
email required | string (Email Address) Email address of the user to be invited |
access_token required | string (Access Token) Access token of the user who creates an invitation |
required | Array of objects (Invited User Environment Information) |
Responses
Request samples
- Payload
{- "email": "test@example.com",
- "access_token": "string",
- "envs": [
- {
- "id": 1,
- "role_names": [
- "admin"
]
}
]
}
Response samples
- 201
- 400
- 500
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "email": "test@example.com",
- "envs": [
- {
- "id": 1,
- "name": "SaaSus dev",
- "display_name": "SaaSus dev",
- "roles": [
- {
- "role_name": "admin",
- "display_name": "管理者"
}
]
}
], - "expired_at": 1640995200,
- "status": "pending"
}
Get Tenant Invitation
Get invitation information for the tenant.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
invitation_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Invitation ID |
Responses
Response samples
- 200
- 404
- 500
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "email": "test@example.com",
- "envs": [
- {
- "id": 1,
- "name": "SaaSus dev",
- "display_name": "SaaSus dev",
- "roles": [
- {
- "role_name": "admin",
- "display_name": "管理者"
}
]
}
], - "expired_at": 1640995200,
- "status": "pending"
}
Delete Tenant Invitation
Delete an invitation for the tenant.
Authorizations:
path Parameters
tenant_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Tenant ID |
invitation_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Invitation ID |
Responses
Response samples
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Validate Invitation
Validate an invitation to the tenant.
Authorizations:
path Parameters
invitation_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 Invitation ID |
Request Body schema: application/json
access_token | string (Access Token) Access token of the invited user |
string (Email Address) Email address of the invited user | |
password | string (Password) Password of the invited user |
Responses
Request samples
- Payload
{- "access_token": "string",
- "email": "test@example.com",
- "password": "string"
}
Response samples
- 400
- 404
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Response samples
- 200
- 500
{- "enabled": true,
- "role_arn": "arn:aws:iam::123456789012:role/role-name",
- "cloudformation_template_url": "https://presigned-url-test.s3.ap-northeast-1.amazonaws.com/test.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxx%2F20230710%2Fap-northeast-1%2Fs3%2Faws4_request&X-Amz-Date=20230710T054140Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=xxxxxxxxxxxxxxxx",
- "role_external_id": 1234567890
}
Update configuration information for single-tenant functionality
Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled.
Authorizations:
Request Body schema: application/json
enabled | boolean (Enable Single Tenant settings or Not) enable Single Tenant settings or not |
role_arn | string (ARN of the role to be AssumeRole) ARN of the role for SaaS Platform to AssumeRole |
cloudformation_template | string <base64> (CloudFormation template file) CloudFormation template file |
ddl_template | string <base64> (ddl template file) ddl file to run in SaaS environment |
role_external_id | string (External id to use when AssumeRole) External id used by SaaSus when AssumeRole to operate SaaS |
Responses
Request samples
- Payload
{- "enabled": true,
- "role_arn": "arn:aws:iam::123456789012:role/role-name",
- "cloudformation_template": "U3dhZ2dlciByb2Nrcw==",
- "ddl_template": "U3dhZ2dlciByb2Nrcw==",
- "role_external_id": 1234567890
}
Response samples
- 400
- 500
{- "type": "string",
- "message": "string",
- "data": {
- "sign_in_page_url": "auth.dev.saasus.io"
}
}
Get User Info
User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it.
Authorizations:
query Parameters
token required | string ID Token |
Responses
Response samples
- 200
- 401
- 500
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "email": "hoge@example.com",
- "user_attribute": {
- "address": "東京都",
- "employee_number": 100
}, - "tenants": [
- {
- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "name": "Anti-Pattern Inc.",
- "completed_sign_up": true,
- "envs": [
- {
- "id": 1,
- "name": "SaaSus dev",
- "display_name": "SaaSus dev",
- "roles": [
- {
- "role_name": "admin",
- "display_name": "管理者"
}
]
}
], - "user_attribute": {
- "address": "東京都",
- "employee_number": 100
}, - "back_office_staff_email": "hoge@example.com",
- "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "is_paid": true
}
]
}
Get User Info by Email
Get user information by email address.
Authorizations:
query Parameters
email required | string |
Responses
Response samples
- 200
- 404
- 500
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "email": "hoge@example.com",
- "user_attribute": {
- "address": "東京都",
- "employee_number": 100
}, - "tenants": [
- {
- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "name": "Anti-Pattern Inc.",
- "completed_sign_up": true,
- "envs": [
- {
- "id": 1,
- "name": "SaaSus dev",
- "display_name": "SaaSus dev",
- "roles": [
- {
- "role_name": "admin",
- "display_name": "管理者"
}
]
}
], - "user_attribute": {
- "address": "東京都",
- "employee_number": 100
}, - "back_office_staff_email": "hoge@example.com",
- "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "is_paid": true
}
]
}