wp_query – show pages that have parent defined

To get only child pages (pages that have parent selected), you can use this query:

http://example.com/api/get_posts/?post_type=page&posts_per_page=1&orderby=rand&post_parent__not_in[]=

And that should also give you the answer for your second question, I guess 😉

If you want to pass array(1=>'foo', 2=>'bar') as param called my_array, you should use this query:

...&my_array[1]=foo&my_array[2]=bar