凭证管理API


凭证管理REST API允许管理员用户通过提交所需参数来添加,更新,删除和列出凭证。凭证管理API旨在支持GET和POST请求:

注意:包含特殊字符的参数将需要HTML编码(例如:显示名称或密码)。例如,如果密码包含特殊字符,例如#,&,%或+:

  • 应替换为%23
  • 应替换为%26
  • 应替换为%25
  • 在RESTAPI中传递密码时,+应替换为%2B
有关HTML编码的更多信息,请参见以下文档:http://www.w3schools.com/tags/ref_urlencode.asp
使用凭证管理API时,对于添加,编辑,删除凭证等操作,建议使用POST方法
 

添加凭证管理

该API允许管理员用户在Applications Manager中添加工作时间。执行此API请求涉及的常见参数是:

字段描述
credentialName输入唯一的凭证名称
type必须指定一个凭证类型。对于每种类型,它应该与语法中给出的完全相同。
credentialDescr凭证描述
credentialID由Applications Manager为凭证设置的唯一标识符。

 

字段描述
服务器
Telnet

必填参数:

  • type
  • username
  • prompt
  • password

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

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

SNMP v1/v2

必填参数:

  • type
  • snmpCommunityString
  • timeout

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

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

SNMP v3

必填参数:

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

语法:
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]

示例请求:
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

必填参数:

  • type
  • username
  • passphrase
  • 描述
  • prompt
  • password
  • sshPKAuth

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

示例请求:
https://apm-server:9090/AppManager/xml/credential/add?apikey=4dd329f4b42f64c29013c591138eac2a&credentialName=ssh-1&username=guest&passphrase=&describe=&prompt=$&type=SSH&password=guest

WMI

必填参数:

  • type
  • username
  • password

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

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

应用服务器
GlassFish

必填参数:

  • type
  • Password
  • JNDIPath
  • UserName

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

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

JBoss Server

必填参数:

  • type
  • username
  • password
  • sslenabled

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

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

Microsoft .NET

必填参数:

  • type
  • username
  • password

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

示例请求:
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

必填参数:

  • type
  • Password
  • JNDIPath
  • UserName

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

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

WebLogic Server

必填参数:

  • type
  • username
  • password
  • version

语法
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=WebLogic Server&credentialDescr=[CREDENTIAL DESCRIBE]&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]

 

示例请求
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

必填参数:

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

语法:
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

 

示例请求:
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

必填参数:

  • type
  • username
  • authEnabled
  • password
  • sslenabled

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

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

Tomcat 服务器

必填参数:

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

语法:
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]

示例请求:
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/事务
Java Runtime

必填参数:

  • type
  • jndiurl
  • authEnabled
  • username
  • password

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

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

数据库
DB2

必填参数:

  • type
  • username
  • password
  • instance

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

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

MS SQL

必填参数:

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

语法:
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]

示例请求:
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

必填参数:

  • type
  • username
  • password
  • instance

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

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

Oracle

必填参数:

  • type
  • Password
  • UserName

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

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

PostgreSQL

必填参数:

  • type
  • username
  • password
  • DBname

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

示例请求:
http://apm-server:9090/AppManager/xml/credential?apikey=a864e174c664b8661e7d8c3a07692b0e&type=PostgreSQL&credentialName=PostgreSQL3&UserName=postgres&Password=postgres&DBName=postgres

Sybase

必填参数:

  • type
  • username
  • instance
  • password

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

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

MongoDB

必填参数:

  • type
  • authreq
  • username
  • password

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

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

Cassandra

必填参数:

  • type
  • username
  • authreq
  • password type=Cassandra

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

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

中间件/Portal
Microsoft MQ (MSMQ)

必填参数:

  • type
  • Password
  • UserName

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

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

MS Office SharePoint

必填参数:

  • type
  • Password
  • UserName

语法:
http://[HOST]:[PORT]/AppManager/xml/credential?apikey=[APIKEY]&type=MS Office SharePoint&credentialDescr=[CREDENTIAL_描述]&credentialName=[CREDENTIANL_NAME]&Password=[PASSWORD]&UserName=[USERNAME]

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

RabbitMQ

必填参数:

  • type
  • Password
  • UserName

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

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

编辑/更新凭证

该API允许管理员用户通过提供必要的参数来编辑 现有凭证。

语法

对于XML响应:

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

对于JSON响应:

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

示例

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

删除凭证

我们可以通过提供特定的凭证ID来删除它。凭证ID必须是整数。

语法

对于XML响应:

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

对于JSON响应:

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

示例

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

列表凭证管理

该API允许管理员用户以xml和json格式列出Applications Manager的凭证 。 类型值可以是全部或特定类型。

语法

对于XML响应:

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

对于JSON响应:

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

示例

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

受到世界各地客户的喜爱

"具有广泛监控功能的Standout工具"

它允许我们跟踪关键指标,如响应时间、资源利用率、错误率和交易性能。实时监控告警会及时通知我们任何问题或异常,使我们能够立即采取行动。

审稿人角色:研究与开发

我喜欢Applications Manager,因为它可以帮助我们检测服务器和SQL数据库中存在的问题。
卡洛斯·里韦罗

Lexmark技术支持经理

受到全球6000多家企业的信任

我们的客户