Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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}}

Status
colourGreen
titleGET
Retrieve All Reports

...

title/op/api/v2/reports/{{productView}}

URL:

GET - https://{{dpodHostname}}/op/api/v2/reports/{{productView}}

Request - None.

Parameters:

...

Parameter

...

Value

...

Description

...

Parameter Type

...

Data Type

...

productView

...

required

...

Product view APIC / IDG

...

path

...

APIC / IDG

Authorization:

...

Authentication Type

...

Required Permissions

...

More info

...

Basic Auth

...

  1. View or Edit report

  2. Access permissions for required product

...

See roles information here: Role Based Access Control

Response:

...

Response Type

...

Value

...

Description

...

Successful

...

languagejson

...

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}}

Status
colourGreen
titleGET
Retrieve All Reports

Expand
title/op/api/v2/reports/{{productView}}

URL:

GET - https://{{dpodHostname}}/op/api/v2/reports/{{productView}}

Request - None.

Parameters:

Parameter

Value

Description

Parameter Type

Data Type

productView

required

Product view APIC / IDG

path

APIC / IDG

Authorization:

Authentication Type

Required Permissions

More info

Basic Auth

  1. View or Edit report

  2. Access permissions for required product

See roles information here: Role Based Access Control

Response:

Response Type

Value

Description

Successful

Code Block
languagejson
{
    "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": ""
            },
            {....}
        ]
    }
}

resultCode → SUCCESS

resultMessage → “Reports retrieved successfully”

result → list of all reports and their data. For report parameters info click here:Reports REST API - Message Structure

Status
colourGreen
titleGET
Get Specific Report Details

Expand
title/op/api/v2/report/{{productView}}/{{reportApiReferenceId}}

URL:

GET - https://{{dpodHostname}}/op/api/v2/report/{{productView}}/{{reportApiReferenceId}}

Request - None.

Parameters:

Parameter

Value

Description

Parameter Type

Data Type

productView

required

Product view APIC / IDG

path

APIC / IDG

reportApiReferenceId

required

The report apiReferenceId (can be retrieved from “Retrieved all reports” response)

path

UUID

Authorization:

Authentication Type

Required Permissions

More info

Basic Auth

  1. View or Edit report

  2. Access permissions for required product related to the report

See roles information here: Role Based Access Control

Response:

Response Type

Value

Description

Successful

Code Block
languagejson
{
    "resultCode": "SUCCESS",
    "resultMessage": "Report retrieved successfully",
    "result": {
        "
schedule
name": "<report name>",
        "description": "<report description>",
        "productView": "<report product view>",
 
"recipients":
 
[],
      "apiReference": "<report uuid>",
        "
adHocFilterTypes
indexSets": 
[
"
TIME
<report indexSet>",
"DEVICE",....],
        "documentType": "<report documentType>",
        "
filtersParameters
jsonQuery": 
{ "timeRangeType": "recent"
"{\"query\":{\"bool\":{\"must\":{\"match_all\":{}},...
..
 }",
        "schedule": "",
        "
lastUpdateTimeInMillis
recipients": 
1646655197926,
[],
        
"
lastUpdateUserName
adHocFilterTypes": ["
admin
TIME", "DEVICE",....],
        
"esHeadersDictionary
"filtersParameters": { "timeRangeType": "recent",.....},
        
}
"lastUpdateTimeInMillis": 1644768927839,
        "lastUpdateUserName": 
{....}
"Installer",
        
]
"esHeadersDictionary": ""
    }
}

resultCode → SUCCESS

resultMessage

“Reports

“Report retrieved successfully”

result

list of all reports and their

The report data. For report parameters info click here:Reports REST API - Message Structure

Status
colour

...

Yellow
title

...

POST

...

Duplicate Report

...

Authorization:

Response:

Expand
title/op/api/v2/report/{{productView}}/{{reportApiReferenceId}}/duplicate

URL:

GET

POST - https://{{dpodHostname}}/op/api/v2/report/{{productView}}/{{reportApiReferenceId}}/duplicate

Request - None.

Parameters:

Parameter

Value

Description

Parameter Type

Data Type

productView

required

Product view APIC / IDG

path

APIC / IDG

reportApiReferenceId

required

The report apiReferenceId you wish to duplicate ( id can be retrieved from “Retrieved all reports” response)

path

UUID

Authorization:

Authentication Type

Required Permissions

More info

Basic Auth

View or
  1. Edit report

  2. Access permissions for required product related to the report you wish to duplicate

See roles information here: Role Based Access Control

Response:

Expand
title/op/api/v2/report/{{productView}}/{{reportApiReferenceId}}/duplicate

URL:

POST - https://{{dpodHostname}}/op/api/v2/report/{{productView}}/{{reportApiReferenceId}}/duplicate

Request - None.

Parameters:

Parameter

Value

Description

Parameter Type

Data Type

productView

required

Product view APIC / IDG

path

APIC / IDG

reportApiReferenceId

required

The report apiReferenceId you wish to duplicate ( id can be retrieved from “Retrieved all reports” response)

path

UUID

Authentication Type

Required Permissions

More info

Basic Auth

  1. Edit report

  2. Access permissions for required product related to the report you wish to duplicate

See roles information here: Role Based Access Control

Response Type

Value

Description

Successful

Code Block
languagejson
{
    "resultCode": "SUCCESS",
    "resultMessage": "Report 
retrieved
duplicated successfully",
    "result": {
        "name": "
<report name>
<source report name> Copy",
        "description": "
<report
<source report description>",
        "productView": "
<report
<source 
product
report 
view>
productView>",
        "apiReference": "
<report
<New unique report uuid>",
        "indexSets": "
<report
<source report indexSet>",
        "documentType": "
<report
<source report documentType>",
        "jsonQuery": "
{\"query\":{\"bool\":{\"must\":{\"match_all\":{}},... }
<source report query>",
        "schedule": "",
        "recipients": [],
        "adHocFilterTypes": ["TIME", "DEVICE",....],
        "filtersParameters": { "timeRangeType": "recent",.....},
        "lastUpdateTimeInMillis": 
1644768927839
1646826210928,
        "lastUpdateUserName": "<current userName>"
Installer"
,
        "esHeadersDictionary": ""
    
} }

resultCode → SUCCESS

resultMessage → “Report retrieved successfully”

result → The report data. For report parameters info click here:Reports REST API - Message Structure

Status
colourYellow
titlePOST
Duplicate Report

Response Type

Value

Description

Successful

Code Block
languagejson
{
    "resultCode": "SUCCESS",
    "resultMessage": "Report duplicated successfully",
    "result": {
        "name": "<source report name> Copy",
        "description": "<source report description>",
        "productView": "<source report productView>",
  }
}

resultCode → SUCCESS

resultMessage → “Report duplicated successfully”

result → The report data. For report parameters info click here:Reports REST API - Message Structure

Status
colourYellow
titlePOST
Execute (Async) Report

Expand
title/op/api/v2/report/{{productView}}/{{reportApiReferenceId}}/executeAsync

URL:

POST - https://{{dpodHostname}}/op/api/v2/report/{{productView}}/{{reportApiReferenceId}}/executeAsync

Parameters:

Parameter

Value

Description

Parameter Type

Data Type

productView

required

Product view APIC / IDG

path

APIC / IDG

reportApiReferenceId

required

The report apiReferenceId you wish to execute ( id can be retrieved from “Retrieved all reports” response)

path

UUID

Authorization:

Authentication Type

Required Permissions

More info

Basic Auth

  1. View or Edit report

  2. Access permissions for required product related to the report

See roles information here: Role Based Access Control

Request:

Type

Parameters

Example Json

Description

Required

  1. List<String> recipients

  2. Map<String, String>filtersParameters

Code Block
languagejson
{
    "recipients" :[], 
    "
apiReference
filtersParameters" : 
"<New unique report uuid>",
{}
}
  1. recipients → recipients' email address. Array can be sent empty.

  2. filtersParameters→ list of filters. List can be sent empty.

For report parameters info click here:Reports REST API - Message Structure

Additional parameter

Available filters:

Code Block
languagejson
{
    
"
indexSets
recipients"
: "<source report indexSet>",
 :[“address1@mail.com“...],
    
"
documentType
filtersParameters" : 
"<source report documentType>",
{
      
"
jsonQuery
deviceNameOp":
"
<source report query>
eq",
 
      "
schedule
deviceName":
"a8a68da7e070", 
      
"
recipients
timeRangeType":
[]
"recent",
      
"
adHocFilterTypes
timeRangePeriod":
[
"
TIME
600000"
,
 
"DEVICE",....],

    }
}

TODO - add all available filters and their description.

Response:

Response Type

Value

Description

Successful

Code Block
languagejson
{
  
"filtersParameters":
 
{
 "
timeRangeType
resultCode": 
"recent",.....}
"SUCCESS",
    
"
lastUpdateTimeInMillis
resultMessage": 
1646826210928,
"Report executed 
successfully",
    "
lastUpdateUserName
result": 
"<current userName>",
{
        "
esHeadersDictionary
executionId": 
""
<ID>
    }
}

resultCode → SUCCESS

resultMessage → “Report

duplicated

executed successfully”

result executionId

The report data. For report parameters info click here:Reports REST API - Message Structure

the report execution id (integer).

Status
colour

...

Green
title

...

GET
Get Report Execution Details

Authorization:

Request:

  1. recipients → recipients' email address. Array can be sent empty.

  2. filtersParameters→ list of filters. List can be sent empty.

For report parameters info click here:Reports REST API - Message Structure Available filters:
Expand
title/op/api/v2/reportreportexecution/{{productView}}/{{reportApiReferenceIdexecutionId}}/executeAsync

URL:

POST

GET - https://{{dpodHostname}}/op/api/v2/

report

reportexecution/{{productView}}/{{

reportApiReferenceId

executionId}}

/executeAsync

Request - None.

Parameters:

Parameter

Value

Description

Parameter Type

Data Type

productView

required

Product view APIC / IDG

path

APIC / IDG

reportApiReferenceId

required

The report apiReferenceId you wish to execute ( id can be retrieved from “Retrieved all reports” response)

path

UUID

Authentication Type

Required Permissions

More info

Basic Auth

  1. View or Edit report

  2. Access permissions for required product related to the report

See roles information here: Role Based Access Control

Type

Parameters

Example Json

Description

Required

  1. List<String> recipients

  2. Map<String, String>filtersParameters

Code Block
languagejson
{
    "recipients" :[], 
    "filtersParameters" : {}
}

Additional parameter

Description

Parameter Type

Data Type

productView

required

Relevant product view APIC / IDG

path

APIC / IDG

executionId

required

The report execution ID (can be retrieved from “execute report” api response)

path

ID

Authorization:

Authentication Type

Required Permissions

More info

Basic Auth

  1. View or Edit report

  2. Access permissions for required product related to the report

See roles information here: Role Based Access Control

Response:

Response Type

Value

Description

Successful

Code Block
languagejson
{
    "
recipients" :[“address1@mail.com“...]
resultCode": "SUCCESS",
    "resultMessage": "Report execution retrieved successfully",
    "
filtersParameters
result"
: {
        "
deviceNameOp
executionId":
"eq"
 7,
        "
deviceName
recipients": "
a8a68da7e070
",
        "
timeRangeType
filters": "
recent
",
        "
timeRangePeriod
executingUserName": "
600000
admin",
   
} }

TODO - add all available filters and their description.

Response:

Response Type

Value

Description

Successful

Code Block
languagejson
{
     "
resultCode
status": "
SUCCESS
OK",
        "
resultMessage
requestTimeInMillis": 
"Report executed successfully",
1646827094043,
        "
result
executionTimeInMillis": 
{
1646827094948,
        "
executionId
completionTimeInMillis": 
<ID>
1646827101507
    }
}

resultCode → SUCCESS

resultMessage → “Report

executed

execution retrieved successfully”

result

  • executionId

→ the report execution id
  • recipients

  • filters

  • executingUserName

  • status

  • requestTimeInMillis

  • executionTimeInMillis

  • completionTimeInMillis

========

Status
colourYellow
titlePOST
Duplicate R