Hi, We had a few questions regarding webAPI introduced in Appian 7.9

Hi,
We had a few questions regarding webAPI introduced in Appian 7.9
Can we invoke the webAPI in the same environment?
Also, if it is possible how do we do it?
We tried to invoke the webAPI with the below code but got an error.

httpget(
endpoint : cons!URL,
paramNames :{},
paramValues :{},
headerNames : {"content-type"},
headerValues : {"application/json"},
user : username,
password : password
)

OR

a!httpQuery(
url : cons!URL,
basicAuthenticationCredentials :a!httpAuthenticationBasic(
username : a!scsField(
externalSystemKey : "testwebapi" ,
fieldKey : "testname" ,
usePerUser :false()
) ,
password : a!scsField(
externalSystemKey : "testwebapi" ,
fieldKey : "test" ,
usePerUser :false()
) ,
preemptive:true()

)

)




OriginalPostID-155986

OriginalPostID-155986

  Discussion posts and replies are publicly visible

Parents
  • It is definitely possible to do.
    You may want to double check the security settings on the WebApi and ensure that the username/password credentials being used in the system wide credentials have at least viewer rights to the WebApi.
    I copied your httpQuery() expression and punched in my URL and set up system wide credentials for a user with viewer rights and had the hello world template work just fine.
Reply
  • It is definitely possible to do.
    You may want to double check the security settings on the WebApi and ensure that the username/password credentials being used in the system wide credentials have at least viewer rights to the WebApi.
    I copied your httpQuery() expression and punched in my URL and set up system wide credentials for a user with viewer rights and had the hello world template work just fine.
Children
No Data