If you use your own server (on-premise), then append /api to its URL to read the corresponding documentation.
Authentication
All API calls require authentication. The first step consists in generating a token by opening the corresponding tab in your profile. Give your token a name in order to recognize it.
Tokens give full access to your account through the iceScrum API. To use a token to authenticate a request, add the x-icescrum-token HTTP header.
x-icescrum-token: bezfjoqspo54zefzefe845e58sf
For compatibility with external services, aliases can also be used: x-gitlab-token, x-auth-token. If you cannot control the HTTP header, you can provide the token using icescrum-token query parameter in the URL, however this is less secure and should be avoided if possible.
Permissions
When using an authentication token that belongs to a user, you get all the permissions of this user.
Thus, performing an action through the API requires the same role as it would in the UI (e.g. Product Owner, Administrator…). That means that depending on what you need to do you may need to switch users or adjust the roles (see the roles and permissions documentation).
Similarly, like in the UI some actions will be available only if you enable the corresponding App or if items have a specific state.
Data format
Most iceScrum endpoints produce JSON so you must set the Accept HTTP request header to application/json.
Here is a sample of JSON data returned by iceScrum:
If you send data to iceScrum, also add the Content-Type header to application/json and provide your JSON data as the HTTP request body.
There is a difference between the data you receive and the data you send to iceScrum: you must surround any item by an object with the item type in camel case (starting with a lower-case letter) as a key. For example, to create a story set the following as your request body:
{
"story": {
"name": "this is a test"
}
}
Some enumerated fields such as story types are represented as numbers. The correspondance between the types and the associated numbers is provided in the Swagger Schemas.
More details regarding what you can send and receive for each endpoint can be found in the Swagger documentation.
URLs
All URLs starts by the URL of your iceScrum server followed by /ws/
http://iceScrumServer/ws/...
A sample URL adapted to your server is provided where you create tokens in iceScrum.
Variable parts of the URLs described in the Swagger documentation are surrounded by curly brackets. You need to replace them with the actual values you manipulate.
Examples
Here are examples of API calls using the cURL command line tool:
The main difference compared to the R6 API is authentication. Indeed, the API used to require username / password, which may be unsafe. The new API now uses tokens: in your account, you can create / revoke tokens at will and use them in API calls to authenticate yourself.
The new API capabilities should be at least equivalent, and even more powerful than before. However, URLs have been changed in order to provide a cleaner and more consistent API.
The format of payloads has been changed too to make full use of JSON objects so string nested properties should be expanded. For example, { “task.parentStory.id”: 42 } should be translated to { “task”: { “parentStory”: { “id”: 42 } } } with the new API.
The API doesn’t need to be enabled anymore, but it still requires an explicit action to be enabled since it now requires generating tokens.
Last, the XML format is no longer supported as it entailed a significant overhead while being superseded by JSON in most modern applications.