Hi can we consume an appian web api of environment Axxxxxx in appian environment Bxxxxx by using web Api Key authentication? if so , how/where we need to pass webapiKey ?
Thanks
Madhu
Discussion posts and replies are publicly visible
You can call an Appian Web API from another Appian instance by creating an Integration object and setting the Authentication type to Basic. You will be given the ability to enter the web api username and key.
Hi Tim ,
Thanks for your response . when i authenticate as you suggested its throwing
IntegrationError title: "Invalid credentials" message: "Appian was not able to authenticate with the username and password you provided. This request requires Basic authentication." detail: "HTTP/1.1 401 401"
Apologies I mis-read your initial question. In the Integration set the Authentication to "None" and instead add a Header with the name "Appian-API-Key" and the value of your API key.
Hi Tim, While it works, I am not able to get it working by calling it in a local var
E.g. My Web-API is being called using an integration object which in turn uses either basic auth or API key.
When using basic auth, I am able to call the integration in a local var
a!localVariable(
local!a:rule!callIntegrationWebApi(params)
{......})
However, if the same interface is executed while using the API key, it does not execute but returns a smart service object as output.
Do you have any info around this?
You can call an integration using a HTTP-GET like any other expression. A HTTP-POST can only be used in a saveInto. To add some detail, this is about whether the called API modifies data in the other system. This can be configured in the integration object.