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",
"procedureDetails" : [
{
"audit" : false,
"connectAs" : "SERVER",
"description" : "Returns something.",
"displayName" : "getSomething",
"name" : "getSomething",
"securityTest" : "mobileTest",
},
...
],
"productVersion" : "7.1.0",
"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",
},
...
],
}
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.1.0"
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>
</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.
- procedureDetails
- The JavaScript procedures of the adapter.
- productVersion
- The exact product version.
- 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 or the adapter is not found.
500 An internal error occurred.