Skip to Content
2
Aug 09, 2022 at 02:07 PM

How to set the AIR for external services in CAP?

600 Views Last edit Sep 14, 2022 at 06:20 AM 3 rev

Partner solutions interfacing with SAP LoB cloud applications need to identify itself by submitting an AIR identifier (Application Interface Register) to a custom header parameter with the name 'Application-Interface-Key'.

How do we set the AIR header when using an external service via `cds.connect`?

I've tried to use the headers properties i.c.w. a destination, but in my test it seems that the requests send to the destination are not including that header:

	"cds": {
		"requires": {
			"uaa": {
				"kind": "xsuaa"
			},
			"FoundationPlatformPLT": {
				"kind": "odata-v2",
				"model": "srv/external/FoundationPlatformPLT",
				"[production]": {
					"credentials": {
						"destination": "sf-end-user",
						"headers": {
							"Application-Interface-Key": "xxxx"
						},
						"path": "/odata/v2",
						"requestTimeout": 1000000
					}
				}
			}
		}
	}

Improvement Request to be able to allow this configuration via destination service: https://influence.sap.com/sap/ino/#/idea/289204