CRUD ROOKIE Task: Add Object With API

Good day

Please can someone help me with the Task: Add Object With API

Ive read the other topics related to the issues others are also facing.

Im not understanding that i must complete the task with javascript, but the post button mentions json.

Ive read through all the other topics related to this subject

Hi Jonathan,

The task can be completed with any programming language or with Codeless. Do you have a preference for the approach to use for this task?

Regards,
Mark

Hello Mark

I used json

{
“age”:“23”,
“name”:“Dallas”,
}

this time it worked, but when i tried it a few times earlier it didnt work. could it be a caching issue with backendless?

No, caching is not applicable here. JSON is just data though, a complete API request would also include a URL, http method (get, put, post) and headers.

@mark-piller I just applied the above code and it worked, but the first few attempts before did not work. very confusing.

now im experiencing the same issue with the next task CRUD ROOKIE
Task: Retrieve Object With API

I dont understand the task with the code sample provided?

@mark-piller I must apologise. I got a 1007 error with the age column set to INT. I then changed it to string and it worked.

{
“code”: 1007,
“message”: “Unable to save object - invalid data type for properties - age. You can change the property type in developer console.”
}

What is the data type of the “age” column in the database?

i changed it to string. i aslo tried json. they both worked. i then tried switching it back to INT as in the first task, but it gave the same error.

now im trying to figure out the next task.

Then tied the next tasks where i needed for find the name and update the age.

not able to post, but pressing get gave me this information.

Hello @Jono

You make a request in the wrong way(using JS code), the request body must contain JSON with request parameters. Code from missions must be running in a JS file(not in backendless).
Also, you can download a project template, and run this code from the template.

image

Here you can find more information about Backendless
Youtube
Documentation

Regards, Dima

Hello Dima

What code would I use to complete the task using the Backendless no code platform.

Could you please clarify, with what task you have a problem with now?
Crud Rockie - Retrieve Object With API ?

Hello Dima

Im trying to solve the three Mission: CRUD ROOKIE
Task: Retrieve Object With API as shown in the picture attached.

is there code to retieve the name for the database?

is there code to update the age in the database?

is there code to delete the object in the database?

for all three missions, i pasted the code as given in the example in the rest concole, request body and tried to post. The Post button shows a error message (Request Body is Invalid JSON)

I experienced the same issue with the first mission. I used the below code to solve the task/mission.

{
“age”:“23”,
“name”:“Dallas”,
}

This code is completely different from the code in the help area.

Its very confusing if one is using a no code platform?

The last comma is no needed
{
“age”:“23”,
“name”:“Dallas”
}

Code from help is JS code, and this must been run from your app. So if you want to complete missions, you must create an app using code.

But if you interest in a nocode platform, you might try our Codeless and UI-builder
Here videos about it: one two three

Regard, Dima

thank you for the correction with the code. it did work though, probably a typo. This was only an example.

I thought that the missions need to be completed before i could start the App creation process.

Let me try the creating an app.

thank you

Ive read through some of the other support posts, seems as though other users are also stuck with the API mission tasks.

I have created an App, otherwise i wouldn’t be at his stage, and the missions are there to teach the users about the platform.

Can you not supply the correct code we (Roockies) need to use to complete the missions most of us are battling with.

i dont understand why you dont seem to understand the support posts being logged for the API missions

Ive started at the beginning again. Ill download the project template files and follow instructions in get started. My apologies, i thought everything worked from the backendless servers.

1 Like