Page 1 of 2

create new users collection?

Posted: Wed Jul 16, 2014 8:24 pm
by Ololade

the predefined users collection doesn't allow me to use a list service... that service option doesn't show up... is it worth it to create my own users table? how would I do that...? OR can this be done with the collections that i already have...?

My initial plan had been to store usernames and passwords in the first "collection" and link to another collection where I track their answers to questions and point totals for participating... (I need to track "point totals" by individual user as well as point totals for whichever program area they work under.)

These collections, together, would have data that I would put together in order to display a user profile at certain points in time.

I am incredibly frustrated and have looked at all the links available. :( I need someone to explain how to do this in detail please.

Thanks


create new users collection?

Posted: Wed Jul 16, 2014 9:47 pm
by Kateryna Grynko

Hi Ololade,

You could add additional columns to Users collection:
http://devcenter.appery.io/documentat...


create new users collection?

Posted: Wed Jul 16, 2014 9:55 pm
by Ololade

Hi Katya,

Thank you for such a quick response. My issue is that I did that-- but I don't know how to retrieve those data for the 'user profile' since the "list" service doesn't show up as an option for the users collection...

does that make sense?


create new users collection?

Posted: Wed Jul 16, 2014 9:55 pm
by Ololade

Hi Katya,

Thank you for such a quick response. My issue is that I did that-- but I don't know how to retrieve those data for the 'user profile' since the "list" service doesn't show up as an option for the users collection...

does that make sense?


create new users collection?

Posted: Thu Jul 17, 2014 9:55 pm
by Yurii Orishchuk

Hi Ololade,

You can use list service for system users collection.

To get this service follow steps below:

1 Create new REST service and give it name "getUsers".

2 Use following settings for the "Settings" tab: http://prntscr.com/43ps4j/direct

pre

Code: Select all

 URL - https://api.appery.io/rest/1/db/users 
 Method - get 
 Data Type - json 
 Settings - your DB settings 

/pre

3 Use following settings for Request tab: http://prntscr.com/43ptav/direct

pre

Code: Select all

 X-Appery-Database-Id - {database_id} 
 X-Appery-Session-Token - you should use here right user sessiong token. 
 where - optional if needs. 

/pre

4 Open Response tab and create response with parameters you need: see example on the screen shot:
http://prntscr.com/43pwc5/direct

Then navigate to "test" tab and then you can test your service:

http://prntscr.com/43pww9/direct

Regards.


create new users collection?

Posted: Fri Jun 19, 2015 3:53 pm
by RobertJay

Yurii, two questions. First, does your approach involve use a "generic service"? Second, does Appery have any plans to simply allow queries and lists to be added as a regular service from the user collection?


create new users collection?

Posted: Mon Jun 22, 2015 1:25 am
by Yurii Orishchuk

Hi Robert,

1 Nope, that's not a Generic service.
Please check following screen shot to see how create this service:
http://prntscr.com/7js1sx/direct

2 Unfortunatly at this time we don't have such information.

Please read here additional information about users api here: https://devcenter.appery.io/documenta...

Regards.


create new users collection?

Posted: Tue Jul 28, 2015 10:28 pm
by Jack Bua

Hi Yurii,
I received the following in my test:

{
"status":400,
"uri":"https://api.appery.io/rest/1/db/users",
"response":{
"code":"DBUQ002",
"description":"database id not specified"
}
}

and have posted about it here:

https://getsatisfaction.com/apperyio/...
could you take a look at this and tell me what you think please?

Thank you.


create new users collection?

Posted: Mon Aug 03, 2015 3:13 am
by Yurii Orishchuk

Hi Jack,

You use " X-Appery-Database-Id" parameter in headers.

But correct is: "X-Appery-Database-Id"

You need to delete whitespace in the beginning on the this parameter name.

Regards.


create new users collection?

Posted: Mon Aug 03, 2015 3:22 am
by Jack Bua

Thank you Yurii, that fixed my problem.

I have a question about the session token. I grabbed one from a login and placed it into the service. That one will be used every time now. It that ok or do I need to change it to grab each session?