Skip to main content

Function Services

This section describes how to execute a JDE BSFN/NER using the function request web service.

The following are required:

  • Your application must have obtained a Cantara session ID. If not, review the Login Services topic before continuing with this section.
  • The call you are making has already been defined using the Cantara Console. See Managing Functions, for more details.

A function can be executed by calling the service below with a payload that follows the Function Request definition (at a minimum the payload requires a function name and parameter). If the execution is successful, Cantara returns a response that follows the Function Response definition. If there is a failure, Cantara returns an error. See the Error Message topic for more information.

Each function request requires one or more parameters based on their definition on the Cantara server (see Managing Functions). Although there may be multiple parameters defined for functions, only the parameters marked as Required need to included in the payload.

Function

Endpoint: http(s)://[hostname]:[port]/[context]/service/[version]/function/[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)

Note:

Environment refers to the Cantara Access Server environment you are trying to log into. For example, E1DEV. You would have previously configured this when you set up your environment. Refer to the Managing Environments topic for more details.

You can obtain a list of configured environments by using the console to Managing Environments.

To review information about how to obtain the definition for a function, see the Request Definition topic.

On This Page



Request Body

JS
{
	"name": "GetUDC",
	"cantaraVersion": "5.1",
	"tenantId": "",
	"apiKey": "",
	"parameter": [
		{
			"value": "",
			"name": "dataDictionaryItem"
		},
		{
			"value": "",
			"name": "systemCode"
		},
		{
			"value": "",
			"name": "recordType"
		},
		{
			"value": "",
			"name": "key"
		}
	]
}

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.)
ParameterFunction request parameters

Response Body

JS
{
	"Message": {
		"value": "Transaction Successful",
		"origin": "Worker7@5bbdad89215b",
		"type": 0,
		"sessionId": "",
		"cantaraSid": ""
	},
	"name": "GetUDC",
	"Parameter": [
		{
			"value": "",
			"name": "dataDictionaryItem"
		},
		{
			"value": "",
			"name": "systemCode"
		},
		{
			"value": "",
			"name": "recordType"
		},
		{
			"value": "",
			"name": "key"
		},
		{
			"value": "",
			"name": "keyFieldLength"
		},
		{
			"value": "",
			"name": "languagePreference"
		},
		{
			"value": "",
			"name": "description1"
		},
		{
			"value": "",
			"name": "description2"
		},
		{
			"value": "",
			"name": "specialHandling"
		},
		{
			"value": " ",
			"name": "udcOwnershipFlag"
		},
		{
			"value": "Y",
			"name": "hardCoded"
		}
	],
	"JdeError": []
}

Response Body Parameters

PathDescription
MessageResponse message information
Message.value

Message description

Message.originorigin host
Message.type

Message type identifier

Message.sessionIdJDE CallObject kernel thread
Message.cantaraSidWeb application server session ID
nameFunction service name
ParameterFunction response parameters
JdeError

JDE error messages

Execute Function

Example for executing Function service

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

Function Request

JS
{
	"name": "GetUDC",
	"cantaraVersion": "5.1",
	"tenantId": "",
	"apiKey": "",
	"parameter": [
		{
			"value": "00",
			"name": "systemCode"
		},
		{
			"value": "ST",
			"name": "recordType"
		}
	]
}

Function Response

JS
{
	"Message": {
		"value": "Transaction Successful",
		"origin": "Worker7@5bbdad89215b",
		"type": 0,
		"sessionId": "5016.1572846537.1000",
		"cantaraSid": "67200fb0-9e49-4987-b31d-79f69fcb60d0"
	},
	"name": "GetUDC",
	"Parameter": [
		{
			"value": "",
			"name": "dataDictionaryItem"
		},
		{
			"value": "00",
			"name": "systemCode"
		},
		{
			"value": "ST",
			"name": "recordType"
		},
		{
			"value": "A",
			"name": "key"
		},
		{
			"value": "0",
			"name": "keyFieldLength"
		},
		{
			"value": "  ",
			"name": "languagePreference"
		},
		{
			"value": "Address Book Number",
			"name": "description1"
		},
		{
			"value": "Hard Coded Edit in F0101",
			"name": "description2"
		},
		{
			"value": "",
			"name": "specialHandling"
		},
		{
			"value": " ",
			"name": "udcOwnershipFlag"
		},
		{
			"value": "Y",
			"name": "hardCoded"
		}
	],
	"JdeError": []
}
JavaScript errors detected

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

If this problem persists, please contact our support.