Question

The data from BASECAMP api is in xml format so for some projects, people JSON format is working well.

But how to resolve this problem from basecamp classic api.

  1. I have googled and find that basecamp api is in xml format but i want data in json format .

  2. I am just trying to fetch data in JSON format , but error shown in browser: You may have typed the URL incorrectly

  3. In there api they have mentioned to fetch GET /GET /categories/#{id}.xml .

Here is my Code :

 $Comments=$client->fetch('https://basecamp.com/*****/api/v1/categories.json');
Was it helpful?

Solution

We have two versions of Basecamp, each with their own API. For Basecamp Classic, your account will look like https://subdomain.basecamphq.com, while for the new Basecamp, your url will be https://basecamp.com/1234567

The Basecamp Classic API returns XML, and the docs are here. The new Basecamp API returns JSON, and the docs are here.

To get all of the categories from the Classic API, you'll want to use

https://#{subdomain}.basecamphq.com/projects/#{project_id}/categories.xml

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top