Access Keys:
Skip to content (Access Key - 0)

Mule iON - Contents

Using the REST API

The iON REST API provides a way for you to programmatically access much of iON's functionality. It allows you to:

  • Create applications
  • Change application properties, including the number of workers and environment variables
  • Deploy a new version of your application
  • Delete your application
  • Get statistics about your application
  • Get logs for your application
Already familiar with the API? Jump straight to the operations:

Before getting started with specific operations, be sure you're familiar with:

Data Format

All resources or methods that return or accept a type use the JSON as the data format. As an example, here's data you might receive, in JSON format, in response to a request to get an application:

{
  "domain":"hello",
  "fullDomain":"hello.muleion.com",
  "workers":1,
  "hasFile":false,
  "muleVersion", "3.1.2"
  "properties": {
    "foo":"bar"
  },
  "status":"STARTED",
  "workerStatuses":[
     {
       "id":"",
       "host":"xxx.xxx.xxx.xxx",
       "port":8081,
       "status":"STARTED"
     }
   ]
}

Getting Started and Authenticating with the API

To use the API, you can use any HTTP client. All APIs use JSON as the data format. If you use Java, we recommend you use the Jersey client or HttpClient with Jackson for JSON support.

All APIs require HTTP basic authentication using your iON username and password.

Status Codes and Error Handling

When you call the REST APIs, the following status codes are returned:

Status Code Description
200 The operation was successful.
201 The resource (such as, application) was created. The Location header will contain the location of the resource.
404 The resource was not found.
409 When creating a resource (such as, server, server group, or deployment), a resource with that name already exists.
500 The operation was unsuccessful. See the HTTP body for details.

When errors occur (for example, a 500 status code), the HTTP response contains a JSON response with an error message. For example:

500
Content-Type: application/json
Server: Apache-Coyote/1.1
Date: Sun, 08 Nov 2009 00:12:55 GMT

{
  message : "Some error message."
}
Adaptavist Theme Builder (4.2.2) Powered by Atlassian Confluence 3.4.7, the Enterprise Wiki