cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the AIR for external services in CAP?

pieterjanssens
Active Participant

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

gregorw
Active Contributor
0 Kudos

I've created SAP Support incident 685167 / 2022 to get an official answer.

Accepted Solutions (1)

Accepted Solutions (1)

gregorw
Active Contributor
0 Kudos

Based on the SAP Cloud SDK documentation Additional Headers and Query Parameters on Destinations this can be solved with the Additional Property:

URL.headers.Application-Interface-Key

Answers (0)