Versions Compared

Key

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

Table of Contents

...

Argument/AttributeMandatoryDescription
addressnoThe URI pattern to invoke the method. When not specified the pattern /{methodName} is used by default
ParameterClassNamenoThe name of the parameter class to instantiate for calling into the method. When not specified, we will pass an unknown value (?) to the method.
RequestMethodnoThe http method for the call described by this annotation. When not specified, get will be assumed as the default.
ResponseyesComma delimited list of the components for the JSON response of the REST request. Components are "return" and the names of the ProDataset parameters are the name of the parameter object.

mapHeaders

noComma-delimited list of HTTP header names that are set as values on the method parameter object.. The header names may have an optional mapped property name, delimited by =.  For example, a value of Accept-Language=Language,Content-Disposition sets the values of the Accept-Language and Content-Disposition headers from the web request to properties named Language and Content-Disposition.
mapCookiesnoComma-delimited list of HTTP cookie names to be set as values on the method parameter object. The cookie names may have an optional mapped property name, similar to the mapHeaders value. For example, a value of JSESSIONID=SessionId will set the value of the JSESSIONID cookie to a property named SessionId on the parameter object.

Every invokable method may be annotated with more than a single @RestMethod annotation to provide alternative URI's for the same method.

...

GET http://localhost:8820/web/Entities/GetCustomerAndInvoices/1

POST http://localhost:8820/web/Entities/GetCustomerAndInvoices with a JSON payload like: 

Code Block
languagejs
"poParameter": {
    "Value": 1
  },
"dsCustomer": {
   "eCustomer": [
    {
		"CustNum": 1,
		"Country": "USA",
		"Name": "Lift Line Skiing",
		"Address": "Unter Käster 1",
		"Address2": null,
		"City": "Chicago",
		"State": "MA",
		"PostalCode": "01730",
		"Contact": "Gloria Shepley",
		"Phone": "(617) 450-0086",
		"SalesRep": "HXM",
		"CreditLimit": 0,
		"Balance": 50000,
		"Terms": "PREPAID ONLY",
		"Discount": 35,
		"Comments": "Put on hold: 25.06.2019 07:46:59\ntest",
		"Fax": "",
		"EmailAddress": "info@lift-tours.com",
		"Flags": "C",
		"SmartRecordKey": "000000001",
		"SmartAttachments": true,
		"SmartComments": false,
		"SmartCopiedFrom": ""
	}
  ]
},
"dsInvoice": {
  "eInvoice": [
	{
	"Invoicenum": 6,
	"CustNum": 1,
	"InvoiceDate": "2009-02-09",
	"Amount": 1829.5,
	"TotalPaid": 1829.5,
	"Adjustment": 0,
	"OrderNum": 6,
	"ShipCharge": 0
	},
	{
	"Invoicenum": 79,
	"CustNum": 1,
	"InvoiceDate": "2008-11-19",
	"Amount": 34707.84,
	"TotalPaid": 34707.84,
	"Adjustment": 0,
	"OrderNum": 79,
	"ShipCharge": 0
	},
	{
	"Invoicenum": 146,
	"CustNum": 1,
	"InvoiceDate": "2009-02-28",
	"Amount": 4605.91,
	"TotalPaid": 0,
	"Adjustment": 0,
	"OrderNum": 177,
	"ShipCharge": 0
	}
  ]
}

...