Created Codeless API Service and Method >> Getting Service Method Not Found Error

Backendless Version (3.x / 6.x, Online / Managed / Pro )

Online

Application ID

EA7510A2-07EF-5A27-FF23-B4DAF9514900

Expected Behavior

You can see everything in the screenshot. I just want to test a simple update method prior to diving into putting more code server-side but I am unable to run my method. Please advise.

There are 2 problems:

  1. How do I indicate that I want to search through the Post table. You can see that I used Get Data From Cache method, but I don’t think that’s right. I have a Post Table, I want to get the entries as a list and iterate through them. OR is there another way that I can do a Query based on the Post ID that I pass in as a parameter from the REST call?

  2. Trying to run the method results in the 400 - Service method not found error.

Thanks.

Hi @Carlton_Branch,

I changed the endpoint URL path so it is /Post/ReportPost (without the trailing slash) and now the method can be invoked. The method fails since there are no items in cache, but you can definitely invoke it.

Regards,
Mark

Hi Mark,
Thanks for the quick reply. How can I put the items in the cache? That’s the other part I don’t understand. If I have a Post table and I want to iterate through them and perform some action on a record, how do I get a list of records?

EDIT: Looking at the example code again, it seems that the example code for the shopping code only processes input before the rest call executes which isn’t quite what I want to do.

To clairfy, this is what I want to do:

a) get a postID string from a REST call
b) iterate through the Post Table
c) stop when I find a matching record
d) modify the record

How can I do this?

Thanks,
Carlton

Hi @Carlton_Branch

If you want to get the records of Post table you should use the Load Table objects block under Data API section.
Something like this:
Screenshot 2020-09-11 at 13.44.32

Best Regards,
Maksym

Hi Maksym,

Thanks. Will page size limit the results? I would need to query the entire table which could easily exceed 100 or 1000 records?

Would it be best to get a table count and then set that to the page size?

Thanks,
Carlton

If you want to get all the records you should take a look at pagination.
More about it here:
https://backendless.com/docs/rest/data_data_paging.html

Hi Maksym,

Do you know why I am unable to add a where clasue to the Load Table Object block?

Very confusing as there are no error messages as to why things are wrong.
Thanks,
Carlton

a where clause must be a string, while the block you’re trying to add is resolved to be a boolean.

Awesome. Thanks.