Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
+1
person also asked this
people also asked this
Replies
16 replies
Subscribers
6 subscribers
Views
11197 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
How to use WEB API ? What authentication changes will be require ?
simples
over 7 years ago
Hi All,
#WebAPI
I have created a Web API in 16.2, have selected 'Start Process' as Template, Method is 'POST'.
It is working fine when I am testing that web API but I don't have any idea how I allow third party to access it. I tried to understand things mentioned on forum regarding Authentication but unable to understand.
Also I noticed that we don't receive URL for template 'Start Process', so I have only End Point.
Can someone please guide how we can publish our Web API and allow third party(Outside of Appian) to access it ?
OriginalPostID-247198
Discussion posts and replies are publicly visible
0
kondetiv
over 7 years ago
@simples please go through the link. It might be helpful.
forum.appian.com/.../Integrating_Appian-Web_Services.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 7 years ago
Web API needs Basic Authentication. In basic authentication, you need to create a string in this format: "Basic ENCODEDUSERNAME:ENCODEDPASSWORD". The username and password need to be encoded in Base 64. Then pass this authentication in the Header with the key "Authorization" and value equal to the "Basic ENCODEDUSERNAME:ENCODEDPASSWORD"
If you are going to call the web api from Java, you need to follow the above steps sequentially.
If you just want to test it from outside Appian, use a chrome plugin like "Postman". Postman will encode the values for you. Just add a header in the request.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 7 years ago
The username and password should be of a Appian user in the environment.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 7 years ago
Also make sure that the request method is POST
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
simples
over 7 years ago
Hi @chetan, Thanks for your response. I tried to call my web API through 'Postman' plugin, but its still giving 401 - Unauthorized error. My method is post and have set Process Model and WEB API security as all user Administrator. Kindly find attached screen shot of code and plz guide if anything looks wrong.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkateshs329
over 7 years ago
@Simples: Just click on web api name in expression rule and changed to get request then you are able find url , Copy that url try to call from
HTTP Query Smart service.
1. Once you copy url from expression rule you NEED TO change request from GET to POST.
2. Create third party credentials in admin console.
3. Make sure security of web api and proess model.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
simples
over 7 years ago
Hi @venkatesh thanks for help but i need to call it out side appian environment. i tried Postman, SoapUI and restClient app, when i am trying with RestClient App in same session it is working but if i try in other browser or after logging out appian environment, its giving 401 Unauthorized error.
Also regarding third party credential, can you please explain detail, i talked with support team but they said they are not aware about anything like this.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 7 years ago
@simples, The authorization is not required to be specified in the Web API code.
You need to specify it in Postman - that is in the client which will call the Web API. How are you calling it via Postman? Can you post a screenshot?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 7 years ago
And Third Party credentials are not required here. The WEB API is being exposed to outside systems. Appian is not using other systems in this case.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
simples
over 7 years ago
@chetan i have commented that authorization code in the Web API, yes i did same, specified in Postman. Please find attached screenshot of postman. also regarding third party credential, as i need to allow other application to access our appian Web API, don't we will be requiring it, as we do in case of publishing a process model as web service ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>