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

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)

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



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

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

Function request parameters

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

Path

Description

Message

Response message information

Message.value

Message description

Message.origin

origin host

Message.type

Message type identifier

Message.sessionId

JDE CallObject kernel thread

Message.cantaraSid

Web application server session ID

name

Function service name

Parameter

Function response parameters

JdeError

JDE error messages

Execute Function

Example for executing Function service

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

JavaScript
{
	"name": "GetUDC",
	"cantaraVersion": "5.1",
	"tenantId": "",
	"apiKey": "",
	"parameter": [
		{
			"value": "00",
			"name": "systemCode"
		},
		{
			"value": "ST",
			"name": "recordType"
		}
	]
}
JavaScript
{
	"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": []
}