activeCollab offers several commands which are designed to allow other applications to create and manage company or user accounts.
When a new user account is created, a user can set the role_id to a custom value only if he/she is an Administrator or has the manage_people permission in their Role. If a user who creates an account is not an Administrator or People manager, then the user's role will be set to the default role configured on the Administration > Roles page.
Lists all the companies defined in the System, no matter if they are Active or Archived.
Method: GET
Example response:
<companies>
<company>
<id>...</id>
<name>...</name>
<created_on>...</created_on>
<permalink>...</permalink>
<office_address>...</office_address>
<office_phone>...</office_phone>
<office_fax>...</office_fax>
<office_homepage>...</office_homepage>
</company>
</companies>
This command will create a new company, and if the post is successful, then details of the newly created company will be returned.
Method: POST
Request example:
submitted=submitted company[name]=New Company
Example response:
<company> <id>...</id> <name>...</name> <created_on>...</created_on> <permalink>...</permalink> <office_address></office_address> <office_phone></office_phone> <office_fax></office_fax> <office_homepage></office_homepage> </company>
Displays the properties of a specific company.
Method: GET.
Example response:
<company>
<id>...</id>
<name>...</name>
<created_on>...</created_on>
<permalink>...</permalink>
<office_address></office_address>
<office_phone></office_phone>
<office_fax></office_fax>
<office_homepage></office_homepage>
<users>
...
</users>
<logo_url>...</logo_url>
</company>
Updates properties of an existing company. On success, updated company details are returned.
Method: POST.
Request example:
submitted=submitted company[name]=Updated Company Name
Response example:
<company> <id>...</id> <name>...</name> <created_on>...</created_on> <permalink>...</permalink> <office_address></office_address> <office_phone></office_phone> <office_fax></office_fax> <office_homepage></office_homepage> </company>
You can use this to delete a company and all of its users. Projects that this company and its users were assigned to will not be deleted! If successful, the system will return a HTTP status of 200 OK.
There is one company which can't be deleted - the Owner Company!
Method: POST.
Request example:
submitted=submitted
Creates a user account in the selected company. If successful, the function will display details of the newly created user account.
Only Administrators and people with manage_people permission included in their System Role can set role_id value. If a user who creates the new account is not an Administrator or People Manager, the default role ID will be used.
Method: POST.
Request example:
submitted = submitted user[email] = ilija@a51dev.com user[password] = new-password user[password_a] = new-password user[role_id] = 1
Response:
<user> <id>...</id> <company_id>...</company_id> <first_name>...</first_name> <last_name>...</last_name> <email>...</email> <last_visit_on>...</last_visit_on> <permalink>...</permalink> <role_id>...</role_id> <is_administrator>...</is_administrator> <is_project_manager>...</is_project_manager> <is_people_manager>...</is_people_manager> <token>...</token> </user>
Shows details of a specific user.
Method: GET
Example response:
<user>
<id>...</id>
<first_name>...</first_name>
<last_name>...</last_name>
<email>...</email>
<last_visit_on>...</last_visit_on>
<permalink>...</permalink>
<role_id>...</role_id>
<is_administrator>...</is_administrator>
<is_project_manager>...</is_project_manager>
<is_people_manager>...</is_people_manager>
<token>...</token>
<company>
<id>...</id>
<name>...</name>
<created_on>...</created_on>
<permalink>...</permalink>
<office_address>...</office_address>
<office_phone>...</office_phone>
<office_fax>...</office_fax>
<office_homepage>...</office_homepage>
</company>
<avatar_url>...</avatar_url>
</user>
Updates details of an existing user.
Method: POST.
Request example:
submitted = submitted user[first_name] = John user[last_name] = Doe
Example response:
<user>
<id>...</id>
<first_name>...</first_name>
<last_name>...</last_name>
<email>...</email>
<last_visit_on>...</last_visit_on>
<permalink>...</permalink>
<role_id>...</role_id>
<is_administrator>...</is_administrator>
<is_project_manager>...</is_project_manager>
<is_people_manager>...</is_people_manager>
<token>...</token>
<company>
<id>...</id>
<name>...</name>
<created_on>...</created_on>
<permalink>...</permalink>
<office_address>...</office_address>
<office_phone>...</office_phone>
<office_fax>...</office_fax>
<office_homepage>...</office_homepage>
</company>
<avatar_url>...</avatar_url>
</user>
Delete a specific user account. if successful, a HTTP 200 OK status will be returned.
Data created by this user - project, tickets, discussions, comments, etc. will not be deleted.
Method: POST.
Request example:
submitted = submitted