Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2018-09-06 06:02 PM
Working with Content API and it's unclear the URL to pull back all records OR even the default count of records from an application.
*I thought I saw something that said it's 1000. So, anything beyond that would be multiple calls.
Additionally, it's unclear if possible to specify the fields desired.
I can do something like this and get a specific record
/contentapi/Applications(12345)
However, this gives a 500 error
/contentapi/Applications
This gives endpoint data (not what I want):
/contentapi/Applications/
2020-05-14 11:47 AM
So, when I try "httsp:localhost/RsaArcher/Contentapi" I get 401 error, It happens because in the archer serve I enable only Anonymous Authentication for: api,ws,plataformapi,contentapi. So if i try to acess any of those endpoint without "/ws" I get 401 error. Check it out:
2020-05-14 02:21 PM
Your web server shows that you have Archer installed in the root of the default website, so your Archer base URL would be http://localhost, and the content API should be able to be reached at http://localhost/contentapi. The ws folder contains the SOAP API and will not be involved when calling the content API.
2020-05-15 08:02 AM
Bodie, Thanks for your reply.
The problem is, when i try to connect to" https://localhost/RSAarcher/contentapi" I get 401 error, Even Though, IT infra has set Anonymous Authentication . So before that they had /ws Anonymous Auth set to disable and it didn't worked as well If i am not mistaken I got 501 error back then.
I am facing a really bad time trying to connect to power bi, I am looking forward to get it done.
Here is an sample, I tried both Basic Auth and Barer Token.
So, I have one clue that might guide to the problem. I made a test via browser to connect to https://localhost/RSAarcher/contentapi and it didnt work, so I log in my Archer main application and I retry to access /contentapi and it worked out. So my guesses is that somehow /contetapi is linked to SSO.
2020-05-15 10:56 AM
Hi Sillas,
Other than the authentication URL, all of the resources in the Content API require that you pass a session token with your request. If you do not, you'll receive a 401 (Unauthorized). That session token can be passed using one of two headers: Authorization or Cookie.
Authorization: Archer session-id=439C730FF83F68EFDC017ED705D9908E
Cookie: __ArcherSessionCookie__=439C730FF83F68EFDC017ED705D9908E
First you must make a call to authenticate through the platform API (http://localhost/RsaArcher/platformapi/core/security/login). In this request, you'll need to pass credentials in the request body like this:
{"InstanceName":"MyInstanceName","Username":"myApiUser","UserDomain":"","Password":"myPa$$w0rd!"}
This will return a session token that you must pass with all your requests.
When you log in through the UI in a browser, the Archer session cookie gets set. This will be respected by the Content API, so you can then make requests in that browser and you will be authorized. You can see this in IE11 by hitting F12 and running a network trace inside your authenticated Archer session. Notice that the __ArcherSessionCookie__ is set in your cookies collection.
I'm still confused by the URL you are using, since the screenshot of your IIS config doesn't show Archer installed as an application. Compare the configuration on my local instance to the one you posted earlier. Note that on my server, Archer is installed as an application and is not in the root of the Default Web Site, so my base url is http://localhost/RSAarcher. If Archer were installed in the root of the Default Web Site, my base url would be http://localhost.
2020-05-15 03:05 PM
Bodie,
Sorry, I have sent a mistaken photo of my ISS, In fact my architecture is as it shown below:
2020-05-15 03:26 PM
That makes MUCH more sense!
2020-05-18 11:54 AM
Bodie,
I did as you said, check it out:
1- Via postman I got the barer Token :
2- I tried to get a contentapi/ passing the token. But i still getting 401 status
I don't Know what else to try.Any idea ?
2020-05-18 12:46 PM
If you can authenticate through the platform API, then your credentials are valid, so that isn't the problem. It looks like your request with a valid session token is giving you back a 401 when requesting resources through the content API, so my next guess would be that the content API is not configured for anonymous authentication. Can you confirm?
2020-05-18 12:49 PM
Also, can you validate your header?