Users API
Endpoint: http://geocommons.com/users
Description: Used to create, modify and delete GeoCommons and GeoIQ users.
HTTP Methods Available: GET POST PUT DELETE
URL Summary:
| Task | URL | Formats | HTTP METHOD |
| create | http://geocommons.com/users.{format} | json | POST |
| retrieve | http://geocommons.com/users/{username}.{format} | json | GET |
| modify | http://geocommons.com/users/{username}.{format} | json | PUT |
| delete | http://geocommons.com/users/{username}.{format} | json | DELETE |
Create User
Authentication:
Authentication not required for GeoCommons. GeoIQ appliances where user sign-up is disabled require basic authentication by an administrative user account.
Required Parameters:
| Parameter | Description | Example |
| user[login] | username that the user will login with | user[login]=johndoe |
| user[password] | password the user will login with | user[password]=s3curepassword |
| user[password_confirmation] | sample information as password the user will login with | user[password_confirmation]=s3curepassword |
| user[email] | users email address | user[email]=john@example.com |
| user[fullname] | full name of the person whose account it is | “user[fullname]=John G. Doe” |
Optional Parameters: (none)
Returns:
| Type | Description | Example |
| user object | returns id, login,email of created user | User} |
Curl Examples:
curl -i -X POST -d "user[login]=sampleapiuser" -d "user[password]=password" -d "user[password_confirmation]=password" -d "user[email]=sampleapiuser@example.com" -d "user[fullname]=Sample A. User" http://geocommons.com/users.json
Retrieve User Info
Authentication:
Not required, but to get full user information basic authentication is required and the account must also be an administrator
Required Parameters: (none)
Optional Parameters: (none)
Curl Examples:
curl -u "username:password" http://geocommons.com/users/kate.json
Modify User
Authentication:
Must use basic authentication utilizing the account of the user being modified or an administrative account
Required Parameters: (none)
Optional Parameters:
| Parameter | Description | Example |
| user[password] | password the user will login with | user[password]=s3curepassword |
| user[password_confirmation] | sample information as password the user will login with must be used in conjunction with user[password] if modifying a users password | user[password_confirmation]=s3curepassword |
| user[email] | users email address | user[email]=john@example.com |
| user[fullname] | full name of the person whose account it is | “user[fullname]=John G. Doe” |
Curl Examples:
curl -i -u "username:password" -X PUT -d "user[email]=anotheremail@example.com" http://geocommons.com/users/sampleapiuser.json
curl -i -u "username:password" -X PUT -d "user[password]=newpassword" -d "user[password_confirmation]=newpassword" http://geocommons.com/users/sampleapiuser.json
Groups API
Endpoint: http://geocommons.com/groups
Description: The Groups API allows creation of groups of users to allow for granular access control to maps, data and analysis within GeoIQ.
HTTP Methods Available: GET, POST, PUT, DELETE
URL Summary:
| Task | URL | Formats | HTTP METHOD |
| create | http://geocommons.com/groups.{format} | json | POST |
| add user | http://geocommons.com/groups/{id}/users.{format} | json | POST |
| list group users | http://geocommons.com/groups/{id}/users.{format | json | GET |
| delete | http://geocommons.com/groups/{id}.{format} | json | DELETE |
Create Group
Authentication:
Basic authentication is required for both GeoCommons and GeoIQ appliances. The account being used must also be an administrator.
Required Parameters:
| Parameter | Description | Example |
| group[name] | the name of the group | group[name]=thegroup |
Optional Parameters: (none)
| Type | Description | Example |
| Location | returns the URI of the file requested | http://geocommons.com/groups/23360.json |
Curl Examples:
curl -u "user:password" -X POST -i -d "group[name]=example_group" http://geocommons.com/groups.json
Add User to Group
Authentication:
Basic authentication is required for both GeoCommons and GeoIQ appliances. The account being used must also be an administrator.
Required Parameters:
| Parameter | Description | Example |
| “username” | user to be added to the group | kate |
Optional Parameters: (none)
Curl Examples:
curl -i -u "user:password" -d "kate" -X POST http://geocommons.com/groups/23150/users.json
List Group Users
Authentication:
Basic authentication is required for both GeoCommons and GeoIQ appliances. The account being used must also be an administrator.
Required Parameters: (none)
Optional Parameters: (none)
Curl Examples:
curl -u "user:password" http://geocommons.com/groups/23150/users.json
Delete Group
Authentication:
Basic authentication is required for both GeoCommons and GeoIQ appliances. The account being used must also be an administrator.
Required Parameters: (none)
Optional Parameters: (none)
Curl Examples:
curl -u "user:password" -X DELETE http://geocommons.com/groups/23150.json
GeoIQ Blog- TechCamp April 30, 2012 Andrew Turner
- Visualizing our Changing Climate with Climascope April 27, 2012 Andrew Turner
- World Bank Annual Meetings April 23, 2012 Andrew Turner
- Just in Time Analytics – Kanban for Big Data April 5, 2012 Sean Gorman
- GeoIQ team at Where2.0, JSConf, FOSS4G-NA March 22, 2012 Andrew Turner
