Mozillians/API-Specification/List Users/: Difference between revisions

 
(13 intermediate revisions by 2 users not shown)
Line 19: Line 19:
| style="text-align:center" | N
| style="text-align:center" | N
| Your app key  
| Your app key  
|-
| '''app_name'''
| string
| style="text-align:center" | Y
| style="text-align:center" | N
| Your app name
|-
|-
| '''is_vouched'''
| '''is_vouched'''
| string <br/> [true false]
| string <br/> [true false]
| style="text-align:center" | N
| style="text-align:center" | N
| style="text-align:center" | N (Required For Community)
| style="text-align:center" | Y
| Flag to return users that are vouched or not.  
| Flag to return users that are vouched or not.  
|-
| '''username'''
| string
| style="text-align:center" | N
| style="text-align:center" | Y
| Return user with matching username.
|-
| '''ircname'''
| string
| style="text-align:center" | N
| style="text-align:center" | Y
| Return user with matching ircname.
|-
|-
| '''email'''
| '''email'''
| string  
| string  
| style="text-align:center" | N
| style="text-align:center" | N / Y (Required For Community)
| style="text-align:center" | Y
| style="text-align:center" | Y
| Return user with matching email.  
| Return user with matching email.  
Line 81: Line 99:
|-
|-
| '''format'''
| '''format'''
| string <br/> [json xml]  
| string <br/> [json jsonp]  
| style="text-align:center" | N
| style="text-align:center" | N
| style="text-align:center" | N
| style="text-align:center" | N
Line 99: Line 117:
|-
|-
| '''401: Unauthorized'''
| '''401: Unauthorized'''
| Wrong AppName or AppKey or App not activated  
| Wrong app_name or app_key or App not activated  
|}
|}


== Examples: Community Apps  ==
== Examples: Community Apps  ==
* /api/v1/users/?appname=foobar&appkey=12345&email=test@example.com
* /api/v1/users/?app_name=foobar&app_key=12345&email=test@example.com


     {
     {
Line 123: Line 141:
     }
     }


* /api/v1/users/?appname=foobar&appkey=12345&email=test@example.com&format=xml
* /api/v1/users/?app_name=foobar&app_key=12345&email=test@example.com&format=xml


     <?xml version='1.0' encoding='utf-8'?>
     <?xml version='1.0' encoding='utf-8'?>
Line 142: Line 160:
     </response>
     </response>


* /api/v1/users/?appname=foobar&appkey=12345
* /api/v1/users/?app_name=foobar&app_key=12345
   FORBIDDEN
   FORBIDDEN


* /api/v1/users/1/?appname=foobar&appkey=12345
* /api/v1/users/1/?app_name=foobar&app_key=12345
   FORBIDDEN
   FORBIDDEN


== Examples: Mozilla Apps  ==
== Examples: Mozilla Apps  ==  
* /api/v1/users/?appname=foobar&appkey=12345
* /api/v1/users/?app_name=foobar&app_key=12345


     {
     {
Line 163: Line 181:
       [
       [
           {
           {
              "username": "foobar",
              "ircname": "foobar",
               "bio": "",
               "bio": "",
               "city": "",
               "city": "",
               "country": "",
               "country": "",
               "display_name": "Example Test",
               "full_name": "Foo Bar",
               "email": "test@example.com",
               "email": "test@example.com",
               "groups":
               "groups":
Line 191: Line 211:
     }
     }


== Examples: Mozilla Apps: Query By User ID  ==
== Examples: Mozilla Apps: Query By User ID  ==  
* /api/v1/users/1/?appname=foobar&appkey=12345
* /api/v1/users/1/?app_name=foobar&app_key=12345


     {
     {
      "username": "foobar",
      "ircname": "foobar",
       "bio": "",
       "bio": "",
       "city": "",
       "city": "",
       "country": "",
       "country": "",
       "display_name": "Example Test",
       "full_name": "Foo Bar",
       "email": "test@example.com",
       "email": "test@example.com",
       "groups":
       "groups":
Line 220: Line 242:
       "website": ""
       "website": ""
     }
     }
== Examples: Mozilla Apps: More Filters  ==
Mozilla Apps can use more filters on results:
* Filter by ''country'':
  /api/v1/users/?app_name=foobar&app_key=12345&country=Greece
* Filter by ''region'':
  /api/v1/users/?app_name=foobar&app_key=12345&region=California
* Filter by ''city'':
  /api/v1/users/?app_name=foobar&app_key=12345&city=Mountain%20View
* Filter by ''ircname'':
  /api/v1/users/?app_name=foobar&app_key=12345&ircname=foobar
* Filter by ''username'':
  /api/v1/users/?app_name=foobar&app_key=12345&username=foobar
* Filter by ''languages'':
  /api/v1/users/?app_name=foobar&app_key=12345&languages=Greek
* Filter by ''skills'':
  /api/v1/users/?app_name=foobar&app_key=12345&skills=Python
* Filter by ''groups'':
  /api/v1/users/?app_name=foobar&app_key=12345&groups=Staff
* Filter by ''name'':
  /api/v1/users/?app_name=foobar&app_key=12345&name=foo
* Filters can be combined, e.g. ''python'' and ''brazil'':
  /api/v1/users/?app_name=foobar&app_key=12345&country=brazil&skills=python
Confirmed users
60

edits