Interface ConsumptionAPI

interface ConsumptionAPI {
    clearCache: () => void;
    getConsumptionExecutions: (
        query: {
            actionToBlock?: string;
            filter?: string;
            limit?: number;
            offset?: number;
            page?: string;
            periodsToInclude?: ("current" | "previous")[];
            sort?: (
                | "periodstart"
                | "-periodstart"
                | "+periodstart"
                | "periodend"
                | "-periodend"
                | "+periodend"
            )[];
        },
        options?: ApiCallOptions,
    ) => Promise<GetConsumptionExecutionsHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for consumption api requests.

Type declaration

    • (): void
    • Clears the cache for consumption api requests.

      Returns void

getConsumptionExecutions: (
    query: {
        actionToBlock?: string;
        filter?: string;
        limit?: number;
        offset?: number;
        page?: string;
        periodsToInclude?: ("current" | "previous")[];
        sort?: (
            | "periodstart"
            | "-periodstart"
            | "+periodstart"
            | "periodend"
            | "-periodend"
            | "+periodend"
        )[];
    },
    options?: ApiCallOptions,
) => Promise<GetConsumptionExecutionsHttpResponse>

Retrieves the list of executions on an specific tenant

Type declaration

    • (
          query: {
              actionToBlock?: string;
              filter?: string;
              limit?: number;
              offset?: number;
              page?: string;
              periodsToInclude?: ("current" | "previous")[];
              sort?: (
                  | "periodstart"
                  | "-periodstart"
                  | "+periodstart"
                  | "periodend"
                  | "-periodend"
                  | "+periodend"
              )[];
          },
          options?: ApiCallOptions,
      ): Promise<GetConsumptionExecutionsHttpResponse>
    • Retrieves the list of executions on an specific tenant

      Parameters

      • query: {
            actionToBlock?: string;
            filter?: string;
            limit?: number;
            offset?: number;
            page?: string;
            periodsToInclude?: ("current" | "previous")[];
            sort?: (
                | "periodstart"
                | "-periodstart"
                | "+periodstart"
                | "periodend"
                | "-periodend"
                | "+periodend"
            )[];
        }

        an object with query parameters

        • OptionalactionToBlock?: string
        • Optionalfilter?: string

          The advanced filtering to use for the query. Refer to RFC 7644 for the syntax.

          example taskName eq "automation_run_ended" or taskName eq "report_triggered" or or taskName eq "dataVolumeAggregated"

          The following fields are supported: scope, resourcetype, resourceaction, resourceid, capacitylimit, localusage, globalusage, overage, blocked, periodstart, periodend, consumptionreportid, blockedeventtime, overageeventtime, taskname, taskdescription, userid, tenantid, customerfacing, actiontoblock

        • Optionallimit?: number

          Limit the returned result set

        • Optionaloffset?: number

          Offset for pagination - how many elements to skip

        • Optionalpage?: string

          The cursor to the page of data.

        • OptionalperiodsToInclude?: ("current" | "previous")[]

          Specifies which periods to include regardless of the period type, start and end specified

        • Optionalsort?: (
              | "periodstart"
              | "-periodstart"
              | "+periodstart"
              | "periodend"
              | "-periodend"
              | "+periodend"
          )[]
      • Optionaloptions: ApiCallOptions

      Returns Promise<GetConsumptionExecutionsHttpResponse>

      GetConsumptionExecutionsHttpError

an object with query parameters

GetConsumptionExecutionsHttpError