Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameSourceMandatoryTypeSpecial FormatDescription
nameBodyYESStringN/ATenant Name
descriptionBodyYESStringN/ATenant Description
codeBodyNOStringN/ATenant Code
typeBodyNOYESString
"enum": ["product", "client"]
Tenant Type
tagBodyNOStringN/ATenant Tag
consoleBodyNOBooleanTrue or FalseTenant is Console or not.
mainTenantBodyNOStringN/AName of Main Tenant if the new Tenant is a subtenant
profileBodyNOObjectN/A
oauthBodyNOObjectCheck Nested Table BelowOAuth access delegations


NameMandatoryTypeSpecial FormatDescription
secretYESStringN/AString for secret of oauth
redirectURIYESStringN/AURL for redirection
grantsYESArrayArray of Strings
disabledYESInteger"enum": [0, 1]Tenant Code
typeYESInteger

"enum": [1, 2]

Tenant Type
loginModeYESInteger"enum": ["urac", "oauth"]Login Technology
pinNOObjectN/APin Configuration


applicationBodyNOObjectCheck Nested Table BelowTenant Application


"key": { %environment,,External
NameMandatoryTypeSpecial FormatDescription
descriptionNoStringN/AApplication Description
productCodeYESStringN/AApplication Product Code
productPackagepackageCodeYESStringN/AApplication Product Package
_TTLYESString"enum": ['6', '12', '24', '48', '72', '96', '120', '144', '168']
appKeyNOObject


Code Block
languagejs
titleappKey Object
"key": {
	"key": %KEY%,
	"config": {}
}
Application KeyextKeyYESObject
Code Block
languagejs
titleKey Object

		"label": %key_label%,
		"env": 
%environemnt_name%

		"expDate": %expiry_date%

		"device": %device_name%,
		"geo": %geo_location% 
	}
}


Application Key


Output

...

Response

SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response 

...

Code Block
languagejs
titleValid Response Sample
linenumberstrue
collapsetrue
{ 
  result: true,
  data:
   {
	_id: '5c0e74ba9acc3c5a84a51259',
	type: "product",
	code: "DBTN",
	name: "Console Tenant",
	description: "This is the tenant  [ 
	 { 
	   _id: '5d7fa308d5ee5a3d2ca439da',
       oauth: {
			secret: "%secret%that holds the access rights and configuration for the console users with DSBRD_GUEST as Guest default package",
	oauth: {
		secret: "this is a secret",
		pin: {
			DSBRD: {
				enabled: false
			}
		},
		disabled: 0,
		type: 2,
		loginMode: "urac"
	},
	applications: [
		{
			product: "DSBRD",
			package: "DSBRD_GUEST",
			redirectURI: "http://domain.comdescription: "Dashboard application for DSBRD_GUEST package",
			appId: "5c0e74ba9acc3c5a84a5125a",
			grants_TTL: 604800000,
			keys: [
				{
				"password",
				"refresh_token"
			],
			disabled: 0,
			type: 2.0,
			loginMode: "urac"
       },
       code: 'test',
       name: 'Test Tenant',
       description: 'this is a description for test tenant',
       applications: [Array] 
	 } 
   ] 	key: "a139786a6e6d18e48b4987e83789430b",
					extKeys: [
						{
							extKey: "3d90163cf9d6b3076ad26aa5ed58556348069258e5c6c941ee0f18448b570ad1c5c790e2d2a1989680c55f4904e2005ff5f8e71606e4aa641e67882f4210ebbc5460ff305dcb36e6ec2a2299cf0448ef60b9e38f41950ec251c1cf41f05f3ce9",
							device: null,
							geo: null,
							env: "DASHBOARD",
							dashboardAccess: true,
							expDate: null
						}
					],
					config: {
						dashboard: {
							oauth: {
								loginMode: "urac"
							},
							commonFields: {
								mail: {
									from: "me@localhost.com",
									transport: {
										type: "sendmail",
										options: {

										}
									}
								}
							},
							urac: {
								hashIterations: 1024,
								seedLength: 32,
								link: {
									addUser: "http://dashboard.soajs.org:80/#/setNewPassword",
									changeEmail: "http://dashboard.soajs.org:80/#/changeEmail/validate",
									forgotPassword: "http://dashboard.soajs.org:80/#/resetPassword",
									join: "http://dashboard.soajs.org:80/#/join/validate"
								},
								tokenExpiryTTL: 172800000,
								validateJoin: true,
								mail: {
									join: {
										subject: "Welcome to SOAJS",
										path: "undefined/soajs/node_modules/soajs.urac/mail/urac/join.tmpl"
									},
									forgotPassword: {
										subject: "Reset Your Password at SOAJS",
										path: "undefined/soajs/node_modules/soajs.urac/mail/urac/forgotPassword.tmpl"
									},
									addUser: {
										subject: "Account Created at SOAJS",
										path: "undefined/soajs/node_modules/soajs.urac/mail/urac/addUser.tmpl"
									},
									changeUserStatus: {
										subject: "Account Status changed at SOAJS",
										path: "undefined/soajs/node_modules/soajs.urac/mail/urac/changeUserStatus.tmpl"
									},
									changeEmail: {
										subject: "Change Account Email at SOAJS",
										path: "undefined/soajs/node_modules/soajs.urac/mail/urac/changeEmail.tmpl"
									}
								}
							}
						}
					}
				}
			]
		}
	],
	tag: "Console",
	console: true
}
}

Invalid Response

Code Block
languagejs
titleError Response Sample
linenumberstrue
collapsetrue
{
    "result":false,
    "errors":{
        "codes":[602],
        "details":[
            {
                "code":602,
                "message":"Model error: + %model_error%"
            }
        ]
    }
}

...