Page 1 of 3

issues updating collection with pointers with restful call

Posted: Wed Apr 23, 2014 8:33 pm
by Shawn Johnson

i created a database service to create entries in my collection where i have to pointers.

When I test the service, it works but when I try to update via postman
I get the following error

{
"code": "DBSC234",
"description": "Creation and modification objects with system fields not allowed."
}

Here is my headers and json objects Image

I need to create postman files for another developer to be able to implement the service restful calls

not sure why i am getting this error


issues updating collection with pointers with restful call

Posted: Wed Apr 23, 2014 8:59 pm
by Kateryna Grynko

Hi Shawn,

Did you get session token using postman (doing login request)?


issues updating collection with pointers with restful call

Posted: Wed Apr 23, 2014 9:14 pm
by Shawn Johnson5765444

Yes I did get a session token


issues updating collection with pointers with restful call

Posted: Thu Apr 24, 2014 3:09 pm
by Kateryna Grynko

Shawn,

You seem to use an incorrect request. You cannot update more than one field at once, so you'll need to use this URL:

codehttps://api.appery.io/rest/1/db/collections/collectionName/objectId/code

Where 'collectionName' is a collection name,
'objectId' is an object ID.

Pass all the parameters you want to change as form-data.


issues updating collection with pointers with restful call

Posted: Thu Apr 24, 2014 3:18 pm
by Shawn Johnson

sorry for the confusion I am trying to create entries in the collection. Not update them. I am doing this via POST.


issues updating collection with pointers with restful call

Posted: Thu Apr 24, 2014 3:45 pm
by Kateryna Grynko

Shawn,

The just pass all the needed fields, as как form-data and do not pass an ID (it is generated automatically).

You can still send only 1 object in one request.


issues updating collection with pointers with restful call

Posted: Thu Apr 24, 2014 3:52 pm
by Shawn Johnson

That does not seem to work,

I get an error
code": "DBSC007",
"description": "Serialization error"
Image


issues updating collection with pointers with restful call

Posted: Thu Apr 24, 2014 5:15 pm
by Kateryna Grynko

Hi Shawn,

Do you have these collection columns (_users, activites) ? Please try recreating session token.


issues updating collection with pointers with restful call

Posted: Thu Apr 24, 2014 6:34 pm
by Shawn Johnson

Yes, I do

Image

I tried updating the session token

I also tried changing the "_users", to "user_id"

Image


issues updating collection with pointers with restful call

Posted: Thu Apr 24, 2014 8:19 pm
by Kateryna Grynko

Hi Shawn,

Why do you pass different data in service test and in Postman? If we understand you correctly, you want to do the same in Postman, right?