Your suggested change has been received. Thank you.

close

Suggest A Change

https://thales.na.market.dpondemand.io/docs/dpod/services/kmo….

back

Azure APIs

Azure Reports APIs

search

Please Note:

Azure Reports APIs

CCKM provides options to generate key visibility reports based on:

  • Key-related activities between CCKM and Azure Vault

  • Track keys by their expiration dates

  • What applications are using the keys

Azure reports are categorized as:

  • Key Activity Report: Inspect individual Azure key histories by operations, for example, when they were refreshed, rotated, edited, or deleted. Also, use this report to compare key activities between CCKM and Azure Vault.

  • Key Aging Report: Track keys by their expiration dates. Audit a range of dates, from past material deletions to future scheduled deletions, within the selected Azure Vault.

  • Service/Usage Report: Monitor key usage by tracking services and applications consuming the keys. View when and where a service requests the use of each key.

Use the Azure reports APIs to:

  • Generate a report

  • View the list of existing reports

  • View details of a particular report

  • Delete a report from CCKM

  • View the content of a generated report

  • Download the content of a report in CSV

Generating a Report

Use the post /v1/cckm/azure/reports API to generate a report. This API starts the report generation. The content of the report can be verified by running the get /v1/cckm/azure/reports/{id}/contents API. Refer to Viewing Content of Generated Reports.

Syntax


curl -k '<IP>/api/v1/cckm/azure/reports' -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' --data-binary $'{\n  "name": "<report name>",\n  "start_time": "<start time>",\n  "end_time": "<end time>",\n  "report_type": "<report type>",\n  "log_analytic_params": [<log analytic params>]\n}' --compressed

Request Parameters

ParameterTypeDescription
AUTHTOKENstringAuthorization token.
log_analytic_paramsarray of JSONsLog analytics parameters. Refer to Log Analytics Parameters for details.
namestringName for the report.
report_typestringType of the report. Possible types are:
• service-report
• key-report
• key-aging

The default type is key-report.
end_timestringEnd time for the report. Default end time is the time when the call is initiated.
start_timestringStart time from when the report is to be generated. Default start time is end_time-24hrs.

If end_time and start_time are not specified, a report for the last 24 hours is generated.

Log Analytics Parameters

ParameterTypeDescription
key_vaultstringName of the Azure key vault.
work_space_idstringID of the Azure Log Analytics workspace. To determine the Azure Workspace ID, refer to Prerequisites.
This parameter is not required for the aging-report type.

Example Request


curl -k 'https://127.0.0.1/api/v1/cckm/azure/reports' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI5ZDJiYmYxNC0zMDg1LTQ5YjAtYTY4MC1hMDQ5ODgyYjIwNDQiLCJzdWIiOiJsb2NhbHxhNDk0MmY1OS1mMGUxLTQ1ZWQtYWUxNS1kZGM3YWZhZDA4NzYiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNWU3MDBjY2UtMTRmYS00ZTVjLWI0YjMtNWQ4ZmE3ODgxYmI3Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjAxZDM2ZTY3LTI5NWQtNDNjZC05NDExLTk0OTdkYjQzMzQ4MyIsImlhdCI6MTU5NjAxMzM0OCwiZXhwIjoxNTk2MDEzNjQ4fQ.7jbUbvoZr9dZ8Yf1NmDUTw3jhq-XDzSHJzN-vQeYcbo' -H 'Content-Type: application/json' --data-binary $'{"name":"r1",\n   "report_type": "key-report",\n   "log_analytic_params": [\n      {\n         "key_vault": "pkv-softkeys::260ecbe7-777b-4d3c-84ea-887620498863",\n         "work_space_id": "05bd46d9-aa85-4007-9efe-786f7c944ed1"\n      }\n   ],\n   "start_time": "2019-09-17T06:58:00Z",\n   "end_time": "2020-09-17T07:02:00Z"\n}' --compressed

Example Response


{
    "id": "731877ed-ab05-498c-b89b-72d415446b2c",
    "uri": "kylo:kylo:cckm:reports:r1",
    "account": "kylo:kylo:admin:accounts:kylo",
    "application": "ncryptify:gemalto:admin:apps:kylo",
    "devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
    "createdAt": "2020-12-21T05:40:10.483319803Z",
    "name": "r1",
    "updatedAt": "2020-12-21T05:40:10.501985675Z",
    "overall_status": "in_progress",
    "abort": false,
    "report_type": "key-report",
    "work_space_ids": [
        "05bd46d9-aa85-4007-9efe-786f7c944ed1"
    ],
    "key_vaults": [
        "pkv-softkeys::260ecbe7-777b-4d3c-84ea-887620498863"
    ],
    "start_time": "2019-09-17T06:58:00Z",
    "end_time": "2020-09-17T07:02:00Z"
}

Response Codes

Response CodeDescription
2xxSuccess
4xxClient errors
5xxServer errors

Refer to HTTP status codes for details.

Viewing List of Existing Reports

Use the get /v1/cckm/azure/reports API to view the list of updated reports. The results can be filtered using the query parameters.

Syntax


curl -k '<IP>/api/v1/cckm/azure/reports?skip=0&limit=10&sort=updatedAt' -H 'Authorization: Bearer AUTHTOKEN' --compressed

Request Parameter

ParameterTypeDescription
AUTHTOKENstringAuthorization token.

Request Query Parameters

ParameterTypeDescription
idstringInternal ID of the report.
overall_statusstringOverall status of the report. The status can be:
completed
in progress
failed
namestringName of the report.
report_typestringType of the report. Possible types are:
• service-report
• key-report
• key-aging
skipintegerNumber of records to skip. For example, if "skip":5 is specified, the first five records will not be displayed in the output.
limitintegerNumbers of records to display. For example, if "limit":10 is specified, then the next 10 records (after skipping the number of records specified in the skip parameter) will be displayed in the output.
sortstringComma-delimited list of properties to sort the results.

Example Request


curl -k 'https://127.0.0.1/api/v1/cckm/azure/reports?skip=0&limit=10&sort=updatedAt' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI5ZDJiYmYxNC0zMDg1LTQ5YjAtYTY4MC1hMDQ5ODgyYjIwNDQiLCJzdWIiOiJsb2NhbHxhNDk0MmY1OS1mMGUxLTQ1ZWQtYWUxNS1kZGM3YWZhZDA4NzYiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNWU3MDBjY2UtMTRmYS00ZTVjLWI0YjMtNWQ4ZmE3ODgxYmI3Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjAxZDM2ZTY3LTI5NWQtNDNjZC05NDExLTk0OTdkYjQzMzQ4MyIsImlhdCI6MTU5NjAxMzM0OCwiZXhwIjoxNTk2MDEzNjQ4fQ.7jbUbvoZr9dZ8Yf1NmDUTw3jhq-XDzSHJzN-vQeYcbo' --compressed

Example Response


{
    "skip": 0,
    "limit": 10,
    "total": 1,
    "resources": [

        {
            "id": "731877ed-ab05-498c-b89b-72d415446b2c",
            "uri": "kylo:kylo:cckm:reports:r1",
            "account": "kylo:kylo:admin:accounts:kylo",
            "application": "ncryptify:gemalto:admin:apps:kylo",
            "devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
            "createdAt": "2020-12-21T05:40:10.48332Z",
            "name": "r1",
            "updatedAt": "2020-12-21T05:40:11.340775Z",
            "completed_at": "2020-12-21T05:40:11.34047Z",
            "overall_status": "completed",
            "detailed_status": {
                   "pkv-softkeys::260ecbe7-777b-4d3c-84ea-887620498863": "completed"
            },
            "abort": false,
            "report_type": "key-report",
            "work_space_ids": [
                "05bd46d9-aa85-4007-9efe-786f7c944ed1"
            ],
            "key_vaults": [
                "pkv-softkeys::260ecbe7-777b-4d3c-84ea-887620498863"
            ],
            "start_time": "2019-09-17T06:58:00Z",
            "end_time": "2020-09-17T07:02:00Z"
        }
    ]
}

Response Codes

Response CodeDescription
2xxSuccess
4xxClient errors
5xxServer errors

Refer to HTTP status codes for details.

Viewing Details of a Particular Report

Use the get /v1/cckm/azure/reports/{id} API to view the details of a report.

Syntax


curl -k '<IP>/api/v1/cckm/azure/reports/{id}' -H 'Authorization: Bearer AUTHTOKEN' --compressed

Here, {id} represents the report ID.

Request Parameter

ParameterTypeDescription
AUTHTOKENstringAuthorization token.

Example Request


curl -k 'https://127.0.0.1/api/v1/cckm/azure/reports/731877ed-ab05-498c-b89b-72d415446b2c' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI5ZDJiYmYxNC0zMDg1LTQ5YjAtYTY4MC1hMDQ5ODgyYjIwNDQiLCJzdWIiOiJsb2NhbHxhNDk0MmY1OS1mMGUxLTQ1ZWQtYWUxNS1kZGM3YWZhZDA4NzYiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNWU3MDBjY2UtMTRmYS00ZTVjLWI0YjMtNWQ4ZmE3ODgxYmI3Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImJmZjI5NDEyLWNmMzMtNDkyMS1hYzEzLWZmM2IzZGIyZWQ1YyIsImlhdCI6MTU5NjAxMzY2MiwiZXhwIjoxNTk2MDEzOTYyfQ.pQ8y9tMSTrBGZ-RYfWAHh6JTFp7GJXMDL10UFGScJQU' --compressed

Example Response


{
    "id": "731877ed-ab05-498c-b89b-72d415446b2c",
    "uri": "kylo:kylo:cckm:reports:r1",
    "account": "kylo:kylo:admin:accounts:kylo",
    "application": "ncryptify:gemalto:admin:apps:kylo",
    "devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
    "createdAt": "2020-12-21T05:40:10.48332Z",
    "name": "r1",
    "updatedAt": "2020-12-21T05:40:11.340775Z",
    "completed_at": "2020-12-21T05:40:11.34047Z",
    "overall_status": "completed",
    "detailed_status": {
           "pkv-softkeys::260ecbe7-777b-4d3c-84ea-887620498863": "completed"
    },
    "abort": false,
    "report_type": "key-report",
    "work_space_ids": [
        "05bd46d9-aa85-4007-9efe-786f7c944ed1"
    ],
    "key_vaults": [
        "pkv-softkeys::260ecbe7-777b-4d3c-84ea-887620498863"
    ],
    "start_time": "2019-09-17T06:58:00Z",
    "end_time": "2020-09-17T07:02:00Z"
}

Response Codes

Response CodeDescription
2xxSuccess
4xxClient errors
5xxServer errors

Refer to HTTP status codes for details.

Deleting a Report from CCKM

Use the delete /v1/cckm/azure/reports/{id} API to delete a report from CCKM.

Syntax


curl -k '<IP>/api/v1/cckm/azure/reports/{id}' -X DELETE -H 'Authorization: Bearer AUTHTOKEN' --compressed

Here, {id} represents the report ID.

Request Parameter

ParameterTypeDescription
AUTHTOKENstringAuthorization token.

Example Request


curl -k 'https://127.0.0.1/api/v1/cckm/azure/reports/731877ed-ab05-498c-b89b-72d415446b2c' -X DELETE -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI5ZDJiYmYxNC0zMDg1LTQ5YjAtYTY4MC1hMDQ5ODgyYjIwNDQiLCJzdWIiOiJsb2NhbHxhNDk0MmY1OS1mMGUxLTQ1ZWQtYWUxNS1kZGM3YWZhZDA4NzYiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNWU3MDBjY2UtMTRmYS00ZTVjLWI0YjMtNWQ4ZmE3ODgxYmI3Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImJmZjI5NDEyLWNmMzMtNDkyMS1hYzEzLWZmM2IzZGIyZWQ1YyIsImlhdCI6MTU5NjAxMzY2MiwiZXhwIjoxNTk2MDEzOTYyfQ.pQ8y9tMSTrBGZ-RYfWAHh6JTFp7GJXMDL10UFGScJQU' --compressed

Example Response


{
"status": 204
}

Viewing Content of Generated Reports

Use the get /v1/cckm/azure/reports/{id}/contents API to view the content of a report on console. Use the request query parameters to filter the content of the report.

Syntax


curl -k '<IP>/api/v1/cckm/azure/reports/{id}/contents?skip=0&limit=10&sort=updatedAt' -H 'Authorization: Bearer AUTHTOKEN' --compressed

Here, {id} represents the report ID.

Request Parameter

ParameterTypeDescription
AUTHTOKENstringAuthorization token.

Request Query Parameters

ParameterTypeDescription
subscription_idstringID of the Azure subscription.
key_namestringName of the key.
key_vaultstringName of the Azure key vault on CCKM.
key_versionstringVersion of the key.
key_activitystringActivity of the key.
client_idstringID of the Azure application/client.
key_ownerstringOwner of the key on Azure.
cckm_operationstringCCKM operation performed on the Azure.
user_namestringName of the CCKM user who performed the operation.
cloud_namestringName of the Azure cloud.
azure_namestringName of the Azure vault on Azure.
skipintegerNumber of records to skip. For example, if "skip":5 is specified, the first five records will not be displayed in the output.
limitintegerNumbers of records to display. For example, if "limit":10 is specified, then the next 10 records (after skipping the number of records specified in the skip parameter) will be displayed in the output.
sortstringComma-delimited list of properties to sort the results.

Example Request


curl -k 'https://127.0.0.1/api/v1/cckm/azure/reports/731877ed-ab05-498c-b89b-72d415446b2c/contents?skip=0&limit=10&sort=updatedAt' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI5ZDJiYmYxNC0zMDg1LTQ5YjAtYTY4MC1hMDQ5ODgyYjIwNDQiLCJzdWIiOiJsb2NhbHxhNDk0MmY1OS1mMGUxLTQ1ZWQtYWUxNS1kZGM3YWZhZDA4NzYiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNWU3MDBjY2UtMTRmYS00ZTVjLWI0YjMtNWQ4ZmE3ODgxYmI3Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImJmZjI5NDEyLWNmMzMtNDkyMS1hYzEzLWZmM2IzZGIyZWQ1YyIsImlhdCI6MTU5NjAxMzY2MiwiZXhwIjoxNTk2MDEzOTYyfQ.pQ8y9tMSTrBGZ-RYfWAHh6JTFp7GJXMDL10UFGScJQU' --compressed

Example Response


{
    "skip": 0,
    "limit": 1,
    "total": 62,
    "resources": [
        {
            "id": "ee0c37e2-ef22-4fa4-8c7e-7b341d454f49",
            "uri": "kylo:kylo:cckm:azure-reports:ee0c37e2-ef22-4fa4-8c7e-7b341d454f49",
            "account": "kylo:kylo:admin:accounts:kylo",
            "application": "ncryptify:gemalto:admin:apps:kylo",
            "devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
            "createdAt": "2020-12-21T05:43:33.37638Z",
            "updatedAt": "2020-12-21T05:43:33.60957Z",
            "key_vault": "pkv-softkeys::260ecbe7-777b-4d3c-84ea-887620498863",
            "key_activity": "KeyBackup",
            "object_id": "0de484e9-6924-4a59-aad1-41afaba066f4",
            "client_id": "ef767cf9-61dd-4765-a4df-ebd65493c728",
            "modified_time": "2020-12-17T05:49:27.309Z",
            "key_expiration": null,
            "subscription_id": "260ecbe7-777b-4d3c-84ea-887620498863",
            "cloud_name": "AzureCloud",
            "azure_name": "PKV-SOFTKEYS"
        }
    ]
}

Response Codes

Response CodeDescription
2xxSuccess
4xxClient errors
5xxServer errors

Refer to HTTP status codes for details.

Downloading Content of Reports in CSV

Use the get /v1/cckm/azure/reports/{id}/download API to view the comma-separated report. If needed, you can copy this report and create a CSV file.

Syntax


curl -k '<IP>/api/v1/cckm/azure/reports/{id}/download' -H 'Authorization: Bearer AUTHTOKEN' --compressed

Here, {id} represents the report ID.

Request Parameter

ParameterTypeDescription
AUTHTOKENstringAuthorization token.

Example Request


curl -k 'https://127.0.0.1/api/v1/cckm/azure/reports/731877ed-ab05-498c-b89b-72d415446b2c/download' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI5ZDJiYmYxNC0zMDg1LTQ5YjAtYTY4MC1hMDQ5ODgyYjIwNDQiLCJzdWIiOiJsb2NhbHxhNDk0MmY1OS1mMGUxLTQ1ZWQtYWUxNS1kZGM3YWZhZDA4NzYiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNWU3MDBjY2UtMTRmYS00ZTVjLWI0YjMtNWQ4ZmE3ODgxYmI3Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImJmZjI5NDEyLWNmMzMtNDkyMS1hYzEzLWZmM2IzZGIyZWQ1YyIsImlhdCI6MTU5NjAxMzY2MiwiZXhwIjoxNTk2MDEzOTYyfQ.pQ8y9tMSTrBGZ-RYfWAHh6JTFp7GJXMDL10UFGScJQU' --compressed

Example Request


"Key Name,Key Vault,Key Version,Key Activity,Client ID,Modified Date,Subscription ID,Cloud"
Uploaded,pkv-softkeys::260ecbe7-777b-4d3c-84ea-887620498863,,KeyBackup,ef767cf9-61dd-4765-a4df-ebd65493c728,2020-12-04 10:06:14.16 +0000 UTC,260ecbe7-777b-4d3c-84ea-887620498863,AzureCloud

The output shows the comma-separated report. If needed, you can copy this report and create a CSV file.

Response Codes

Response CodeDescription
2xxSuccess
4xxClient errors
5xxServer errors

Refer to HTTP status codes for details.