AnsweredAssumed Answered

So ... how DO you use curl in the most basic way with the REST API?

Question asked by Carsten_Schmitz on Mar 16, 2018
Latest reply on Apr 18, 2018 by thuro03
Hi.

I've seen many threads about this, but none where a simple example using the most basic command is given: curl.

I do not want to use POSTMAN.

How does one go about using the REST API with curl? Here's the most basic example I can think of:

  • something that is a GET request
  • doing it right on the AE server, using localhost

This is what I get:

$ curl -D- http://localhost:8088/ae/api/v1/100/executions/197661022 --basic -u '100/DEPT/USER'
Enter host password for user '100/DEPT/USER':
HTTP/1.1 401 Unauthorized
Content-Type: application/json
WWW-Authenticate: Basic realm="AUTOMIC"
Content-Length: 134
Server: Jetty(8.2.0.v20160908)

{
  "code" : 45107,
  "error" : "Cannot logon to Automation Engine.",
  "details" : "The credentials (user/dept/pwd) are not valid."
}
(I substituted "DEPT" and "USER" for the actual data ONLY in the above post, for security reasons. On the command line, I tried my actual department and username, of course).

I tried a gazillion combinations of client, department and user name but NONE accepts my correct, confirmed user password. At some point I managed to lock my account (it's on a "lock after five unsuccessful logins" policy), so it DID identify my correct account, but even though I unlocked it, it will never accept my known-good user password.

I'm also an Administrator. I haz all the priveleges.

What am I missing? Is my curl broken?

Thanks!

Outcomes