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?bookmark=ABC&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.
- bookmark
- The bookmark for the page if only a part of the list (a page) should be returned. If a bookmark is specified, the offset parameter is ignored.
- 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",
"procedureDetails" : [
{
"audit" : false,
"connectAs" : "SERVER",
"description" : "Returns something.",
"displayName" : "getSomething",
"name" : "getSomething",
"securityTest" : "mobileTest",
},
...
],
"projects" : [
{
"name" : "myproject",
},
...
],
"resourceSize" : 1024,
"urls" : [
{
"formParameters" : [
{
"defaultValue" : "n/a",
"javaType" : "java.lang.String",
"name" : "param",
},
...
],
"headerParameters" : [
{
"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",
},
...
],
"securedWithScope" : "wl_antiXSRFRealm wl_anonymousUserRealm",
"uri" : "/multiply",
},
...
],
},
...
],
"nextPageBookmark" : "DEF",
"pageNumber" : 2,
"pageSize" : 100,
"prevPageBookmark" : "ABC",
"productVersion" : "7.1.0",
"startIndex" : 0,
"totalListSize" : 33,
}
XML Example
<?xml version="1.0" encoding="UTF-8"?>
<adapters
nextPageBookmark="DEF"
pageNumber="2"
pageSize="100"
prevPageBookmark="ABC"
productVersion="7.1.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"
resourceSize="1024">
<procedureDetails>
<procedureDetail
audit="false"
connectAs="SERVER"
description="Returns something."
displayName="getSomething"
name="getSomething"
securityTest="mobileTest"/>
...
</procedureDetails>
<projects>
<project name="myproject"/>
...
</projects>
<urls>
<url
javaClass="com.example.MyRestWrapper"
javaMethodName="multiplyNumbers"
method="POST"
securedWithScope="wl_antiXSRFRealm wl_anonymousUserRealm"
uri="/multiply">
<formParameters>
<formParameter
defaultValue="n/a"
javaType="java.lang.String"
name="param"/>
...
</formParameters>
<headerParameters>
<headerParameter
defaultValue="n/a"
javaType="java.lang.String"
name="param"/>
...
</headerParameters>
<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
- nextPageBookmark
- The bookmark of the next page if only a page of adapters is returned.
- pageNumber
- The page index if only a page of adapters is returned.
- pageSize
- The page size if only a page of adapters is returned.
- prevPageBookmark
- The bookmark of the previous page 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.
- procedureDetails
- The JavaScript procedures of the adapter.
- projects
- The projects the adapter belong to.
- resourceSize
- The size of the adapter resource.
- urls
- The API documentation of the URLs of the REST API provided by the adapter.
The adapter procedure details has the following properties:
- audit
- true if calls to the Javascript procedure are logged in the audit log.
- connectAs
- The optional type of the connection to the back end. Possible values are: SERVER (use the connection policy defined for the adapter) or END_USER (use the user's identity for the connection).
- description
- The optional description of the procedure.
- displayName
- The optional display name of the procedure.
- name
- The Javascript name of the adapter procedure.
- securityTest
- The optional name of the security test used to protect the adapter procedure, as defined in the authenticationConfig.xml file.
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.
- headerParameters
- The header parameters.
- javaClass
- The Java™ class
- javaMethodName
- The Java method
- method
- The HTTP method.
- pathParameters
- The path parameters.
- queryParameters
- The query parameters.
- securedWithScope
- The set of realms that secure the REST API.
- 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
403The user is not authorized to call this service.
404 The corresponding runtime is not found.
500 An internal error occurred.