Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

issues updating collection with pointers with restful call

Yes I want to pass the same fields i am using in service test in postman, I have double checked not sure what you see as different, I did check _users to userid because i was trying to get it to work.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

issues updating collection with pointers with restful call

Hi Shawn,

Please specify how do you invoke this request https://d2r1vs3d9006ap.cloudfront.net...

Is it just request generating? If so - please show us screen shot of request headers and data from this request.

Also it seems to be you are using incorrect payload data. You should send is as JSON.

Please see correct create request:
Image

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

issues updating collection with pointers with restful call

I have create an entry in postman I add the database and session token to the request

Here is network request information

Image

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

issues updating collection with pointers with restful call

Shawn,

As we can see you have wrong data paypload. http://prntscr.com/3d6d2k/direct

Payload data should be in json format. Please see correct format here: http://prntscr.com/3d5rio/direct

So you should change your request in postman.

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

issues updating collection with pointers with restful call

Can you please explain how to format this request correctly, please see in my initial post I had the request in raw json,

{"id":"53504821e4b0e44dd0271236","collName":"users"},
{"_id":"535815c3e4b038230583fb11","collName":"activities"}

which gives a different error message

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

i was told to change to form data.

and now the payload is not formatted correct

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

issues updating collection with pointers with restful call

as you can see here the request is formatted json Image

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

issues updating collection with pointers with restful call

Shawn,

Please make screen shots of your worked request (request and response) and please make the same screen shots for request from postman.
So we will take a look.

For now hard to tell exactly what is wrong.

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

issues updating collection with pointers with restful call

Here is the screen shots

  1. The successful request from the databaseservice with response
    Image

    Here is the postman request it's not working

    Image

    here is the network request info

    Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

issues updating collection with pointers with restful call

Hello!

It's dificult to say what's wrong with your request as we don't see your application . But even in screenshots posted we can see you don't pass the same values in Postman and in Test page of Appery.io builder.
Here is some advice - it's better to create page with button and call service, which create record in database, on event "Click" of this button. Then test your application and compare requests from your application and from Postman (use Developers tools in chrome).

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

issues updating collection with pointers with restful call

Hi Shawn,

When field 'activites' of type 'pointer' refers to collection 'activites' - use data of type 'raw' to send "create" request:
pre{"activites":{"collName":"activites", "_id":"52fa49cee4b0a25c11c85b88"},"nextFildName":"nextValue"}/pre
Where code"nextFildName":"nextValue"/code is a list of other fields for recording data.

Return to “Issues”