These are the general instructions for using the API, the API is designed to be based on a single endpoint, and from there with a cmd parameter, you can input the desired actions.
- In order to access the API, the client must hit the [FogBugz URL]/api.xml
- For example, if the URL is http://www.example.com/fogbugz, hit http://www.example.com/fogbugz/api.xml. Or if your FogBugz On Demand account is https://example.fogbugz.com, hit https://example.fogbugz.com/api.xml.
- If this returns an HTTP error (file missing) you can safely assume that either FogBugz is not installed at that location, or else it is installed, but it is a version of FogBugz that does not include the API.
- If the FogBugz URL includes an id (e.g. id=xxx for a FogBugz trial or hosted version of FogBugz), you can leave this out for the purpose of downloading api.xml.
- api.xml simply tells you what version of the FogBugz API is supported, and gives you the URL for further calls to the API. The file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
- The url field gives you the beginning of the URL you should use for all further calls to the API. This would be “api.asp?” for a typical FogBugz install (FogBugz 7 or later) or “api.php?” for a php install (FogBugz 6.1 or earlier).
- The minversion field is used to warn you if the current version of the API is not backward compatible. For example, if this version is 3, and it is backward compatible with clients written for version 2 but not backward compatible with version 1, you’ll see:
- API clients must check minversion and make sure it’s less than or equal to the version that was current when they were written.
- The private tag can almost always be ignored by non-FogBugz API clients. It is used by the FogBugz server to indicate to a client that a new version of some API client software is available on the FogBugz server. For example, the following tag might be interpreted by the FogBugz for Visual Studio Add-in to mean that version 3 is now available on the server where it can be downloaded from the URL setup-msvs.exe
<private id="FogBugz for Visual Studio" version="3" url="setup-msvs.exe" />
See also the full XML API documentation.