...
Get / Update / Execute / Delete reports
Authentication: Basic authentication
Authorization: Any user allowed using Reports, see:
Code Block |
---|
curl -u username:password https://<dpod hostname>/op/api/v2/reports/{{productView}} |
...
Retrieve All Reports
...
URL
...
GET
https://<dpod hostname>/op/api/v2/reports/{{productView}}
...
Authorization
(more info Role Based Access Control)
...
...
URL Parameters
...
productView: IDG / APIC
...
Successful Response
...
Available report actions via APIs
Get / Create / Update / Execute / Delete reports
Authorization:
Authentication: Basic authentication
Roles: it is recommended to read Role Based Access Control page for understanding build-in and custom roles permissions.
From CLI (example):
Code Block |
---|
curl -u username:password https://<dpod hostname>/op/api/v2/reports/{{productView}} |
...
Retrieve All Reports Expand |
---|
title | /op/api/v2/reports/{{productView}} |
---|
|
URL:GET - https://{{dpodHostname}} /op/api/v2/reports/{{productView}} Request - None.URL Parameters:Name | Is required | Description | Parameter Type | Data options |
---|
productView | True | Product view APIC / IDG | String | |
Authorization:Required Permissions | More info |
---|
View or Edit report Access permissions for required product
| See roles information here: Role Based Access Control |
Response:Response Type | Example value | Description |
---|
Successful | Code Block |
---|
| {
"resultCode": "SUCCESS",
"resultMessage": "Reports retrieved successfully",
"result": {
"reports": [{
"name": "API Latency Report",
"description": "API Latency",
"productView": "APIC",
"apiReference": "1B1925B3-EAE0-4E4A-97B6-78AD13EDE856",
"indexSets": "apic-log",
"documentType": "APIC_LOGICAL_TRANS",
"jsonQuery": "{\"query\":{\"bool\":{\"must\":{\"match_all\":{}},... }",
"schedule": "",
"recipients": [],
"adHocFilterTypes": ["TIME", "DEVICE",....],
"filtersParameters": { "timeRangeType": "recent",.....},
"lastUpdateTimeInMillis": 1646655197926,
"lastUpdateUserName": "admin",
"esHeadersDictionary": ""
},
{....}
]
}
} |
| Status code: 200 resultCode → SUCCESS resultMessage → “Reports retrieved successfully” |
|
Get Specific Report Details Expand |
---|
title | /op/api/v2/report/{{productView}}/{{reportApiReferenceId}} |
---|
|
URL:GET - https://{{dpodHostname}} /op/api/v2/report/{{productView}} /{{reportApiReferenceId}} Request - None.URL Parameters:Name | Is required | Description | Parameter Type | Data options |
---|
productView | True | Product view APIC / IDG | String | | reportApiReferenceId | True | The report apiReferenceId (can be retrieved from “Retrieved all reports” response) | String | |
Authorization:Required Permissions | More info |
---|
View or Edit report Access permissions for required product related to the report
| See roles information here: Role Based Access Control |
Response:Response Type | Example value | Description |
---|
Successful | Code Block |
---|
| {
"resultCode": "SUCCESS",
"resultMessage": "Report retrieved successfully",
"result": {
"name": "<report name>",
"description": "<report description>",
"productView": "<report product view>",
"apiReference": "<report uuid>",
"indexSets": "<report indexSet>",
"documentType": "<report documentType>",
"jsonQuery": "{\"query\":{\"bool\":{\"must\":{\"match_all\":{}},... }",
"schedule": "",
"recipients": [],
"adHocFilterTypes": ["TIME", "DEVICE",....],
"filtersParameters": { "timeRangeType": "recent",.....},
"lastUpdateTimeInMillis": 1644768927839,
"lastUpdateUserName": "Installer",
"esHeadersDictionary": ""
}
} |
| Status code: 200 resultCode → SUCCESS resultMessage → “Report retrieved successfully” |
|
Execute (Async) Report Expand |
---|
title | /op/api/v2/report/{{productView}}/{{reportApiReferenceId}}/executeAsync |
---|
|
URL:POST - https://{{dpodHostname}} /op/api/v2/report/{{productView}} /{{reportApiReferenceId}} /executeAsyncURL Parameters:Name | Is required | Description | Parameter Type | Data options |
---|
productView | True | Product view APIC / IDG | String | | reportApiReferenceId | True | The report apiReferenceId you wish to execute ( id can be retrieved from “Retrieved all reports” response) | String | |
Authorization:Required Permissions | More info |
---|
View or Edit report Access permissions for required product related to the report
| See roles information here: Role Based Access Control |
Request body:Type | Parameters | Example Json | Description |
---|
Required | List<String> recipients Map<String, String>filtersParameters
| Code Block |
---|
| {
"recipients" :[],
"filtersParameters" : {}
} |
| recipients → Recipients' email address. Array can be sent empty.
filtersParameters → List of filters. List can be sent empty.
| Additional parameter | Available filters: | Code Block |
---|
| {
"recipients" :[“address1@mail.com“...],
"filtersParameters" : {
"deviceNameOp":"eq",
"deviceName":"<device name>",
"timeRangeType":"recent",
"timeRangePeriod":"600000"
}
} |
| deviceNameOp →
“eq” for equal “ne” for unequitable
filtersParameters → List of filters. List can be sent empty.
|
Response:Response Type | Example value | Description |
---|
Successful | Code Block |
---|
| {
"resultCode": "SUCCESS",
"resultMessage": "Report executed successfully",
"result": {
"executionId": <ID>
}
} |
| Status code: 200 resultCode → SUCCESS resultMessage → “Report executed successfully” result → executionId → The report execution id (integer). |
|
Get Report Execution Details Expand |
---|
title | /op/api/v2/reportexecution/{{productView}}/{{executionId}} |
---|
|
URL:GET - https://{{dpodHostname}} /op/api/v2/reportexecution/{{productView}} /{{executionId}} Request - None.URL Parameters:Name | Is required | Description | Parameter Type | Data options |
---|
productView | True | Relevant product view APIC / IDG | String | | executionId | True | The report execution ID (can be retrieved from “execute report” api response) | String | The report Id |
Authorization:Required Permissions | More info |
---|
View or Edit report Access permissions for required product related to the report
| See roles information here: Role Based Access Control |
Response:Response Type | Example value | Description |
---|
Successful | Code Block |
---|
| {
"resultCode": "SUCCESS",
"resultMessage": "Report execution retrieved successfully",
"result": {
"executionId": 7,
"recipients": "",
"filters": "",
"executingUserName": "admin",
"status": "OK",
"requestTimeInMillis": 1646827094043,
"executionTimeInMillis": 1646827094948,
"completionTimeInMillis": 1646827101507
}
} |
| Status code: 200 resultCode → SUCCESS resultMessage → “Report execution retrieved successfully” result → executionId → The report execution ID
recipients → Recipients' email address. Array can be sent empty.
filters → List of filters. List can be sent empty.
executingUserName → The user who executed this report execution
status → Report execution status
requestTimeInMillis → Request time in Millis
executionTimeInMillis → Execution time in Millis
completionTimeInMillis → Completion time in Millis
|
|
Download Report Execution Expand |
---|
title | /op/api/v2/reportexecution/{{productView}}/{{executionId}}/download |
---|
|
URL:GET - https://{{dpodHostname}} /op/api/v2/reportexecution/{{productView}} /{{executionId}} /downloadRequest - None.URL Parameters:Name | Is required | Description | Parameter Type | Data options |
---|
productView | True | Relevant product view APIC / IDG | String | | executionId | True | The report execution ID (can be retrieved from “execute report” api response) | String | The report Id |
Authorization:Required Permissions | More info |
---|
View or Edit report Access permissions for required product related to the report
| See roles information here: Role Based Access Control |
Response:Response Type | Value | Description |
---|
Successful | xls file type | Status code: 200 |
|
Duplicate Report Expand |
---|
title | /op/api/v2/report/{{productView}}/{{reportApiReferenceId}}/duplicate |
---|
|
URL:POST - https://{{dpodHostname}} /op/api/v2/report/{{productView}} /{{reportApiReferenceId}} /duplicateRequest - None.URL Parameters:Name | Is Required | Description | Parameter Type | Data Type |
---|
productView | True | Product view APIC / IDG | String | | reportApiReferenceId | True | The report apiReferenceId you wish to duplicate ( id can be retrieved from “Retrieved all reports” response) | String | ‘apiReferenceId’ value from the original report |
Authorization:Required Permissions | More info |
---|
Edit report Access permissions for required product related to the report you wish to duplicate
| See roles information here: Role Based Access Control |
Response:Response Type | Example value | Description |
---|
Successful | Code Block |
---|
| {
"resultCode": "SUCCESS",
"resultMessage": "Report duplicated successfully",
"result": {
"name": "<source report name> Copy",
"description": "<source report description>",
"productView": "<source report productView>",
"apiReference": "<New unique report uuid>",
"indexSets": "<source report indexSet>",
"documentType": "<source report documentType>",
"jsonQuery": "<source report query>",
"schedule": "",
"recipients": [],
"adHocFilterTypes": ["TIME", "DEVICE",....],
"filtersParameters": { "timeRangeType": "recent",.....},
"lastUpdateTimeInMillis": 1646826210928,
"lastUpdateUserName": "<current userName>",
"esHeadersDictionary": ""
}
} |
| Status code: 200 resultCode → SUCCESS resultMessage → “Report duplicated successfully” |
|
Add Report Expand |
---|
title | /op/api/v2/reports/{{productView}} |
---|
|
URL:POST - https://{{dpodHostname}} /op/api/v2/reports/{{productView}} URL Parameters:Name | Is required | Description | Parameter Type | Data Type |
---|
productView | True | Product view APIC / IDG | String | |
Authorization:Required Permissions | More info |
---|
Edit report Access permissions for product view of new report
| See roles information here: Role Based Access Control |
Request body:Type | Parameters | Example Json | Description |
---|
Required | String name String description String productView String indexSets String documentType String jsonQuery String jsonParameters String schedule List<String>recipients List<String>adHocFilterTypes Map<String, String>filtersParameters String serviceNameFieldOverride String esHeadersDictionary
| Code Block |
---|
| {
"name": "<new report name>",
"description": "<new report description>",
"productView": "<new report productView type>",
"indexSets": "<new report indexSet>",
"documentType": "<new report documentType>",
"jsonQuery": "<new report query>",
"schedule": "",
"recipients": [],
"adHocFilterTypes": [...],
"filtersParameters": {...},
"esHeadersDictionary": ""
} |
| recipients → recipients' email address. Array can be sent empty.
filtersParameters → list of filters. List can be sent empty.
| Additional parameter | Available adHocFilterTypes : | Code Block |
---|
| {
....
"adHocFilterTypes": [
"TIME",
"DEVICE",
"DOMAIN",
"APIC_CATALOG",
"APIC_SPACE",
"APIC_PRODUCT",
"APIC_PLAN",
"APIC_API",
"APIC_API_VERSION",
"APIC_CONSUMER_APP"
],
....
} |
| | Additional parameter | Available filtersParameters : | Code Block |
---|
| {
....
"filtersParameters": {
"timeRangeType": "recent",
"timeRangePeriod": "86400000"
},
....
} |
| |
Response:Response Type | Example value | Description |
---|
Successful | Code Block |
---|
| {
"resultCode": "SUCCESS",
"resultMessage": "Report added successfully",
"result": {
"name": "<new report name>",
"description": "<new report description>",
"productView": "<new report productView>",
"apiReference": "<New unique report uuid>",
"indexSets": "<new report indexSet>",
"documentType": "<new report documentType>",
"jsonQuery": "<new report query>",
"schedule": "",
"recipients": [],
"adHocFilterTypes": ["TIME", "DEVICE",....],
"filtersParameters": { "timeRangeType": "recent",.....},
"lastUpdateTimeInMillis": 1646826210928,
"lastUpdateUserName": "<current userName>",
"esHeadersDictionary": ""
}
} |
| Status code: 200 resultCode → SUCCESS resultMessage → “Report added successfully” |
|
Edit Report Expand |
---|
title | /op/api/v2/report/{{productView}}/{{reportApiReferenceId}} |
---|
|
URL:PUT - https://{{dpodHostname}} /op/api/v2/report/{{productView}} /{{reportApiReferenceId}} URL Parameters:Name | Is required | Description | Parameter Type | Data Type |
---|
productView | True | Product view APIC / IDG | String | | reportApiReferenceId | True | The report apiReferenceId you wish to edit ( id can be retrieved from “Retrieved all reports” response) | String | ‘apiReferenceId’ of the report you want to edit |
Authorization:Required Permissions | More info |
---|
Edit report Access permissions for product view of the report
| See roles information here: Role Based Access Control |
Request:Type | Parameters | Example Json | Description |
---|
Required | String name String description String productView String indexSets String documentType String jsonQuery String jsonParameters String schedule List<String>recipients List<String>adHocFilterTypes Map<String, String>filtersParameters String serviceNameFieldOverride String esHeadersDictionary
| Code Block |
---|
| {
"name": "<report edited/source name>",
"description": "<report edited/source description>",
"productView": "<report edited/source productView>",
"indexSets": "<report edited/source indexSet>",
"documentType": "<report edited/source documentType>",
"jsonQuery": "<report edited/source query>",
"schedule": "",
"recipients": [],
"adHocFilterTypes": [...],
"filtersParameters": {...},
"esHeadersDictionary": ""
} |
| recipients → recipients' email address. Array can be sent empty.
filtersParameters → list of filters. List can be sent empty.
| Additional parameter | Available adHocFilterTypes : | Code Block |
---|
| {
....
"adHocFilterTypes": [
"TIME",
"DEVICE",
"DOMAIN",
"APIC_CATALOG",
"APIC_SPACE",
"APIC_PRODUCT",
"APIC_PLAN",
"APIC_API",
"APIC_API_VERSION",
"APIC_CONSUMER_APP"
],
....
} |
| | Additional parameter | Available filtersParameters : | Code Block |
---|
| {
....
"filtersParameters": {
"timeRangeType": "recent",
"timeRangePeriod": "86400000"
},
....
} |
| |
Response:Response Type | Example value | Description |
---|
Successful | Code Block |
---|
| {
"resultCode": "SUCCESS",
"resultMessage": "Report updated successfully",
"result": {
"name": "<report edited/source name>",
"description": "<report edited/source description>",
"productView": "<report edited/source productView>",
" |
|
|
...
apiReference": "<report uuid>",
"indexSets": "<report edited/source indexSet>",
" |
|
|
...
documentType": "<report edited/source documentType>",
"jsonQuery": "<report edited/source query>",
"schedule": |
|
|
...
...
",
"recipients": [],
"adHocFilterTypes": ["TIME", " |
|
|
...
DEVICE",....],
"filtersParameters": { |
|
|
...
"timeRangeType": "recent",.....},
|
|
|
...
"lastUpdateTimeInMillis": 1646826210928,
" |
|
|
...
lastUpdateUserName": "<current userName>",
"esHeadersDictionary": ""
|
|
|
...
resultCode:
resultMessage:
results: list of reports Reports REST API - Message Structure → Response Report
api2
Expand |
---|
|
GET: dbfkjdsbfk Response | Status code: 200 resultCode → SUCCESS resultMessage → “Report updated successfully” |
|
Delete Report Expand |
---|
title | /op/api/v2/report/{{productView}}/{{reportApiReferenceId}} |
---|
|
URL:DELETE - https://{{dpodHostname}} /op/api/v2/report/{{productView}} /{{reportApiReferenceId}} Request - None.URL Parameters:Name | Is required | Description | Parameter Type | Data Type |
---|
productView | True | Product view APIC / IDG | String | | reportApiReferenceId | True | The report apiReferenceId you wish to delete ( id can be retrieved from “Retrieved all reports” response) | String | ‘apiReferenceId’ of the report to delete |
Authorization:Required Permissions | More info |
---|
Edit report Access permissions for required product related to the report you wish to delete
| See roles information here: Role Based Access Control |
Response:Response Type | Example value | Description |
---|
Successful | Code Block |
---|
| {
"resultCode": "SUCCESS",
"resultMessage": "Report deleted successfully"
} |
| Status code: 200 resultCode → SUCCESS resultMessage → “Report deleted successfully” |
|