简体   繁体   中英

REST API requested with curl returns 404 error

I used to request the REST API with curl or perl-ish LWP. This works :

curl -S -L -c cookies -b cookies -d j_username=admin -d j_password="*******" https://ordo.in.phm.education.gouv.fr/j_security_check

and shows me the Dashboard, assuring that I'm authenticated, but this :

curl -S -L -c cookies -b cookies -H 'Accept: application/json'  https://ordo.in.phm.education.gouv.fr/api/14/system/info

returns a 404 error, not an "unauthenticated" nor a "api mismatch" error

It used to works, in fact I borrowed these lines from a code I wrote and successfully used last year

Thanks

Cheers,

Xavier

On this way return OK code (200):

curl -v -c cookie -b cookie -d j_username=user -d j_password=password http://your-rundeck-instance:4440/j_security_check -H "Accept: application/json" http://your-rundeck-instance:4440/api/34/system/info/

Tested under Rundeck 3.2.1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM