Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..

cancel
Showing results for 
Search instead for 
Did you mean: 

Content API

jsol5
Advocate II

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/

32 REPLIES 32

SILLASCOSTA
Contributor

There it is the headers :

pastedImage_1.png

 

And the Auth:

 

Auth contetn.jpg

BodieMinster
Archer Employee
Archer Employee

The problem is in the header. It should not be base64 encoded. It must be sent as plain text.

 

Authorization: Archer session-id=439C730FF83F68EFDC017ED705D9908E

SILLASCOSTA
Contributor

Is it what you meant ? Parsing in a header 

pastedImage_2.png

SILLASCOSTA
Contributor

I've tried in many ways 

pastedImage_1.png

The "import" lines make me think you might be writing in Java? I don't know the correct way to set the request headers in Java, but I can tell you that an HTTP 500 is an unhandled .NET exception coming from the API. You should be able to find a corresponding stack trace in your system event log that might help you determine why the API is not responding as expected to your request.

SarhangHevary1
Archer Employee
Archer Employee

The head should like this and go to the Key section type in "Authorization' and under Value section add "Archer Session-ID=Your session Token" API.PNG

SILLASCOSTA
Contributor

Hi  Sarhang, thanks for the reply.

here is the response I've got :

 

 

pastedImage_3.pngpastedImage_2.png

SarhangHevary1
Archer Employee
Archer Employee
  • I see in one of the screenshot you using the https and the last one you are using http
    • Do you use the SSL certificate with Archer? 
    • If you are using the SSL certificate go to the Postman > settings>  disable the SSL certificate verification (temporary) and try it agian
  • Instead of  using the Archer base URL with the API Get call, can you run the Postman from the Web Server using  local host with API GET call 
  • How may Web Server do you have? 
  • Make sure the username that is used to get the Archer Session ID has System Administrator rights (temporary) 

SILLASCOSTA
Contributor

Hi Sarhang, thank you for the reply!

 

 

  • I have SSL disabled 
  • The user that got Archer Session ID  is an Adm 
  •  The follow pic answere  your question about web server ?
  •  (Instead of  using the Archer base URL with the API Get call, can you run the Postman from the Web Server using  local host with API GET call ) How can i do that ? Sorry I don't know how to do that..

 

 

ISS.jpg

SarhangHevary1
Archer Employee
Archer Employee


You have not answered my question, how many web server do you have?

 

Install the Postman on the Web Server and when you make the API GET call for the url use https://localhost/RSAarcher/contentapi/ or try this http://localhost/RSAarcher/contentapi/

 

One more thing, as Bodie mentioned the HTTP 500 error is usually the result of an unhandled .NET exception.
Have you checked the Archer logs and Windows system event log?

 

Can you please post the Web Config file?