1、Endpoints(查询接口) #
* /toolsUsage
* /featuresUsage
* /licenseUsage
* /licenseRejection
License server一共有4个接口可以查询相关的Log信息。
这篇文章只介绍两个,如需了解更多的信息,可以访问:
2、/toolsUsage #
这个接口返回返回有关工具使用情况的相关信息。
URL #
<protocol>://<host>:<port>/licenseserver/usage/api/v1.0/toolsUsage
参数 #
此外,还可以加上参数:起始时间和终止时间。
参见示范例子:
curl https://myserver:8443/licenseserver/usage/api/v1.0/toolsUsage?startDate=2020-03-01&endDate=2020-03-2 --cookie cookies.txt
响应信息 #
例子:
[
{
"featuresAtMaxConcurrentLicenseTime": [
{
"count": 1,
"feature": "Automation"
},
{
"count": 1,
"feature": "Change Based Testing"
},
{
"count": 1,
"feature": "Coding Standards"
},
{
"count": 1,
"feature": "Coverage"
},
{
"count": 1,
"feature": "Desktop Command Line"
},
{
"count": 1,
"feature": "Flow Analysis"
},
{
"count": 1,
"feature": "Unit Test"
}
],
"maxConcurrentLicenseCount": 1,
"maxConcurrentLicenseTime": "2020-03-01T20:18:21.369",
"tool": "jtest!",
"uniqueHostCount": 1,
"uniqueUserCount": 1,
"usageHours": 0.0025158333333333335
}
]
字段解释 #
3、/licenseRejection #
这个接口返回一组对象,显示被服务器拒绝的许可证请求。
URL #
<protocol>://<host>:<port>/licenseserver/usage/api/v1.0/licenseRejection
参数 #
同上,可加起始时间和终止时间。
示例:
https://myserver:8443/licenseserver/usage/api/v1.0/licenseRejection
响应信息 #
{
"noFeatures": [
{
"requestKey": {
"grantedFeatures": [
"Automation",
"Change Based Testing",
"Coding Standards",
"Coverage"
],
"requestedNoFeatures": [
"CWE Rules",
"DTP Publish",
"Desktop Command Line",
"Flow Analysis",
"OWASP Rules",
"PCI DSS Rules",
"Security Rules",
"Unit Test"
],
"tool": "jtest!",
"toolVersion": "10.4"
},
"responseStatistics": {
"noFeaturesCount": 4,
"noFeaturesUserCount": 1,
"noFeaturesUsers": [{
"noFeaturesCount": 4,
"noFeaturesTime": [
"2020-02-12 14:05:08.951",
"2020-02-12 14:19:08.959",
"2020-02-12 14:33:08.927",
"2020-02-12 14:47:08.944"
],
"user": {
"hostName": "home",
"name": "kprzybyla"
}
}]
}
},
{
"requestKey": {
"grantedFeatures": [
"Automation",
"Change Based Testing",
"Coding Standards",
"Coverage"
],
"requestedNoFeatures": [
"CWE Rules",
"DTP Publish",
"Flow Analysis",
"OWASP Rules",
"PCI DSS Rules",
"Security Rules",
"Unit Test"
],
"tool": "jtest!",
"toolVersion": "10.4"
},
"responseStatistics": {
"noFeaturesCount": 10,
"noFeaturesUserCount": 1,
"noFeaturesUsers": [{
"noFeaturesCount": 10,
"noFeaturesTime": [
"2020-02-12 15:00:12.015",
"2020-02-12 15:00:15.364",
"2020-02-12 15:00:33.480",
"2020-02-12 15:01:08.924",
"2020-02-12 15:15:08.953",
"2020-02-12 15:21:09.053",
"2020-02-12 15:35:09.158",
"2020-02-12 15:42:09.243",
"2020-02-12 15:56:09.369",
"2020-02-12 16:10:09.374"
],
"user": {
"hostName": "home",
"name": "kprzybyla"
}
}]
}
},
{
"requestKey": {
"grantedFeatures": [
"Command Line",
"Jtest Connect",
"Message Packs",
"RuleWizard",
"SOA",
"Stub Desktop",
"Stub Server",
"Web"
],
"requestedNoFeatures": ["Server API Enabled"],
"tool": "SOAtest",
"toolVersion": "9.10"
},
"responseStatistics": {
"noFeaturesCount": 10,
"noFeaturesUserCount": 1,
"noFeaturesUsers": [{
"noFeaturesCount": 10,
"noFeaturesTime": [
"2020-02-12 13:39:35.481",
"2020-02-12 13:39:35.506",
"2020-02-12 13:40:05.580",
"2020-02-12 13:40:05.630",
"2020-02-12 13:40:06.692",
"2020-02-12 13:40:06.708",
"2020-02-12 13:40:31.765",
"2020-02-12 13:40:31.781",
"2020-02-12 13:40:55.839",
"2020-02-12 13:40:55.854"
],
"user": {
"hostName": "caprica",
"name": "modtest"
}
}]
}
}
],
"noMoreTokens": [
{
"requestKey": {
"requestedFeatures": [],
"tool": "jtest!",
"toolVersion": "10.4"
},
"responseStatistics": {
"noMoreTokensCount": 4,
"noMoreTokensUserCount": 1,
"noMoreTokensUsers": [{
"noMoreTokensCount": 4,
"noMoreTokensTime": [
"2020-02-12 21:46:09.516",
"2020-02-12 22:00:09.534",
"2020-02-12 22:14:09.573",
"2020-02-12 22:28:09.578"
],
"user": {
"hostName": "home",
"name": "kprzybyla"
}
}]
}
},
{
"requestKey": {
"requestedFeatures": [
"Automation",
"CWE Rules",
"Change Based Testing",
"Coding Standards",
"Coverage",
"DTP Publish",
"Desktop Command Line",
"Flow Analysis",
"OWASP Rules",
"PCI DSS Rules",
"Security Rules",
"Unit Test",
"Unit Test Bulk Creation",
"Unit Test Spring Framework"
],
"tool": "jtest!",
"toolVersion": "10.4"
},
"responseStatistics": {
"noMoreTokensCount": 3,
"noMoreTokensUserCount": 1,
"noMoreTokensUsers": [{
"noMoreTokensCount": 3,
"noMoreTokensTime": [
"2020-02-12 12:00:46.576",
"2020-02-12 12:00:46.840",
"2020-02-12 12:01:17.713"
],
"user": {
"hostName": "home",
"name": "kprzybyla"
}
}]
}
},
{
"requestKey": {
"requestedFeatures": ["Server API Enabled"],
"tool": "SOAtest",
"toolVersion": "9.10"
},
"responseStatistics": {
"noMoreTokensCount": 4,
"noMoreTokensUserCount": 1,
"noMoreTokensUsers": [{
"noMoreTokensCount": 4,
"noMoreTokensTime": [
"2020-02-12 13:46:30.425",
"2020-02-12 13:46:30.463",
"2020-02-12 13:47:06.557",
"2020-02-12 13:47:06.579"
],
"user": {
"hostName": "home",
"name": "kprzybyla"
}
}]
}
}
],
"requestDenied": [
{
"requestKey": {
"requestedFeatures": [],
"tool": "SOAtest",
"toolVersion": "9.10"
},
"responseStatistics": {
"requestDeniedCount": 10,
"requestDeniedUserCount": 2,
"requestDeniedUsers": [
{
"requestDeniedCount": 2,
"requestDeniedTime": [
"2020-02-12 13:46:30.447",
"2020-02-12 13:47:06.567"
],
"user": {
"hostName": "home",
"name": "kprzybyla"
}
},
{
"requestDeniedCount": 8,
"requestDeniedTime": [
"2020-02-12 13:21:23.734",
"2020-02-12 13:21:38.810",
"2020-02-12 13:22:36.874",
"2020-02-12 13:32:58.201",
"2020-02-12 13:33:24.331",
"2020-02-12 13:34:23.410",
"2020-02-12 13:34:27.483",
"2020-02-12 13:34:35.555"
],
"user": {
"hostName": "caprica",
"name": "modtest"
}
}
]
}
},
{
"requestKey": {
"requestedFeatures": ["Server API Enabled"],
"tool": "SOAtest",
"toolVersion": "9.10"
},
"responseStatistics": {
"requestDeniedCount": 6,
"requestDeniedUserCount": 1,
"requestDeniedUsers": [{
"requestDeniedCount": 6,
"requestDeniedTime": [
"2020-02-12 13:37:30.630",
"2020-02-12 13:37:30.668",
"2020-02-12 13:38:13.751",
"2020-02-12 13:38:13.773",
"2020-02-12 13:38:50.842",
"2020-02-12 13:38:50.857"
],
"user": {
"hostName": "caprica",
"name": "modtest"
}
}]
}
}
]
}