{"id":27158910,"url":"https://github.com/activecollab/activecollab-sdk","last_synced_at":"2025-04-08T22:39:27.664Z","repository":{"id":11954503,"uuid":"14525519","full_name":"activecollab/activecollab-sdk","owner":"activecollab","description":"Easy to use activeCollab API communication library","archived":false,"fork":false,"pushed_at":"2015-12-19T21:06:14.000Z","size":22,"stargazers_count":24,"open_issues_count":5,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T13:03:28.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/activecollab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-19T13:38:11.000Z","updated_at":"2024-07-11T21:54:57.000Z","dependencies_parsed_at":"2022-09-01T14:41:53.582Z","dependency_job_id":null,"html_url":"https://github.com/activecollab/activecollab-sdk","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Factivecollab-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Factivecollab-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Factivecollab-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Factivecollab-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/activecollab","download_url":"https://codeload.github.com/activecollab/activecollab-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247941718,"owners_count":21022035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-08T22:39:27.022Z","updated_at":"2025-04-08T22:39:27.647Z","avatar_url":"https://github.com/activecollab.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# activeCollab SDK\n\nThis is a simple PHP library that makes communication with [activeCollab 4 API](https://www.activecollab.com/help/books/api/index.html) easy. **If you are looking for a library that works with Active Collab 5 and newer, use [this package](https://github.com/activecollab/activecollab-feather-sdk) instead**.\n\n## First Connection\n\nPull down the latest tag (``1.0.x``) for the following example. The ``develop`` branch is not to be used with activeCollab 4.2.x!\n\nIn order to connect, you will need API URL and API token. \n\nTo get these details, go to your user profile in your activeCollab and select **API Subscriptions** from **Options** drop-down. Click on **New Subscription** button and fill the form (client name is name of your app that will communicate with activeCollab via API). After you create API subscription for your application, click on the magnifier glass icon to open a dialog that will show you API URL and token for that subscription.\n\nNow that you have API token and URL, you can test out this simple example:\n\n```php\n\u003c?php\n\n  require_once 'ActiveCollab/autoload.php';\n\n  use \\ActiveCollab\\Client as API;\n  use \\ActiveCollab\\Connectors\\Curl as CurlConnector;\n  use \\ActiveCollab\\Exceptions\\AppException;\n\n  API::setUrl('MY-API-URL');\n  API::setKey('MY-API-TOKEN');\n  API::setConnector(new CurlConnector);\n\n  print '\u003cpre\u003e';\n  print_r(API::info());\n  print '\u003c/pre\u003e';\n```\n\nThis example will contact activeCollab and ask for application and user info. Response is a simple associative array with a lot of details about the system that you are communicating with.\n\n## Using Composer\n\nIf you choose to install this application with composer instead of pulling down the git repository you will need to add a composer.json file to the location you would like to pull the repository down to featuring:\n\n```json\n{\n    \"require\": {\n        \"activecollab/activecollab-sdk\": \"1.0.*\"\n    }\n}\n```\n    \nRun a ``composer update`` to install the package. To test the API add the following to a php file and run it.\n\n```php\n\u003c?php\n\n  require_once 'vendor/autoload.php';\n\n  use \\ActiveCollab\\Client as API;\n  use \\ActiveCollab\\Connectors\\Curl as CurlConnector;\n  use \\ActiveCollab\\Exceptions\\AppException;\n\n  API::setUrl('MY-API-URL');\n  API::setKey('MY-API-TOKEN');\n  API::setConnector(new CurlConnector);\n\n  print '\u003cpre\u003e';\n  print_r(API::info());\n  print '\u003c/pre\u003e';\n```\n\n# Making API Calls\n\nListing all tasks in project #65 is easy. Just call:\n\n```php\nAPI::call('projects/65/tasks');\n```\n\nThis example shows how you can create a new task in a selected project:\n\n```php\ntry {\n  API::call('projects/65/tasks/add', null, array(\n    'task[name]' =\u003e 'This is a task name',\n    'task[assignee_id]' =\u003e 48,\n    'task[other_assignees]' =\u003e array(3, 1),\n  ), array(\n    '/attach.jpeg'\n  ));\n} catch(AppException $e) {\n  print $e-\u003egetMessage() . '\u003cbr\u003e\u003cbr\u003e';\n  // var_dump($e-\u003egetServerResponse()); (need more info?)\n} // try\n```\n\n``call()`` method can take four parameters:\n\n1. ``command`` (required) - API command,\n2. ``extra command parameters`` (optional) - Extra variables that will be attached to the command. Most commands don't require any extra command parameters, but some do (like ``dont_limit_result `` param for [Tracked time and expenses listing](https://www.activecollab.com/help/books/api/time-and-expenses.html#s-tracking) command),\n3. ``POST variables`` - array of POST variables. Note that you do not need to add ``submitted`` variable (it is automatically added for you),\n4. ``attachments`` - List of file paths that should be attached to the object that is being created or updated.\n\nFor full list of available API command, please check [activeCollab API documentation](https://www.activecollab.com/help/books/api/index.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivecollab%2Factivecollab-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factivecollab%2Factivecollab-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivecollab%2Factivecollab-sdk/lists"}