Adapter (GET)
Retrieves metadata of a specific adapter.
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/adapter-name
Example
https://www.example.com/worklightadmin/management-apis/1.0/runtimes/myruntime/adapters/myadapter?locale=de_DE
Path Parameters
- runtime-name
- The name of the runtime. This is the context root of the runtime web application, without the leading slash.
- adapter-name
- The name of the adapter.
Query Parameters
Query parameters are optional.
- locale
- The locale used for error messages.
Produces
application/json, application/xml, text/xml
Response
The metadata of the specified adapter.
JSON Example
{
"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", ... ],
"productVersion" : "7.0.0",
"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",
},
...
],
}
XML Example
<?xml version="1.0" encoding="UTF-8"?>
<adapter
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"
productVersion="7.0.0">
<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>
</adapter>
Response Properties
The response 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.
- productVersion
- The exact product version.
- 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
403The user is not authorized to call this service.
404 The corresponding runtime or the adapter is not found.
500 An internal error occurred.