Container Station API issues

Post Reply
banu89
New here
Posts: 3
Joined: Mon Sep 07, 2020 10:17 pm

Container Station API issues

Post by banu89 »

Hello,

I'm trying to call Container Station APIs from java(okhttp3) and postman but i'm always getting the same message no matter what i do, when i make the call from curl for some reason it works.
Any ideas why this is happening?
Qnap TS-251d firmware: 4.5.2.1594
Container Station: 2.3.5.1708

I'm trying to call:
http://192.168.1.10:8080/containerstation/api/v1/login
Api Response code is 200 and the body:
{
"error": {
"code": 400,
"message": "username, password or sid"
}
}
That is what i get from postman and from okhttp.

I tried in postman and okhttp to add the user and password as Params and also tried with BasicAuth, same response both times.

My goal is to make it from java as the api is going to be called from a service.

curl:
[/share/Jobs] # curl -d 'username=admin&password=myPassword' --request POST 'http://192.168.1.10:8080/containerstation/api/v1/login'
{
"anonymous": false,
"isAdmin": true,
"logintime": "2021-04-06 20:08:52",
"username": "admin"
}
QNAP TS-251D 8GB
crawfells
New here
Posts: 2
Joined: Fri May 04, 2018 11:11 pm

Re: Container Station API issues

Post by crawfells »

Hi banu89,

Did you ever find out the answer? I'm trying the exact same thing in Postman, and I can't get it to work either...
Post Reply

Return to “Container Station”