Skip to main content

Login Services

Most Cantara endpoints require an authenticated session. To authenticate you must call Login service , You can login via the use of an authentication token string or using a password. 

Login

Endpoint: http(s)://[hostname]:[port]/[context]/service/[version]/server/login/[environment] 

Method: POST

Content-Type: application/json or application/xml

Accept: application/json or application/xml

Path Parameters

ParameterDescription
hostnameCantara worker hostname
portCantara worker listening port (only required if non-standard HTTP/s port
context

Cantara worker web application context

versionCantara worker API version
environmentCantara access environment. Refer to the Managing Environments topic for more information.(Example - E1DEV)

On This Page

Warning:

User sessions expire after a timeout period that is defined by the session expiry on the Java application server instance that the Cantara Access Server is deployed on. Once the timeout period has been reached, your application must reestablish the session with Cantara by consuming the login service again. You can choose to either resubmit the users login credentials or make use of the login token if it is enable on the server.

Request Body

JS
{
    "name": "Login",
    "cantaraVersion": "5.1",
    "tenantId": 0,
    "apiKey": "",
    "Parameter": [{
            "value": "",
            "name": "username"
        },
        {
            "value": "",
            "name": "password"
        },
        {
            "value": "",
            "name": "token"
        },
        {
            "value": "",
            "name": "application"
        },
        {
            "value": "",
            "name": "fcmRegistrationId"
        }
    ]
}

Request Body Parameters

PathDescription
nameFunction service name
cantaraVersionCantara platform version
tenantIdCantara Tenant ID (The Tenant ID and API Key can be retrieved from the customer portal.)
apiKeyCantara Tenant API Key (The Tenant ID and API Key can be retrieved from the customer portal.)
ParameterLogin request parameters
Parameter.usernameParameter username (required) should be the credentials of a valid JDE user that can log into the environment you are trying to connect to.
Parameter.passwordpassword should be the credentials of a valid JDE user that can log into the environment you are trying to connect to.
Parameter.token

For authentication token string can be used instead of a password.  The expiry on authentication token strings is configured via the Cantara Administration Console and can be set per login environment.

Parameter.applicationCantara application name (required). Refer to Managing Applications topic for more information.
Parameter.fcmRegistrationIdFirebase Cloud Messaging Registration ID is required to support push notifications

Response Body

JS
{
	"Message": {
		"value": "Transaction Successful",
		"origin": "Worker7@6c101b96c994",
		"type": 0,
		"sessionId": "",
		"cantaraSid": ""
	},
	"name": "Login",
	"Parameter": [
		{
			"value": "",
			"name": "mediaAccessMethod"
		},
		{
			"value": "",
			"name": "appVersionCode"
		},
		{
			"value": "",
			"name": "username"
		},
		{
			"value": "",
			"name": "addressNo"
		},
		{
			"value": "",
			"name": "addressNoAlphaName"
		},
		{
			"value": "",
			"name": "jobQueue"
		},
		{
			"value": "",
			"name": "branch"
		},
		{
			"value": "",
			"name": "approvalRouteCode"
		},
		{
			"value": "",
			"name": "approvalRouteCodeAddressNo"
		},
		{
			"value": "",
			"name": "approvalRouteCodeCompany"
		},
		{
			"value": "",
			"name": "approvalRouteCodeCostCenterType"
		},
		{
			"value": "",
			"name": "approvalRouteCodeDescription"
		},
		{
			"value": "",
			"name": "dateFormat"
		},
		{
			"value": "",
			"name": "dateSeparator"
		},
		{
			"value": "",
			"name": "decimalCharacter"
		},
		{
			"value": "",
			"name": "timeZone"
		},
		{
			"value": "",
			"name": "timeZoneDescription"
		},
		{
			"value": "",
			"name": "timeZoneDescription2"
		},
		{
			"value": "",
			"name": "timeZoneSpecialHandling"
		},
		{
			"value": "12",
			"name": "timeFormat"
		},
		{
			"value": "",
			"name": "daylightRule"
		},
		{
			"value": "",
			"name": "token"
		},
		{
			"value": "",
			"name": "userRoles"
		}
	],
	"JdeError": []
}

Response Body Parameters

PathDescription
MessageTag for set of related "Message" data
Message.value

Text value to indicate success/failure of the service

Message.originorigin host , E.g. "CNTR-W16729@ig-worker-test-ap-6z4v
Message.type

Message type identifier , E.g. "0"

Message.sessionIdJDE CallObject kernel thread ,  E.g. "5840.1573101636.1101"
Message.cantaraSidWeb application server session ID , E.g. "04528648-fe85-4743-bd07-40d7c8d57cf8"
nameFunction service name
ParameterTag for set of related "Parameter" data
Parameter.mediaAccessMethodCantara Environment's Media Objects Access Method
Parameter.appVersionCodeCantara Application defintion's "Version" code
Parameter.usernameAuthentication Username , (Is not necessarily a JDE user, as this might be a Proxy, like TESTUSER4 using actual JDE Account JACK)
Parameter.addressNoAuthenticated User's Address Book number
(This can be defined in various places, depending on the authentication method - E.g. JDE User Profile, Cantara User Management Proxy Group or Proxy User, AD)
Parameter.addressNoAlphaNameAuthenticated User's Name
(Ths can is defined by their Address Book number)
Parameter.jobQueueAuthenticated User's Default Batch Report Queue
Parameter.branchAuthenticated User's Default Branch
(Can be from JDE "Default Location & Approval" Branch/Plant, or Cantara User Management Proxy Group / Proxy User or AD)
Parameter.approvalRouteCodeAuthenticated User's Purcahase Order Approvals Route (PO Approval Route)
Parameter.approvalRouteCodeAddressNoAddress Number of route code ,  PO Approval Route Address Book Number attribute
Parameter.approvalRouteCodeCompanyCompany number related to route code, PO Approval Route Company attribute
Parameter.approvalRouteCodeCostCenterTypecost center type approval route code, PO Approval Route Cost Centre Type attribut
Parameter.approvalRouteCodeDescriptionDescription detail of route code, PO Approval Route Description attribute
Parameter.dateFormatAuthenticated User's User Profile "Date Format" value
Parameter.dateSeparatorAuthenticated User's User Profile "Date Separator Character" value
Parameter.decimalCharacterAuthenticated User's User Profile "Decimal Format Character" value
Parameter.timeZoneAuthenticated User's User Profile "Universal Time" value (Timezone)
Parameter.timeZoneDescriptionCity zone Description , Timezone UDC H91|TZ code's Description attribute
Parameter.timeZoneDescription2Timezone UDC H91|TZ code's Description2 attribute
Parameter.timeZoneSpecialHandlingTimezone UDC H91|TZ code's Special Handling attribute
Parameter.timeFormatAuthenticated User's User Profile "Time Format" value
Parameter.daylightRuleAuthenticated User's User Profile "Daylight Savings Rule" value
Parameter.tokenAuthentication Token for subsequent service Requests
Parameter.userRolesProvides the user roles details for the login user , "|" separated list of date effective roles assigned to the JDE user
JdeError

Tag for set of related JDE authentication error details. Is empty if no errors occurred.

Execute Login

Example for executing login services

Example Endpoint: https://us.cantara.cloud/cantara/service/50/server/login/E1DEV


Login with Password Request Payload

JS
{
	"name": "Login",
	"cantaraVersion": "5.1",
	"tenantId": 0,
	"apiKey": "",
	"Parameter": [
		{
			"value": "JCITIZEN",
			"name": "username"
		},
		{
			"value": "xxxxxxx",
			"name": "password"
		},
		{
			"value": "DEMO",
			"name": "application"
		}
	]
}

Login with Token Request Payload

JS
{
	"name": "Login",
	"cantaraVersion": "5.1",
	"tenantId": 0,
	"apiKey": "",
	"Parameter": [
		{
			"value": "JCITIZEN",
			"name": "username"
		},
		{
			"value": "0e13006bdf5ef550374beb467180ec541d4b820c0870672690ac80ec9a854a75",
			"name": "token"
		},
		{
			"value": "DEMO",
			"name": "application"
		}
	]
}

Response Payload

JS
{
	"Message": {
		"value": "Transaction Successful",
		"origin": "Worker7@6c101b96c994",
		"type": 0,
		"sessionId": "6988.1571627681.780",
		"cantaraSid": "b3662376-226e-4b1c-b57a-a37c601cd19f"
	},
	"name": "Login",
	"Parameter": [
		{
			"value": "AIS",
			"name": "mediaAccessMethod"
		},
		{
			"value": "1000",
			"name": "appVersionCode"
		},
		{
			"value": "JCITIZEN",
			"name": "username"
		},
		{
			"value": "1003",
			"name": "addressNo"
		},
		{
			"value": "Junior Bloggs",
			"name": "addressNoAlphaName"
		},
		{
			"value": "",
			"name": "jobQueue"
		},
		{
			"value": "",
			"name": "branch"
		},
		{
			"value": "RINAMI",
			"name": "approvalRouteCode"
		},
		{
			"value": "",
			"name": "approvalRouteCodeAddressNo"
		},
		{
			"value": "00000",
			"name": "approvalRouteCodeCompany"
		},
		{
			"value": "  ",
			"name": "approvalRouteCodeCostCenterType"
		},
		{
			"value": "",
			"name": "approvalRouteCodeDescription"
		},
		{
			"value": "DME",
			"name": "dateFormat"
		},
		{
			"value": " ",
			"name": "dateSeparator"
		},
		{
			"value": " ",
			"name": "decimalCharacter"
		},
		{
			"value": "51",
			"name": "timeZone"
		},
		{
			"value": "Brisbane",
			"name": "timeZoneDescription"
		},
		{
			"value": "(UTC+10:00)",
			"name": "timeZoneDescription2"
		},
		{
			"value": "",
			"name": "timeZoneSpecialHandling"
		},
		{
			"value": "12",
			"name": "timeFormat"
		},
		{
			"value": "",
			"name": "daylightRule"
		},
		{
			"value": "0e13006bdf5ef550374beb467180ec541d4b820c0870672690ac80ec9a854a75",
			"name": "token"
		},
		{
			"value": "DEVELOPER|INVACMRJDE|INVCLMRJDE|PROCMGRJDE|WMSMGRJDE",
			"name": "userRoles"
		}
	],
	"JdeError": []
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.