Update Schema API


This API allows the user to update the schema with custom attributes for REST API monitors from Applications Manager.

Syntax

XML Input:

https://[HOST]:[PORT]/AppManager/xml/updateRestAPIMonitorSchema

JSON Input:

https://[HOST]:[PORT]/AppManager/json/updateRestAPIMonitorSchema

Supported HTTP methods: POST

Allowed roles: Administrator

Request Parameters

Field Description
apikey The key generated using the Generate API Key option in the 'Admin' tab.
resourceid Resource IDs of the REST API monitor separated by commas.
responseType Indicates the response type - XML or JSON.
schema Schema to be updated for REST API monitor. It should be either in XLST or JSON type.

Note: API should be used only through HTTP POST method.

Example Request

API for monitor with XML Response:

XML Input:

https://apm-prod-server:8443/AppManager/xml/updateRestAPIMonitorSchema

Params in request body:

apikey=aaaaaabbbbbbccccccddddddeeeeee
resourceid=10000184,10000185
responseType=XML
schema=<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:for-each select="AppManager-response/result/response/Monitor">
<xsl:value-of select="@DISPLAYNAME"></xsl:value-of>:<xsl:value-of select="@AVAILABILITYATTRIBUTEID"></xsl:value-of>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

API for monitor with JSON Response:

JSON Input:

https://apm-prod-server:8443/AppManager/json/updateRestAPIMonitorSchema

Params in request body:

apikey=aaaaaabbbbbbccccccddddddeeeeee
resourceid=10000184,10000185
responseType=JSON
schema=Response Code::response-code
URI::response.response.uri

Example Response

Monitor with XML Response:

XML Output:

<?xml version="1.0" encoding="UTF-8"?>
<AppManager-response uri="/AppManager/xml/updateRestAPIMonitorSchema">
<result>
<response response-code="4000">
<Status Status="Schema updated for the resourceid(s): 10000185"/>
</response>
</result>
</AppManager-response>

Monitor with JSON Response:

JSON Output:

{"response-code":"4000","response":{"result":[{"Status":"Schema updated for the resourceid(s): 10000185"}],"uri":"/AppManager/json/updateRestAPIMonitorSchema"}}