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

Parameter

Description

hostname

Cantara worker hostname

port

Cantara worker listening port (only required if non-standard HTTP/s port

context

Cantara worker web application context

version

Cantara worker API version

environment

Cantara 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.

JavaScript
{
    "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

Path

Description

name

Function service name

cantaraVersion

Cantara platform version

tenantId

Cantara Tenant ID (The Tenant ID and API Key can be retrieved from the customer portal.)

apiKey

Cantara Tenant API Key (The Tenant ID and API Key can be retrieved from the customer portal.)

Parameter

Login request parameters

Parameter.username

Parameter username (required) should be the credentials of a valid JDE user that can log into the environment you are trying to connect to.

Parameter.password

password 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.application

Cantara application name (required). Refer to 

Managing Applications

topic for more information.

Parameter.fcmRegistrationId

Firebase Cloud Messaging Registration ID is required to support push notifications

JavaScript
{
	"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

Path

Description

Message

Tag for set of related "Message" data

Message.value

Text value to indicate success/failure of the service

Message.origin

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

Message.type

Message type identifier , E.g. "0"

Message.sessionId

JDE CallObject kernel thread ,  E.g. "5840.1573101636.1101"

Message.cantaraSid

Web application server session ID , E.g. "04528648-fe85-4743-bd07-40d7c8d57cf8"

name

Function service name

Parameter

Tag for set of related "Parameter" data

Parameter.mediaAccessMethod

Cantara Environment's Media Objects Access Method

Parameter.appVersionCode

Cantara Application defintion's "Version" code

Parameter.username

Authentication Username , (Is not necessarily a JDE user, as this might be a Proxy, like TESTUSER4 using actual JDE Account JACK)

Parameter.addressNo

Authenticated 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.addressNoAlphaName

Authenticated User's Name
(Ths can is defined by their Address Book number)

Parameter.jobQueue

Authenticated User's Default Batch Report Queue

Parameter.branch

Authenticated User's Default Branch
(Can be from JDE "Default Location & Approval" Branch/Plant, or Cantara User Management Proxy Group / Proxy User or AD)

Parameter.approvalRouteCode

Authenticated User's Purcahase Order Approvals Route (PO Approval Route)

Parameter.approvalRouteCodeAddressNo

Address Number of route code ,  PO Approval Route Address Book Number attribute

Parameter.approvalRouteCodeCompany

Company number related to route code, PO Approval Route Company attribute

Parameter.approvalRouteCodeCostCenterType

cost center type approval route code, PO Approval Route Cost Centre Type attribut

Parameter.approvalRouteCodeDescription

Description detail of route code, PO Approval Route Description attribute

Parameter.dateFormat

Authenticated User's User Profile "Date Format" value

Parameter.dateSeparator

Authenticated User's User Profile "Date Separator Character" value

Parameter.decimalCharacter

Authenticated User's User Profile "Decimal Format Character" value

Parameter.timeZone

Authenticated User's User Profile "Universal Time" value (Timezone)

Parameter.timeZoneDescription

City zone Description , Timezone UDC H91|TZ code's Description attribute

Parameter.timeZoneDescription2

Timezone UDC H91|TZ code's Description2 attribute

Parameter.timeZoneSpecialHandling

Timezone UDC H91|TZ code's Special Handling attribute

Parameter.timeFormat

Authenticated User's User Profile "Time Format" value

Parameter.daylightRule

Authenticated User's User Profile "Daylight Savings Rule" value

Parameter.token

Authentication Token for subsequent service Requests

Parameter.userRoles

Provides 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


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

JavaScript
{
	"name": "Login",
	"cantaraVersion": "5.1",
	"tenantId": 0,
	"apiKey": "",
	"Parameter": [
		{
			"value": "JCITIZEN",
			"name": "username"
		},
		{
			"value": "0e13006bdf5ef550374beb467180ec541d4b820c0870672690ac80ec9a854a75",
			"name": "token"
		},
		{
			"value": "DEMO",
			"name": "application"
		}
	]
}
JavaScript
{
	"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": []
}