Get a breakdown of your credit consumption for flat-rated products
curl --request GET \
--url https://eu1.api.matillion.com/dpc/v1/consumption \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu1.api.matillion.com/dpc/v1/consumption"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu1.api.matillion.com/dpc/v1/consumption', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://eu1.api.matillion.com/dpc/v1/consumption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://eu1.api.matillion.com/dpc/v1/consumption"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://eu1.api.matillion.com/dpc/v1/consumption")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu1.api.matillion.com/dpc/v1/consumption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"consumedFrom": "2024-01-01T00:00:00.000Z",
"consumedBefore": "2024-01-02T00:00:00.000Z",
"consumption": [
{
"consumptionType": "etl-compute",
"dimensions": {
"installationId": "1850bc49-c4a4-4f35-ab3c-827b849548b9"
},
"credits": 24
},
{
"consumptionType": "orchestration",
"dimensions": {
"pipelineName": "projects/my-project/pipelines/daily-load.orch.yaml",
"projectId": "d46a46c2-7ac4-41a8-b619-4ca34a7f003f",
"environment": "default"
},
"credits": 16.2
},
{
"consumptionType": "transformation",
"dimensions": {
"pipelineName": "projects/my-project/pipelines/enrich-customers.tran.yaml",
"projectId": "d46a46c2-7ac4-41a8-b619-4ca34a7f003f",
"environment": "default"
},
"credits": 9.6
},
{
"consumptionType": "streaming",
"dimensions": {
"pipelineName": "projects/my-project/pipelines/cdc-stream",
"projectId": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
},
"credits": 9.6
},
{
"consumptionType": "data-loader-batch",
"dimensions": {
"pipelineId": "1732786524"
},
"credits": 50
},
{
"consumptionType": "data-loader-cdc",
"dimensions": {
"pipelineId": "1732786525"
},
"credits": 60
},
{
"consumptionType": "dpc-users",
"dimensions": {
"userEmail": "jane.doe@example.com"
},
"credits": 70
}
]
}
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}Consumption
Get a breakdown of your credit consumption for flat-rated products
Returns a breakdown of your credit consumption for flat-rated products, grouped by calendar day (per UTC) and then by the type of consumption and relevant dimensions. This data refreshes every three hours to reflect recent credit usage.
GET
/
v1
/
consumption
Get a breakdown of your credit consumption for flat-rated products
curl --request GET \
--url https://eu1.api.matillion.com/dpc/v1/consumption \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu1.api.matillion.com/dpc/v1/consumption"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu1.api.matillion.com/dpc/v1/consumption', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://eu1.api.matillion.com/dpc/v1/consumption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://eu1.api.matillion.com/dpc/v1/consumption"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://eu1.api.matillion.com/dpc/v1/consumption")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu1.api.matillion.com/dpc/v1/consumption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"consumedFrom": "2024-01-01T00:00:00.000Z",
"consumedBefore": "2024-01-02T00:00:00.000Z",
"consumption": [
{
"consumptionType": "etl-compute",
"dimensions": {
"installationId": "1850bc49-c4a4-4f35-ab3c-827b849548b9"
},
"credits": 24
},
{
"consumptionType": "orchestration",
"dimensions": {
"pipelineName": "projects/my-project/pipelines/daily-load.orch.yaml",
"projectId": "d46a46c2-7ac4-41a8-b619-4ca34a7f003f",
"environment": "default"
},
"credits": 16.2
},
{
"consumptionType": "transformation",
"dimensions": {
"pipelineName": "projects/my-project/pipelines/enrich-customers.tran.yaml",
"projectId": "d46a46c2-7ac4-41a8-b619-4ca34a7f003f",
"environment": "default"
},
"credits": 9.6
},
{
"consumptionType": "streaming",
"dimensions": {
"pipelineName": "projects/my-project/pipelines/cdc-stream",
"projectId": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
},
"credits": 9.6
},
{
"consumptionType": "data-loader-batch",
"dimensions": {
"pipelineId": "1732786524"
},
"credits": 50
},
{
"consumptionType": "data-loader-cdc",
"dimensions": {
"pipelineId": "1732786525"
},
"credits": 60
},
{
"consumptionType": "dpc-users",
"dimensions": {
"userEmail": "jane.doe@example.com"
},
"credits": 70
}
]
}
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}Authorizations
a valid bearer token
Query Parameters
First calendar date to include in results (inclusive)
Calendar date before which results should be included (exclusive)
Response
Successful
An array of date periods, each containing the consumption for that period
Show child attributes
Show child attributes
Example:
[
{
"consumedFrom": "2024-01-01T00:00:00.000Z",
"consumedBefore": "2024-01-02T00:00:00.000Z",
"consumption": [
{
"consumptionType": "etl-compute",
"dimensions": {
"installationId": "1850bc49-c4a4-4f35-ab3c-827b849548b9"
},
"credits": 24
},
{
"consumptionType": "orchestration",
"dimensions": {
"pipelineName": "projects/my-project/pipelines/daily-load.orch.yaml",
"projectId": "d46a46c2-7ac4-41a8-b619-4ca34a7f003f",
"environment": "default"
},
"credits": 16.2
},
{
"consumptionType": "transformation",
"dimensions": {
"pipelineName": "projects/my-project/pipelines/enrich-customers.tran.yaml",
"projectId": "d46a46c2-7ac4-41a8-b619-4ca34a7f003f",
"environment": "default"
},
"credits": 9.6
},
{
"consumptionType": "streaming",
"dimensions": {
"pipelineName": "projects/my-project/pipelines/cdc-stream",
"projectId": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
},
"credits": 9.6
},
{
"consumptionType": "data-loader-batch",
"dimensions": { "pipelineId": "1732786524" },
"credits": 50
},
{
"consumptionType": "data-loader-cdc",
"dimensions": { "pipelineId": "1732786525" },
"credits": 60
},
{
"consumptionType": "dpc-users",
"dimensions": { "userEmail": "jane.doe@example.com" },
"credits": 70
}
]
}
]
Was this page helpful?
⌘I
