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

...

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”

...

Status
colourGreen
titleGET
Get Specific Report Details

...

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

...

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

Status code: 200

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": {
        "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”

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" :[], 
    "filtersParameters" : {}
}
  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
{
    "recipients" :[“address1@mail.com“...],
    "filtersParameters" : {
      "deviceNameOp":"eq", 
      "deviceName":"a8a68da7e070", 
      "timeRangeType":"recent",
      "timeRangePeriod":"600000" 
    }
}

TODO - add all available filters and their description.

Response:

Response Type

Value

Description

Successful

Code Block
languagejson
{
    "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).

Status
colourGreen
titleGET
Get Report Execution Details

Expand
title/op/api/v2/reportexecution/{{productView}}/{{executionId}}

URL:

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

Request - None.

Parameters:

Parameter

Value

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
{
    "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

  • recipients

  • filters

  • executingUserName

  • status

  • requestTimeInMillis

  • executionTimeInMillis

  • completionTimeInMillis

Status
colourGreen
titleGET
Download Report Execution

Expand
title/op/api/v2/reportexecution/{{productView}}/{{executionId}}/download

URL:

GET - https://{{dpodHostname}}/op/api/v2/reportexecution/{{productView}}/{{executionId}}/download

Request - None.

Parameters:

Parameter

Value

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

xls file type

Status code: 200

Status
colourYellow
titlePOST
Duplicate Report

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

Authorization:

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:

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>",
        "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”

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

Status
colourYellow
titlePOST
Add Report

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

URL:

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

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. Edit report

  2. Access permissions for product view of new report

See roles information here: Role Based Access Control

Request:

Type

Parameters

Example Json

Description

Required

  1. String name

  2. String description

  3. String productView

  4. String indexSets

  5. String documentType

  6. String jsonQuery

  7. String jsonParameters

  8. String schedule

  9. List<String>recipients

  10. List<String>adHocFilterTypes

  11. Map<String, String>filtersParameters

  12. String serviceNameFieldOverride

  13. String esHeadersDictionary

Code Block
languagejson
{
        "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": ""
    }
  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 adHocFilterTypes:

Code Block
languagejson
{
      ....
        "adHocFilterTypes": [
            "TIME",
            "DEVICE",
            "DOMAIN",
            "APIC_CATALOG",
            "APIC_SPACE",
            "APIC_PRODUCT",
            "APIC_PLAN",
            "APIC_API",
            "APIC_API_VERSION",
            "APIC_CONSUMER_APP"
        ],
      ....
}

TODO - add all available filters and their description.

Additional parameter

Available filtersParameters:

Code Block
languagejson
{
      ....
        "filtersParameters": {
            "timeRangeType": "recent",
            "timeRangePeriod": "86400000"
        },
      ....
}

TODO - add all available filters and their description.

Response:

Response Type

Value

Description

Successful

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

Status code: 200

resultCode → SUCCESS

resultMessage → “Report

retrieved

added successfully”

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

Status
colour

...

Blue
title

...

PUT

...

Edit Report

Authorization:

Response:

{ "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>",
Expand
title/op/api/v2/report/{{productView}}/{{reportApiReferenceId}}/duplicate

URL:

POST

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

/duplicateRequest - 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

edit ( 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

from “Retrieved all reports” response)

path

UUID

Authorization:

Authentication Type

Required Permissions

More info

Basic Auth

  1. Edit report

  2. Access permissions for product view of new report

See roles information here: Role Based Access Control

Request:

Type

Parameters

Example Json

Description

Required

  1. String name

  2. String description

  3. String productView

  4. String indexSets

  5. String documentType

  6. String jsonQuery

  7. String jsonParameters

  8. String schedule

  9. List<String>recipients

  10. List<String>adHocFilterTypes

  11. Map<String, String>filtersParameters

  12. String serviceNameFieldOverride

  13. String esHeadersDictionary

Code Block
languagejson
{
        "
jsonQuery
name": "
<source
<report 
report
edited/source 
query>
name>",
        "
schedule
description": "
",
<report 
"recipients": []
edited/source description>",
        "
adHocFilterTypes
productView": 
["TIME", "DEVICE",....],
"<report edited/source productView>",
        "
filtersParameters
indexSets": 
{
"
timeRangeType": "recent",.....}, "lastUpdateTimeInMillis": 1646826210928
<report edited/source indexSet>",
        "
lastUpdateUserName
documentType": "
<current userName>
<report edited/source documentType>",
        "
esHeadersDictionary
jsonQuery": "<report edited/source query>",
       
} }

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

Authorization:

Request:

  • List<String> recipients

  • Map<String, String>filtersParameters
    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

    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

     "schedule": "",
            "recipients": [],
            "adHocFilterTypes": [...],
            "filtersParameters": {...},
            "esHeadersDictionary": ""
        }
    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 adHocFilterTypes:

    Code Block
    languagejson
    {
          ....
     
    "recipients" :[]
           "adHocFilterTypes": [
                "TIME",
                "DEVICE",
                "DOMAIN",
                "APIC_CATALOG",
         
    "filtersParameters"
     
    :
     
    {}
     
    }
    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
    {
        
    "
    recipients" :[“address1@mail.com“...],
    APIC_SPACE",
            
    "filtersParameters"
     
    :
     
    {
      "APIC_PRODUCT",
        
    "deviceNameOp":"eq",
            "
    deviceName":"a8a68da7e070"
    APIC_PLAN",
         
    "timeRangeType":"recent",
           "
    timeRangePeriod":"600000"
    APIC_API",
         
    }
     
    }

    TODO - add all available filters and their description.

    Response:

    Response Type

    Value

    Description

    Successful

    Code Block
    languagejson
    {
         
    "resultCode":
     "
    SUCCESS
    APIC_API_VERSION",
        
    "resultMessage":
     
    "Report
     
    executed
     
    successfully",
         "
    result
    APIC_CONSUMER_APP"
    :
    
    
    {
            ],
    
    "executionId":
     
    <ID>
         
    } }

    resultCode → SUCCESS

    resultMessage → “Report executed successfully”

    result executionId → the report execution id (integer).

    Status
    colourGreen
    titleGET
    Get Report Execution Details

    Authorization:

    Response:

    { "resultCode": "SUCCESS
    Expand
    title/op/api/v2/reportexecution/{{productView}}/{{executionId}}

    URL:

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

    Request - None.

    Parameters:

    Parameter

    Value

    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

    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 Type

    Value

    Description

    Successful

    Code Block
    languagejson
    ....
    }

    TODO - add all available filters and their description.

    Additional parameter

    Available filtersParameters:

    Code Block
    languagejson
    {
          ....
            "filtersParameters": {
                "timeRangeType": "recent",
                "timeRangePeriod": "86400000"
            },
          ....
    }

    TODO - add all available filters and their description.

    Response:

    Response Type

    Value

    Description

    Successful

    Code Block
    languagejson
    {
        "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>",
            "
    resultMessage
    indexSets": "
    Report
    <report 
    execution retrieved successfully
    edited/source indexSet>",
            "
    result
    documentType": 
    {
    "<report edited/source documentType>",
            "
    executionId
    jsonQuery":
    7
     "<report edited/source query>",
            "
    recipients
    schedule": "",
            "
    filters
    recipients": 
    ""
    [],
            "
    executingUserName
    adHocFilterTypes": 
    "admin"
    ["TIME", "DEVICE",....],
            "filtersParameters": { "
    status
    timeRangeType": "
    OK"
    recent",.....},
            "
    requestTimeInMillis
    lastUpdateTimeInMillis": 
    1646827094043
    1646826210928,
            "
    executionTimeInMillis
    lastUpdateUserName": 
    1646827094948
    "<current userName>",
            "
    completionTimeInMillis
    esHeadersDictionary": 
    1646827101507
    ""
        }
    }

    Status code: 200

    resultCode → SUCCESS

    resultMessage → “Report

    execution retrieved

    updated successfully”

    result

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

    ========

    Status
    colourYellow
    titlePOST

    ...