API Integration with Draftbit not working - 404 error

Hi,

I’m new to Backendless so I do apologise if this is a simple fix, however I am currently trying to integrate Backendless with Draftbit as the frontend and spent hours reading the backendless docs as well as Draftbit information to get the API connected, but whenever I go to create my first POST endpoint for registering user to backendless database and press test, it comes up with the 404 error. The base URL has been setup with both application and rest API keys included from Backendless.

I tried putting some dummy data into backendless to try the GET endpoint but still the same thing. I even created a Xano account (I know, traitor) to see if it was just Backendless but this happened for Xano too.

I then decided to put the simple curl command with backendless base url into my local command prompt and the response was:

{“code”:8002,“message”:“Could not parse request with message: , status code 404, headers GET /D63F2886-895F-9125-FF57-65443B7F2C00/C9CFF229-F213-4E65-A3E0-7163AD9B172A/data”,“errorData”:{}}

As someone who has no coding background, I have no idea what this means but I’ve obviously missed something.

Would someone be able to help as it seems I’ve fallen at the first hurdle already, frustratingly. I’ve read that this is a backend issue not frontend, but I’m not sure so sorry if this is to do with Draftbit.

Many thanks,
James

Hello @James_Bourdon

Welcome to our community and thank you for trying out Backendless.

Your request look like GET /<appId>/<apiKey>/data? We do not have such a route.

You can try the following route: GET /<appId>/<apiKey>/data/Users.

You can find a list and description of our routes in our documentation: Backendless REST API Documentation.

Regards,
Volodymyr

Hi @Volodymyr_Ialovyi,

Thanks for your reply and link to documentation.

From looking at link I’ve realised that I was using north american cluster native endpoint url but I’ve setup Backendless in European cluster so have changed the base URL and added both appID and apiKey to accomodate for this. I’ve taken out /data however it’s still coming back as error 404 when creating endpoint in draftbit. For base URL when putting into frontend like Draftbit, does anything go after the apiKey or do I leave it like that so when I do create endpoints I can specify path with /user etc.?

I currently have base URL like this: https://eu-api.backendless.com/application-id/api-key

Is this wrong?

Thanks,
James

Hi James,

Could you please share the complete URL you use when making a call into Backendless?

Mark

Hi Mark,

https://eu-api.backendless.com/D63F2886-895F-9125-FF57-65443B7F2C00/C9CFF229-F213-4E65-A3E0-7163AD9B172A

This is what I’ve come to but still not working.

James

That URL would not do anything as it does not identify any of our services. Please describe what operation you want to perform in Backendless.

I’m trying to add Backendless RestAPI to Draftbit and using the link I sent above as base (Dev) URL. Then when I create an endpoint adding /users (for example) into the path to specify operation path.

I’m guessing this link for dev URL is missing something to identify backendless but not sure how to get draftbit to communicate with backendless.

That would be a question for Draftbit. You can find the complete URL for registering a user here:
https://backendless.com/docs/rest/users_user_registration.html

Specifically, it must use the following URL:

https://xxxx.backendless.app/api/users/register

or

https://eu-api.backendless.com/<application-id>/<api-key>/users/register

What’s missing in your setup, I honestly do not know, it would be something specific to Draftbit and I hope their support can address it.

Regards,
Mark

Hi Mark,

Thanks for your quick responses and help and hope I haven’t wasted too much of your time.

Will contact Draftbit now.

Thanks again,
James

Hi James,

No worries. Please let us know what you find out and what the resolution is. I am sure others will find it helpful.

Regards,
Mark

1 Like