Skip to main content
POST
/
organizations
/
{orgId}
/
dataexports
/
schedules
Create Schedule
curl --request POST \
  --url https://api.m3ter.com/organizations/{orgId}/dataexports/schedules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "code": "<string>",
  "sourceType": "USAGE",
  "operationalDataTypes": [
    "BILLS"
  ],
  "version": 123,
  "destinationIds": [
    "<string>"
  ],
  "scheduleType": "<string>",
  "period": 2,
  "offset": 2,
  "cronExpression": "<string>",
  "exportFileFormat": "CSV"
}
'
{
  "id": "<string>",
  "version": 123,
  "name": "<string>",
  "code": "<string>",
  "sourceType": "USAGE",
  "destinationIds": [
    "<string>"
  ],
  "scheduleType": "HOUR",
  "period": 123,
  "offset": 123,
  "cronExpression": "<string>",
  "exportFileFormat": "CSV",
  "dtCreated": "2023-11-07T05:31:56Z",
  "dtLastModified": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "lastModifiedBy": "<string>",
  "operationalDataTypes": [
    "BILLS"
  ]
}

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 schedule configuration.

name
string
required

The name of the Data Export Schedule.

Minimum string length: 1
code
string
required

Unique short code of the Data Export Schedule.

Required string length: 1 - 80
sourceType
enum<string>
required
Available options:
USAGE,
OPERATIONAL
operationalDataTypes
enum<string>[]
required

A list of the entities whose operational data is included in the data export.

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 Export Destination ids.

Note: When creating or updating an Export Schedule, you can:

  • Define at least one Export Destination - see the ExportDestination section of this API Reference.
  • Alternatively, omit a Destination. Even if you omit a Destinations 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.
scheduleType
string

The type of interval used for when Data Exports are run for the Schedule. Possible values are: HOURLY or DAILY or MINUTE.

Used in conjunction with the period parameter to define the frequency of Data Exports in hours, days, or minutes.

period
integer<int32>

Defines the Schedule frequency for the Data Export to run in Hours, Days, or Minutes. Used in conjunction with the scheduleType parameter:

  • Lowest frequency is every 3 days.
  • Highest frequency is every 15 minutes.
Required range: x >= 1
offset
integer<int32>

Offset indicating starting point of the export

Required range: x >= 1
cronExpression
string
exportFileFormat
enum<string>
Available options:
CSV,
JSONL

Response

Returns the created Export Schedule

Response representing an operational data export configuration.

id
string
required

The id of the schedule.

version
integer<int64>

The version number:

  • Create: On initial Create to insert a new entity, the version is set at 1 in the response.
  • Update: On successful Update, the version is incremented by 1 in the response.
name
string

The name of the Data Export Schedule.

code
string

Unique short code of the Data Export Schedule.

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

The Export Destination ids.

scheduleType
enum<string>

The type of interval used for when Data Exports are run for the Schedule.

Available options:
HOUR,
DAY,
MINUTE,
AD_HOC
period
integer<int32>

Defines the Schedule frequency for the Data Export to run in Hours, Days, or Minutes. Used in conjunction with the scheduleType parameter.

offset
integer<int32>

Offset indicating starting point of the export within the configured scheduleType. For DAY, offset is in hours. For HOUR, offset is in minutes. Offset is not valid for MINUTE.

cronExpression
string

A cron expression (https://en.wikipedia.org/wiki/Cron) describing the frequency of the expression. Executions cannot be more frequent than every 15 minutes.

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

The DateTime when the Data Export Schedule was created.

dtLastModified
string<date-time>

The DateTime when the Schedule was last modified.

createdBy
string

The id of the user who created this Schedule.

lastModifiedBy
string

The id of the user who last modified this Data Export Schedule.

operationalDataTypes
enum<string>[]

A list of the entities whose operational data is included in the data export.

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