Create report

POST https://api.digicert.com/reports/v1/report
Use this endpoint to create a report.

Example requests and responses

cURL

curl --request POST 'https://api.digicert.com/reports/v1/report' \
--header 'X-DC-DEVKEY: {{api_key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "display_name": "Example report",
  "schedule": {
    "frequency": "MONTHLY",
    "weekday_to_run": "",
    "weekday_frequency": "",
    "run_until": "",
    "repeat_every": 3,
    "repeat_on": "DATE_OF_THE_MONTH",
    "repeat_on_date": {
      "date": 5,
      "last_day_of_the_month": false
    }
  },
  "format": [
    "CSV"
  ],
  "notification_emails": [
    {
      "user_id": 1234567,
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane.doe@example.com"
    }
  ],
  "report_metadata": {
    "report_type": "orders",
    "columns": [
      {
        "identifier": "order_id"
      },
      {
        "identifier": "order_status"
      },
      {
        "identifier": "serial_number"
      },
      {
        "identifier": "account_id"
      },
      {
        "identifier": "request_state"
      },
      {
        "identifier": "product_name"
      },
      {
        "identifier": "order_created_date"
      },
      {
        "identifier": "additional_email"
      },
      {
        "identifier": "user_or_requester_name"
      },
      {
        "identifier": "user_or_requester_email"
      },
      {
        "identifier": "common_name"
      },
      {
        "identifier": "sans"
      },
      {
        "identifier": "certificate_status"
      },
      {
        "identifier": "validity_start_date"
      },
      {
        "identifier": "validity_end_date"
      },
      {
        "identifier": "organization_name"
      }
    ],
    "filters": [
      {
        "filter_identifier": "custom_date",
        "column_identifier": "order_created_date",
        "values": [
          "2021-08-01",
          "2021-08-20"
        ]
      }
    ],
    "sources": {
      "division_filter_type": "INCLUDE_ALL_DIVISIONS",
      "sub_account_filter_type": "EXCLUDE_ALL_SUB_ACCOUNTS"
    }
  }
}'

201 Created

{
  "report_identifier": "e62b02f3-97f9-4fa1-9314-f9ecfdcaf5d7",
  "message": "Successfully created Custom Report"
}

URL query parameters

NameReq/OptTypeDescription
language_idoptionalintID of the language to use for column headings in generated reports.
Allowed values: See Glossary - Locale codes
Default: English (1)

Request parameters

NameReq/OptTypeDescription
display_namerequiredstringReport display name.
Allowed characters: a-z, A-Z, 0-9, and _:()[]
schedulerequiredobjectObject with key/value pairs that define the report schedule.
.. frequencyrequiredstringFrequency of report creation.
Possible values: ON_DEMAND, WEEKLY, and MONTHLY (case-insensitive).
.. weekday_to_runconditionalstringDay of the week to initiate a report run.
Possible values: SUNDAY to SATURDAY (case-insensitive). Not required if frequency is ON_DEMAND or if repeat_on is DATE_OF_THE_MONTH.
.. weekday_frequencyconditionalstringWeek of the month to initiate a report run.
Possible values: FIRST, SECOND, THIRD, FOURTH, LAST (case-insensitive).
For example, to run a report on the first Monday of every month:
.. repeat_everyconditionalstringNumber of weeks or months between each report run.
Range:
For example, to run a report every two weeks:
.. repeat_onconditionalstringFor monthly reports, whether to initiate report runs on a specific day or date.
Possible values:
.. .. repeat_on_dateconditionalobjectObject with key/value pairs defining a monthly date when the report run initiates. Required if repeat_on is DATE_OF_THE_MONTH.
.. .. dateoptionalintegerDay of the month on which a new report run is initiated.
Range: 1-28
.. .. last_day_of_the_monthoptionalbooleanIf true, a new report run is initiated on the last day of the month. Otherwise, false.
.. run_untiloptionalstringDate to stop generating reports. If undefined, the scheduler will continue to initiate report runs until you disable the report.
Format: YYYY-MM-DD
formatrequiredarray of stringsFile format for generated reports. Because reports are only generated in one format, the formats array should only contain one item.
Possible values: CSV, JSON, EXCEL (case-insensitive). The formats that each type of report supports are listed in the supported_formats array in the List report types response.
notification_emailsoptionalarray of objectsList of objects with information about users to notify when a report is generated and ready for download. Users must be admins in your CertCentral account.
.. user_idrequiredintegerUser ID.
.. first_namerequiredstringUser first name.
.. last_namerequiredstringUser last name.
.. emailrequiredstringUser email address.
report_metadatarequiredobjectObject that defines the report type and data to include in the report.
.. report_typerequiredstringReport type.
Allowed values: See List report types.
.. columnsconditionalobjectList of objects that define the columns to include in the report. The order of columns in this array matches the order of columns in the generated report.
Note: FQDN (fqdn) report types do not allow column customization. When creating an fqdn report, omit the columns array from your request. For all other report types, columns is a required parameter, and must include identifiers for all required columns in the given report type.
.. .. identifierrequiredstringColumn identifier.
Allowed values: See List columns. Column identifiers vary by report type.
.. filtersoptionalarray of objectsList of objects that define the report’s filters. To learn more about column filters, see Column filters.
.. .. column_identifierrequiredstringColumn to filter by.
Allowed values: Varies by report type. To get the list of columns you can use as filters for a given report type, use the List columns endpoint.
Note: In most cases, you can only add filters for columns included in the report. In other words, to add a filter, the column_identifier value for the filter must also be present in the report_metadata.columns array. However, some columns can only be used as filters. For these columns, you can add a filter, but you cannot include the column’s identifier in the report_metadata.columns array. To see if a column can only be used as a filter, check the value of the filter_only parameter in the List columns API response.
.. .. valuesconditionalarray of stringsList of values. For each row in the report, the value of the filtered column (column_identifier) is compared to the values in this list. A row is only included in the report if the filtered column contains a value that meets the filter criteria.
Not used if the filter_type for the column is static. For more information, see Filters reference: Types and operators.
.. .. filter_identifierrequiredstringOperator that defines how to determine if the value in a column meets the filter criteria.
Allowed values: Varies by column. To get the list of filter operators available for a given report type, use the List columns endpoint. To learn more about filter operators, see Filters reference: Types and operators.
.. sourcesoptionalobjectObject with key/value pairs that determine the sources of data for the report. If the report type can use subaccounts and divisions as sources, and if the sources object is empty or not provided, these defaults are applied:
.. .. division_filter_typeoptionalstringDefines divisions to include in the report.
Possible values:
INCLUDE_ALL_DIVISIONS (default) - Report includes data from all divisions in your account.
INCLUDE_TOP_DIVISION - Report only includes data from the top-level division in your account.
CHOOSE_DIVISIONS - Report includes data from divisions you add to the divisions array.
EXCLUDE_ALL_DIVISIONS - Report only includes data from subaccounts. All parent account data is omitted. Note: Reports configured to omit parent account data must include subaccount data. In other words, when the value of division_filter_type is EXCLUDE_ALL_DIVISIONS, the value of sub_account_filter_type cannot be EXCLUDE_ALL_SUB_ACCOUNTS.
.. .. divisionsconditionalarray of integersList of IDs for each division to include in the report.
Required if division_filter_type is CHOOSE_DIVISIONS.
.. .. sub_account_filter_typeoptionalstringDefines subaccounts to include in the report.
Possible values:
INCLUDE_ALL_SUB_ACCOUNTS - Report includes data from all subaccounts you manage.
EXCLUDE_ALL_SUB_ACCOUNTS (default) - Report does not includes subaccount data.
CHOOSE_SUB_ACCOUNTS - Report includes data from subaccounts you add to the sub_accounts array.
.. .. sub_accountsconditionalarray of integersList of IDs for each subaccount to include in the report.
Required if sub_account_filter_type is CHOOSE_SUBACCOUNTS.

Response parameters

NameTypeDescription
report_identifierstringReport ID (UUID).
messagestringReport creation message.