Users

Fields

id
user's unique identifier number
created-at
user's creation time
updated-at
user's last update time
alias
user's alias
email
user's email
name
user's name
picture_url
user's avatar picture url
time-zone
user's time zone
user-type
user's type - 0 => Company Admin; 1 => Internal User; 2 => External User

Methods

get_all

returns all users in the company or in a project

Parameters

  • project: PROJECT_ALIAS - not mandatory. If present returns only the users that can access the specified project
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/api/users/get_all 
http://company_alias.goplanapp.com/api/users/get_all?format=json&callback=handlerFunction

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <users type="array">
    	<user>
    		<alias>mary</alias>
    		<id type="integer">1</id>
    		<created-at type="datetime">2009-03-03T19:46:18+00:00</created-at>
    		<email>user1@myemail.com</email>
    		<name>Mary</name>
    		<picture-url>http://goplanapp.com/content/server.jpg</picture-url>
    		<time-zone>Lisbon</time-zone>
    		<updated-at type="datetime">2009-04-13T13:35:13+01:00</updated-at>
    		<user-type type="integer">0</user-type>
    	</user>
    	<user>
    		<id type="integer">2</id>
    		<alias>robert</alias>
    		<created-at type="datetime">2009-03-03T20:40:43+00:00</created-at>
    		<email>user2@myemail.com</email>
    		<name>Robert</name>
    		<picture-url>http://goplanapp.com/content/server.jpg</picture-url>
    		<time-zone>Lisbon</time-zone>
    		<updated-at type="datetime">2009-04-02T17:24:48+01:00</updated-at>
    		<user-type type="integer">0</user-type>
    	</user>
    	<user>
    		<id type="integer">3</id>
    		<alias>Roger</alias>
    		<created-at type="datetime">2009-03-04T16:14:01+00:00</created-at>
    		<email>user3@myemail.com</email>
    		<name>roger</name>
    		<picture-url>http://goplanapp.com/content/server.jpg</picture-url>
    		<time-zone>UTC</time-zone>
    		<updated-at type="datetime">2009-04-13T15:58:45+01:00</updated-at>
    		<user-type type="integer">0</user-type>
    	</user>
    </users>
        
  • JSON

    
    handlerFunction([{"user": {"id": 1, "name": "Mary", "updated_at": "2009/03/03 18:48:59 +0000", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "time_zone": "Lisbon", "alias": "mary", "email": "user1@myemail.com", "created_at": "2009/03/03 18:48:59 +0000"}}, {"user": {"id": 1, "name": "Robert", "updated_at": "2009/04/09 16:16:58 +0100", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "time_zone": "UTC", "alias": "Robert", "email": "user2@myemail.com", "created_at": "2009/03/03 18:49:43 +0000"}}, {"user": {"id": 1, "name": "Roger", "updated_at": "2009/04/13 13:35:13 +0100", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "time_zone": "Lisbon", "alias": "roger", "email": "user3@myemail.com", "created_at": "2009/03/03 19:46:18 +0000"}}])
    		

get

returns a specific user

Parameters

  • id: USER_ID - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/api/users/get/2 
http://company_alias.goplanapp.com/api/users/get?id=2&format=json&callback=handlerFunction

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <user>
    	<alias>roger</alias>
    	<id type="integer">1</id>
    	<created-at type="datetime">2009-03-03T19:46:18+00:00</created-at>
    	<email>user@myemail.com</email>
    	<name>Roger</name>
    	<picture-url>http://goplanapp.com/content/server.jpg</picture-url>
    	<time-zone>Lisbon</time-zone>
    	<updated-at type="datetime">2009-04-13T13:35:13+01:00</updated-at>
    	<user-type type="integer">0</user-type>
    </user>
        
  • JSON

    
    {"user": {"id": 1, "name": "Mary", "updated_at": "2009/03/03 18:48:59 +0000", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "time_zone": "Lisbon", "alias": "mary", "email": "user@myemail.com", "created_at": "2009/03/03 18:48:59 +0000"}}
    		

add_to_company

creates a new internal user or makes an external user -> internal and returns it

Parameters

  • user[email]: user_EMAIL - mandatory
  • user[password]: password that the new user will use to log on - mandatory
  • user[name]: user_NAME - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/api/users/add_to_company pass other parameter by post
http://company_alias.goplanapp.com/api/users/add_to_company?id=2&format=json&callback=handlerFunction (etc)

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <user>
    	<alias>roger</alias>
    	<id type="integer">1</id>
    	<created-at type="datetime">2009-03-03T19:46:18+00:00</created-at>
    	<email>xuser@myemail.com</email>
    	<name>Roger</name>
    	<picture-url>http://goplanapp.com/content/server.jpg</picture-url>
    	<time-zone>Lisbon</time-zone>
    	<updated-at type="datetime">2009-04-13T13:35:13+01:00</updated-at>
    	<user-type type="integer">0</user-type>
    </user>
        
  • JSON

    
    {"user": {"id": 1, "name": "Mary", "updated_at": "2009/03/03 18:48:59 +0000", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "time_zone": "Lisbon", "alias": "mary", "email": "user@myemail.com", "created_at": "2009/03/03 18:48:59 +0000"}}
    		

add_to_project

creates a new external user and returns it

Parameters

  • user[email]: user_EMAIL - mandatory
  • user[password]: password that the new user will use to log on - mandatory
  • user[name]: user_NAME - mandatory
  • project: project_ALIAS - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	FIXME
	http://company_alias.goplanapp.com/project_alias/api/users/add_to_project pass other parameter by post
http://company_alias.goplanapp.com/api/users/add_to_project?project=project_alias&format=json&callback=handlerFunction (etc)

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <user>
    	<alias>roger</alias>
    	<id type="integer">1</id>
    	<created-at type="datetime">2009-03-03T19:46:18+00:00</created-at>
    	<email>xuser@myemail.com</email>
    	<name>Roger</name>
    	<picture-url>http://goplanapp.com/content/server.jpg</picture-url>
    	<time-zone>Lisbon</time-zone>
    	<updated-at type="datetime">2009-04-13T13:35:13+01:00</updated-at>
    	<user-type type="integer">0</user-type>
    </user>
        
  • JSON

    
    {"user": {"id": 1, "name": "Mary", "updated_at": "2009/03/03 18:48:59 +0000", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "time_zone": "Lisbon", "alias": "mary", "email": "user@myemail.com", "created_at": "2009/03/03 18:48:59 +0000"}}
    		

remove_from_company

revokes the user's access to a company

Parameters

  • id: user_ID - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/api/users/remove_from_company/3
http://company_alias.goplanapp.com/api/users/remove_from_company?id=3&format=json&callback=handlerFunction

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <user>
    	<alias>roger</alias>
    	<id type="integer">1</id>
    	<created-at type="datetime">2009-03-03T19:46:18+00:00</created-at>
    	<email>xuser@myemail.com</email>
    	<name>Roger</name>
    	<picture-url>http://goplanapp.com/content/server.jpg</picture-url>
    	<time-zone>Lisbon</time-zone>
    	<updated-at type="datetime">2009-04-13T13:35:13+01:00</updated-at>
    	<user-type type="integer">0</user-type>
    </user>
        
  • JSON

    
    {"user": {"id": 1, "name": "Mary", "updated_at": "2009/03/03 18:48:59 +0000", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "time_zone": "Lisbon", "alias": "mary", "email": "user@myemail.com", "created_at": "2009/03/03 18:48:59 +0000"}}
    		

remove_from_project

revokes the user's access to a project

Parameters

  • id: user_ID - mandatory
  • project: project_ALIAS - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/project_alias/api/users/remove_from_project/3
http://company_alias.goplanapp.com/api/users/remove_from_project?project=project_alias&id=3&format=json&callback=handlerFunction

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <user>
    	<alias>roger</alias>
    	<id type="integer">1</id>
    	<created-at type="datetime">2009-03-03T19:46:18+00:00</created-at>
    	<email>xuser@myemail.com</email>
    	<name>Roger</name>
    	<picture-url>http://goplanapp.com/content/server.jpg</picture-url>
    	<time-zone>Lisbon</time-zone>
    	<updated-at type="datetime">2009-04-13T13:35:13+01:00</updated-at>
    	<user-type type="integer">0</user-type>
    </user>
        
  • JSON

    
    {"user": {"id": 1, "name": "mary", "updated_at": "2009/03/03 18:48:59 +0000", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "time_zone": "Lisbon", "alias": "mary", "email": "user@myemail.com", "created_at": "2009/03/03 18:48:59 +0000"}}
    		

Follow us on Twitter and Facebook. Talk to us and Get Satisfaction.

Goplan is a product of Reinhardt Media, Ltd. | Contact support | Terms of Service