Adapters (GET)

Retrieves metadata for the list of deployed adapters.

Roles

Users in the following roles are authorized to perform this operation:

  • worklightadmin
  • worklightdeployer
  • worklightmonitor
  • worklightoperator

Method

GET

Path

/management-apis/1.0/runtimes/runtime-name/adapters

Example

https://www.example.com/worklightadmin/management-apis/1.0/runtimes/myruntime/adapters?locale=de_DE&offset=0&orderBy=name&pageSize=100

Path Parameters

runtime-name
The name of the runtime. This is the context root of the runtime web application, without the leading slash.

Query Parameters

Query parameters are optional.

locale
The locale used for error messages.
offset
The offset from the beginning of the list if only a part of the list (a page) should be returned.
orderBy
The sort mode. By default, the elements are sorted in increasing order. If the sort mode starts with - (minus sign), the elements are sorted in decreasing order. Possible sort modes are: name, deployTime. The default sort mode is: name.
pageSize
The number of elements if only a part of the list (a page) should be returned. The default value is 100.

Produces

application/json, application/xml, text/xml

Response

The metadata of the deployed adapters.

JSON Example

{
  "items" : [
    {
      "deployTime" : "2014-04-13T00:18:36.979Z",
      "description" : "My first sample adapter",
      "link" : "https://www.example.com/worklightadmin/management-apis/1.0/runtimes/myruntime/adapters/myadapter",
      "name" : "myadapter",
      "platformVersion" : "6.1.0.00.20131126-0630",
      "procedures" : [ "getSomething", ... ],
      "projects" : [
        {
          "name" : "myproject",
        },
        ...
      ],
      "urls" : [
        {
          "formParameters" : [
            {
              "defaultValue" : "n/a",
              "javaType" : "java.lang.String",
              "name" : "param",
            },
            ...
          ],
          "javaClass" : "com.example.MyRestWrapper",
          "javaMethodName" : "multiplyNumbers",
          "method" : "POST",
          "pathParameters" : [
            {
              "defaultValue" : "n/a",
              "javaType" : "java.lang.String",
              "name" : "param",
            },
            ...
          ],
          "queryParameters" : [
            {
              "defaultValue" : "n/a",
              "javaType" : "java.lang.String",
              "name" : "param",
            },
            ...
          ],
          "uri" : "/multiply",
        },
        ...
      ],
    },
    ...
  ],
  "pageSize" : 100,
  "productVersion" : "7.0.0",
  "startIndex" : 0,
  "totalListSize" : 33,
}

XML Example

<?xml version="1.0" encoding="UTF-8"?>
<adapters
  pageSize="100"
  productVersion="7.0.0"
  startIndex="0"
  totalListSize="33">
  <items>
    <item
      deployTime="2014-04-13T00:18:36.979Z"
      description="My first sample adapter"
      link="https://www.example.com/worklightadmin/management-apis/1.0/runtimes/myruntime/adapters/myadapter"
      name="myadapter"
      platformVersion="6.1.0.00.20131126-0630">
      <procedures>
        <procedure>getSomething</procedure>
        ...
      </procedures>
      <projects>
        <project name="myproject"/>
        ...
      </projects>
      <urls>
        <url
          javaClass="com.example.MyRestWrapper"
          javaMethodName="multiplyNumbers"
          method="POST"
          uri="/multiply">
          <formParameters>
            <formParameter
              defaultValue="n/a"
              javaType="java.lang.String"
              name="param"/>
            ...
          </formParameters>
          <pathParameters>
            <pathParameter
              defaultValue="n/a"
              javaType="java.lang.String"
              name="param"/>
            ...
          </pathParameters>
          <queryParameters>
            <queryParameter
              defaultValue="n/a"
              javaType="java.lang.String"
              name="param"/>
            ...
          </queryParameters>
        </url>
        ...
      </urls>
    </item>
    ...
  </items>
</adapters>

Response Properties

The response has the following properties:

items
The array of adapter metadata
pageSize
The page size if only a page of adapters is returned.
productVersion
The exact product version.
startIndex
The start index in the total list if only a page of adapters is returned.
totalListSize
The total number of adapters.

The adapter has the following properties:

deployTime
The date in ISO 8601 format when the adapter was deployed.
description
The description of the adapter.
link
The URL to access detail information about the adapter.
name
The name of the adapter.
platformVersion
The exact version number of the IBM MobileFirst™ Platform Foundation development tools (Studio) that built the adapter.
procedures
The JavaScript procedures of the adapter.
projects
The projects the adapter belong to.
urls
The API documentation of the URLs of the REST API provided by the adapter.

The project has the following properties:

name
The name of the project, which is the context root of the runtime.

The url has the following properties:

formParameters
The form parameters.
javaClass
The Java™ class
javaMethodName
The Java method
method
The HTTP method.
pathParameters
The path parameters.
queryParameters
The query parameters.
uri
The URI of the REST API.

The REST API parameter has the following properties:

defaultValue
The default value.
javaType
The Java type name.
name
The name of the parameter.

Errors

403
The user is not authorized to call this service.
404
The corresponding runtime is not found.
500
An internal error occurred.