Credential Manager APIs


Credential manager REST APIs allow admin users to add, update, delete and list credential by submitting the required parameters. Credential manager APIs are designed to support GET and POST requests:

Note: HTML encoding will be required for parameters with special characters (For example: display name or password). For example, if a password contains a special character like " # , & , % or + :
  • # should be replaced with %23
  • & should be replaced with %26
  • % should be replaced with %25
  • + should be replaced with %2B while passing the password in the RESTAPI.
For More information about HTML Encoding, refer the following document: http://www.w3schools.com/tags/ref_urlencode.asp
When using the Credential Manager APIs, for operations like add, edit, delete credentials, it is recommended that the POST method be used.

Add Credential Manager

This API allows an admin user to add business hours in Applications Manager. The common parameters involved in executing this API request are:

Field Description
credentialName Enter a unique Credential Name
type You must specify a credential type. It should be exact same as given in syntax for each type.
credentialDescr Credential Description
credentialID A unique identifier set by Applications Manager for a credential.

 

Field Description
Servers
Telnet

Required parameters:

  • type
  • username
  • prompt
  • password

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=Telnet&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&username=[USERNAME]&prompt=$&password=[PASSWORD]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=05b4a12a5fc0747cfaa897850ae9a778&type=Telnet&credentialDescr=Test&credentialName=Telnet&username=test&prompt=$&password=test

SNMP v1/v2

Required parameters:

  • type
  • snmpCommunityString
  • timeout

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=SNMP v1v2&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&snmpCommunityString=[COMMUNITY STRING]&timeout=[MINUTES]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=05b4a12a5fc0747cfaa897850ae9a778&type=SNMP v1v2&credentialDescr=Test&credentialName=Credential-SNMPv2&snmpCommunityString=public&timeout=5

SNMP v3

Required parameters:

  • type
  • snmpAuthProtocol
  • snmpContextName
  • snmpPrivPassword
  • snmpAuthPassword
  • snmpSecurityLevel
  • timeout
  • snmpUserName

Syntax:
https://apm-server:9090/AppManager/xml/credential?apikey=4dd329f4b42f64c29013c591138eac2a&type=SNMP v3&snmpAuthProtocol=[MD5 or SHA]&credentialName=[CREDENTIAL NAME]&snmpContextName=[CONTEXT NAME]&snmpPrivPassword=[PRIVATE PASSWORD]&snmpSecurityLevel=[NOAUTHNOPRIV or AUTHNOPRIV or AUTHPRIV]&snmpAuthPassword=[AUTHENTICATION PASSWORD]&timeout=[MINUTES]&snmpUserName=[USERNAME]

Sample Request:
https://apm-server:9090/AppManager/xml/credential?apikey=4dd329f4b42f64c29013c591138eac2a&snmpAuthProtocol=MD5&credentialName=snmp-v3-1&snmpContextName=cusu4NfK6N0s6b&snmpPrivPassword=&snmpSecurityLevel=NOAUTHNOPRIV&snmpAuthPassword=&type=SNMP v3&timeout=5&snmpUserName=admin

SSH

Required parameters:

  • type
  • username
  • passphrase
  • description
  • prompt
  • password
  • sshPKAuth

Syntax:
https://apm-server:9090/AppManager/xml/credential?apikey=4dd329f4b42f64c29013c591138eac2a&type=SSH&credentialName=[CREDENTIAL NAME]&username=[USERNAME]&passphrase=[PASS PHRASE]&description=[PRIVATE KEY]&prompt=[PROMPT]&password=[PASSWORD]&sshPKAuth=on

Sample Request:
https://apm-server:9090/AppManager/xml/credential/add?apikey=4dd329f4b42f64c29013c591138eac2a&credentialName=ssh-1&username=guest&passphrase=&description=&prompt=$&type=SSH&password=guest

WMI

Required parameters:

  • type
  • username
  • password

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=WMI&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&username=[USERNAME]&password=[PASSWORD]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=05b4a12a5fc0747cfaa897850ae9a778&type=WMI&credentialDescr=Test&credentialName=WMI&username=administrator&password=admin123

Application servers
GlassFish

Required parameters:

  • type
  • Password
  • JNDIPath
  • UserName

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=GlassFish&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&UserName=[USERNAME]&Password=[PASSWORD]&JNDIPath=[PATH]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=05b4a12a5fc0747cfaa897850ae9a778&type=GlassFish&credentialDescr=Test&credentialName=Glassfish1&UserName=admin&Password=adminadmin&JNDIPath=/jmxrmi

JBoss Server

Required parameters:

  • type
  • username
  • password
  • sslenabled

Syntax:
https://apm-server:9090/AppManager/xml/credential?apikey=4dd329f4b42f64c29013c591138eac2a&type=JBoss Server&credentialName=[CREDENTIAL NAME]&username=[USERNAME]&password=[PASSWORD]&sslenabled=on

Sample Request:
https://apm-server:9090/AppManager/xml/credential?apikey=4dd329f4b42f64c29013c591138eac2a&credentialName=jboss-2&username=admin&type=JBoss Server&password=password123&sslenabled=on

Microsoft .NET

Required parameters:

  • type
  • username
  • password

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=Microsoft .NET&credentialName=[CREDENTIANL NAME]&username=[USERNAME]&password=[PASSWORD]&credentialDescr=[CREDENTIAL DESCRIPTION]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=Microsoft .NET&credentialName=.Net1&username=administrator&password=password123&credentialDescr=This is .net credential.

VMware vFabric tc Server

Required parameters:

  • type
  • Password
  • JNDIPath
  • UserName

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=VMware vFabric tc Server&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&Password=[PASSWORD]&JNDIPath=[JNDI PATH]&UserName=[USERNAME]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=VMware vFabric tc Server&credentialName=vFabric1&Password=springsource&JNDIPath=/jmxrmi&UserName=admin

WebLogic Server

Required parameters:

  • type
  • username
  • password
  • version

Syntax
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=WebLogic Server&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&username=[USERNAME]&password=[PASSWORD]&version=[WLS_6_1 or WLS_7_0 or WLS_8_1 or WLS_9_0 or WLS_10_0]

 

Sample Request
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=WebLogic Server&credentialName=Weblogic6.1&username=weblogic&password=weblogic&version=WLS_6_1

WebSphere Server

Required parameters:

  • type
  • soapport
  • username
  • authEnabled
  • password
  • sslenabled
  • version

Syntax:
https://apm-server:9090/AppManager/xml/credential?apikey=[APIKEY]&type=WebSphere Server&soapport=[SOAP PORT]&credentialName=[CREDENTIAL NAME]&username=[USERNAME]&authEnabled=on&password=[PASSWORD]&version=[5 or 6 or 7 or 8]&sslenabled=on

 

Sample Request:
https://apm-server:9090/AppManager/xml/credential?apikey=4dd329f4b42f64c29013c591138eac2a&type=WebSphere Server&soapport=8880&credentialName=websphere7.x&username=wasadmin&authEnabled=on&password=admin&version=8&sslenabled=on

Apache Server

Required parameters:

  • type
  • username
  • authEnabled
  • password
  • sslenabled

Syntax:
https://apm-server:9090/AppManager/xml/credential?apikey=[APIKEY]&type=Apache Server&credentialName=[CREDENTIAL NAME]&username=[USERNAME]&authEnabled=on&password=[PASSWORD]&sslenabled=on

Sample Request:
https://apm-server:9090/AppManager/xml/credential?apikey=4dd329f4b42f64c29013c591138eac2a&type=Apache Server&credentialName=Apache-1&username=test&authEnabled=on&password=test&sslenabled=on

Tomcat Server

Required parameters:

  • type
  • username
  • password
  • sslenabled
  • version
  • tomcatmanagerurl

Syntax:
https://apm-server:9090/AppManager/xml/credential?apikey=4dd329f4b42f64c29013c591138eac2a&tomcatmanagerurl=[TOMCAT MANAGER URL]&credentialName=[CREDENTIAL NAME]&username=[USERNAME]&type=Tomcat Server&password=e6Lg48eOS0331s&sslenabled=on&version=[3 or 4 or 5 or 6 or 7]

Sample Request:
https://apm-server:9090/AppManager/xml/credential?apikey=4dd329f4b42f64c29013c591138eac2a&tomcatmanagerurl=/manager&credentialName=Tomcat6&username=tomcat&type=Tomcat Server&password=tomcat&sslenabled=on&version=7

Java/Transactions
Java Runtime

Required parameters:

  • type
  • jndiurl
  • authEnabled
  • username
  • password

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=Java Runtime&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&jndiurl=[JNDIURL]&authEnabled=on&username=[USERNAME]&password=[PASSWORD]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=Java Runtime&credentialName=JavaRuntime1&jndiurl=/jmxrmi&authEnabled=on&username=admin&password=admin

Database
DB2

Required parameters:

  • type
  • username
  • password
  • instance

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=DB2&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&username=[USERNAME]&password=[PASSWORD]&instance=[DB NAME]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=DB2&credentialName=DB2 server1&username=db2admin&password=db2admin&instance=SAMPLE

MS SQL

Required parameters:

  • type
  • namedInstance
  • username
  • authType
  • instance
  • password

Syntax:
https://apm-server:9090/AppManager/xml/credential?apikey=[APIKEY]=MS SQL&credentialName=[CREDENTIAL NAME]&username=[USERNAME]&namedInstance=on&authType=[SQL or Windows]&instance=[INSTANCE]&password=[PASSWORD]

Sample Request:
https://apm-server:9090/AppManager/xml/credential?apikey=4dd329f4b42f64c29013c591138eac2a&type=MS SQL&credentialName=SQL Server1&username=sa&namedInstance=on&authType=SQL&instance=instance&password=password123

MySQL

Required parameters:

  • type
  • username
  • password
  • instance

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=MySQL&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&username=[USERNAME]&password=[PASSWORD]&instance=[DB NAME]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=MySQL&credentialName=MySQL4&username=root&password=root&instance=test

Oracle

Required parameters:

  • type
  • Password
  • UserName

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=Oracle&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&username=[USERNAME]&password=[PASSWORD]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=Oracle&credentialName=Oracle11.0.4&username=system&password=password123

PostgreSQL

Required parameters:

  • type
  • username
  • password
  • DBname

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=PostgreSQL&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&UserName=[USERNAME]&Password=[PASSWORD]&DBname=[DB NAME]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=PostgreSQL&credentialName=PostgreSQL3&UserName=postgres&Password=postgres&DBname=postgres

Sybase

Required parameters:

  • type
  • username
  • instance
  • password

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=Sybase&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&username=[USERNAME]&instance=[INSTANCE NAME]&password=[PASSWORD]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=Sybase&credentialName=Sybase server 4&username=sa&instance=test&password=test123

MongoDB

Required parameters:

  • type
  • authreq
  • username
  • password

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=MongoDB&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&authreq=on&username=USERNAME&password=[PASSWORD]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&credentialName=MongoDB7&authreq=on&type=MongoDB&username=root&password=root

Cassandra

Required parameters:

  • type
  • username
  • authreq
  • password type=Cassandra

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=Cassandra&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&username=USERNAME&authreq=on&password=[PASSWORD]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=Cassandra&credentialName=Cassandra1&username=cassandra&authreq=on&password=cassandra

Middleware/Portal
Microsoft MQ (MSMQ)

Required parameters:

  • type
  • Password
  • UserName

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=Microsoft MQ (MSMQ)&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&Password=d6pM4M2&UserName=USERNAME

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=Microsoft MQ (MSMQ)&credentialName=MSMQ4&Password=Admin123&UserName=administrator

MS Office SharePoint

Required parameters:

  • type
  • Password
  • UserName

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=MS Office SharePoint&credentialDescr=[CREDENTIAL_DESCRIPTION]&credentialName=[CREDENTIANL_NAME]&Password=[PASSWORD]&UserName=[USERNAME]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=05b4a12a5fc0747cfaa897850ae9a778&type=MS Office SharePoint&credentialDescr=Test&credentialName=MS Sharepoint3&Password=Password123&UserName=administrator

RabbitMQ

Required parameters:

  • type
  • Password
  • UserName

Syntax:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=RabbitMQ&credentialDescr=[CREDENTIAL DESCRIPTION]&credentialName=[CREDENTIANL NAME]&Password=[PASSWORD]&UserName=[USERNAME]

Sample Request:
http://apm-server:9090/AppManager/xml/credential?apikey=05b4a12a5fc0747cfaa897850ae9a778&type=RabbitMQ&credentialDescr=Test&credentialName=RabbitMQ5&Password=guest&UserName=guest

Edit/Update Credential

This API allows an admin user to edit the existing credential by providing the neccessary parameters.

Syntax

For XML Response:

http://[ APM Host ]:[ APM Port ]/AppManager/xml/credential?apikey=[APIKEY]&credentialID=[CREDENTIAL_ID]&..

For JSON Response:

http://[ APM Host ]:[ APM Port ]/AppManager/json/credential?apikey=[APIKEY]&credentialID=[CREDENTIAL_ID]&..

Example

http://app-windows:59090/AppManager/xml/credential?apikey=05b4a12a5fc0747cfaa897850ae9a778&credentialID=10&password=newpassword

Delete Credential

We can delete a particular credential by giving its credential id. The credential ID must be a whole number.

Syntax

For XML Response:

http://[ APM Host ]:[ APM Port ]/AppManager/xml/credential?apikey=[APIKEY]&type=[TYPE]&credentialID=[CREDENTIAL_ID]&TO_DELETE=true

For JSON Response:

http://[ APM Host ]:[ APM Port ]/AppManager/json/credential?apikey=[APIKEY]&type=[TYPE]&credentialID=[CREDENTIAL_ID]&TO_DELETE=true

Example

http://app-windows:59090/AppManager/xml/credential?apikey=05b4a12a5fc0747cfaa897850ae9a778&credentialID=10&TO_DELETE=true

List Credential Manager

This API allows an admin user to list down the credentials in Applications Manager in both xml and json formatThe type value could be "all" or a particular type.

Syntax

For XML Response:

http://[ APM Host ]:[ APM Port ]/AppManager/xml/credential/list?apikey=[APIKEY]&type=[TYPE]

For JSON Response:

http://[ APM Host ]:[ APM Port ]/AppManager/json/credential/list?apikey=[APIKEY]&type=[TYPE]

Example

http://app-windows:59090/AppManager/xml/credential/list?apikey=05b4a12a5fc0747cfaa897850ae9a778&type=all