Skip to main content
POST
/
organizations
/
{orgId}
/
dataexports
/
adhoc
Trigger data export.
curl --request POST \
  --url https://api.m3ter.com/organizations/{orgId}/dataexports/adhoc \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sourceType": "USAGE",
  "operationalDataTypes": [
    "BILLS"
  ],
  "version": 123,
  "destinationIds": [
    "<string>"
  ],
  "exportFileFormat": "CSV",
  "startDate": "2023-11-07T05:31:56Z"
}
'
{
  "jobId": "<string>"
}

Authorizations

Authorization
string
header
required

m3ter supports machine to machine authentication using the clientCredentials OAuth2 flow.

The authorizationCode flow controls access for human users via the m3ter Console application.

Path Parameters

orgId
string
required

UUID of the organization

Body

application/json

Request representing an operational data export configuration.

sourceType
enum<string>
required
Available options:
USAGE,
OPERATIONAL
operationalDataTypes
enum<string>[]
required

The list of the operational data types should be exported for.

Minimum array length: 1
Available options:
BILLS,
COMMITMENTS,
ACCOUNTS,
BALANCES,
CONTRACTS,
ACCOUNT_PLANS,
AGGREGATIONS,
PLANS,
PRICING,
PRICING_BANDS,
BILL_LINE_ITEMS,
METERS,
PRODUCTS,
COMPOUND_AGGREGATIONS,
PLAN_GROUPS,
PLAN_GROUP_LINKS,
PLAN_TEMPLATES,
BALANCE_TRANSACTIONS,
TRANSACTION_TYPES,
CHARGES
version
integer<int64>

The version number of the entity:

  • Create entity: Not valid for initial insertion of new entity - do not use for Create. On initial Create, version is set at 1 and listed in the response.
  • Update Entity: On Update, version is required and must match the existing version because a check is performed to ensure sequential versioning is preserved. Version is incremented by 1 and listed in the response.
destinationIds
string[]

The destination ids.

Note: If you omit a Destination, this means that when the Export job runs and has succeeded, you can download the data export file locally. For details, see the Get Data Export File Download URL endpoint in this API Reference.

exportFileFormat
enum<string>
Available options:
CSV,
JSONL
startDate
string<date-time>

The inclusive start date for the data export.

Response

Returns the job id for the ah-hoc data export.

Response containing data export ad-hoc jobId

jobId
string

The id of the job