Page 3 of 9

Re: [OS] Brand new REST API for testing

Posted: Sat Feb 20, 2021 9:04 pm
by vankasteelj
Hi, I'm having troubles with the new api.

I'm getting back a 503 Backend fetch failed on every "/download" post-request I make. I'm not sure why, maybe it's just the API having troubles tonight.

Here's the complete request and response:
Image

I'm developing a nodejs wrapper (opensubtitles-api) compatible with the new api, it's a WIP available at https://github.com/vankasteelj/opensubt ... /tree/REST

I also have a question: why force form-data when json is much more friendly? Json is working for /login though, but not for /download. It doens't accept another Content-Type than form-data. It does seem to accept a "json body" though, even if it also gets me to 503. Maybe I'm just not getting form-data...

Re: [OS] Brand new REST API for testing

Posted: Sun Feb 21, 2021 6:28 pm
by os_dev

I also have a question: why force form-data when json is much more friendly? Json is working for /login though, but not for /download. It doens't accept another Content-Type than form-data. It does seem to accept a "json body" though, even if it also gets me to 503. Maybe I'm just not getting form-data...
So, for the 503.... seems everything is working now...was it temporary for you, or could you get the download to work at some point ?

For the forced formats... I didn't force anything, if you are referring to the docs I just don't know how to display it better in the stoplight.io.... but on the api side, there's no difference in how I get the parameters sent, and no check on the content type, so if a way to post on login works, it should work on the download too..

In ruby I either set the parameters one by one, or send a json body, I don't specify any content type, so I never really asked myself the question

Re: [OS] Brand new REST API for testing

Posted: Sun Feb 21, 2021 7:11 pm
by vankasteelj
Still not working, no.

If I don't set the header to Content-Type : multipart/form-data, it sends back 406. But it does error with 503 Backend fetch fail either with a real form-data POST request or a json-body POST request.

Re: [OS] Brand new REST API for testing

Posted: Sun Feb 21, 2021 8:58 pm
by os_dev
Still not working, no.

If I don't set the header to Content-Type : multipart/form-data, it sends back 406. But it does error with 503 Backend fetch fail either with a real form-data POST request or a json-body POST request.
Can you get the API to work with a testing tool, like postman or insomnia ?

Re: [OS] Brand new REST API for testing

Posted: Wed Feb 24, 2021 7:50 pm
by vankasteelj
Can you get the API to work with a testing tool, like postman or insomnia ?
Postman was successfull. Testing with various settings made me realize: the 'Content-Type:multipart/form-data' header isn't necessary, but the 'Accept:*/*' is mandatory. Otherwise it sends back an error 406 with 'Content-Type:application/json' or an error 503 with 'Content-Type:multipart/form-data'.

This should be fixable on your end or stipulated in the docs :)

Re: [OS] Brand new REST API for testing

Posted: Wed Feb 24, 2021 11:15 pm
by os_dev
but the 'Accept:*/*' is mandatory.
This should be fixable on your end or stipulated in the docs :)
Oh I'd be glad to, but I don't understand what you are saying I'm afraid....I don't know how to reproduce the problem you experience.

Re: [OS] Brand new REST API for testing

Posted: Wed Feb 24, 2021 11:20 pm
by vankasteelj
/duplicate/

Re: [OS] Brand new REST API for testing

Posted: Wed Feb 24, 2021 11:21 pm
by vankasteelj
Oh I'd be glad to, but I don't understand what you are saying I'm afraid....I don't know how to reproduce the problem you experience.
You must set manually a header 'Accept' to '*/*' otherwise the server doesn't respond something else than an error. Like this:
Image

That header is set automatically by Postman, but not by nodejs modules like Request or Got, so I'm guessing it isnt standard. So the query must actually look like this:
Image

Re: [OS] Brand new REST API for testing

Posted: Wed Feb 24, 2021 11:51 pm
by os_dev
as much as I can test now it works with both "*/*" and "application/json" ... but will put a note in the docs to experiment with both in case of problem...

Thanks for pointing it out !

note that the user-agent is not used by the api

Re: [OS] Brand new REST API for testing

Posted: Fri Apr 16, 2021 4:50 pm
by xochilpili
Hello everyone,

Im not being able to register a consumer, always returns Error 503 Backend fetch failed
Is this really working?

Re: [OS] Brand new REST API for testing

Posted: Sat Apr 17, 2021 3:56 am
by oss
it is working now, it was down for a while, xochilpili

Re: [OS] Brand new REST API for testing

Posted: Fri Apr 23, 2021 1:30 am
by amiraL42
Hi. I'm trying to get an api key to make some tests.
Got a 503 registering on opensubtitles.com and resend confirmation email is also failing.
(https://www.opensubtitles.com/fr/users/confirmation/new)
Error 503 Backend fetch failed

Backend fetch failed
Guru Meditation:

XID: ...

Varnish cache server

Re: [OS] Brand new REST API for testing

Posted: Fri Apr 23, 2021 11:40 am
by os_dev
Hi. I'm trying to get an api key to make some tests.
Got a 503 registering on opensubtitles.com and resend confirmation email is also failing.
(https://www.opensubtitles.com/fr/users/confirmation/new)
Error 503 Backend fetch failed

Backend fetch failed
Guru Meditation:

XID: ...

Varnish cache server
oh, this time can't find anything wrong, must have been a temporary issue... could you try again and let me know ?

Re: [OS] Brand new REST API for testing

Posted: Sun Apr 25, 2021 4:15 pm
by amiraL42
Still can't register.
I did also try import my opensubtitles.org account but got the same error. :(
I tested different navigators, email, ip, but nothing worked for me.
I still want to give this a try.

Re: [OS] Brand new REST API for testing

Posted: Sun Apr 25, 2021 7:27 pm
by os_dev
So... it's just a bad period, really wish we could give you more reliability, but we're still unable to track down what's going on with the gateway, resulting in timeouts (on opensubtitles.com it makes 503 errors, on the api it's just not responding)

sorry about that, working on it....