Download Commitments Obligations data as JSON. - m3ter Documentation
Download Commitments Obligations data as JSON.
cURL
curl --request POST \
--url https://api.m3ter.com/organizations/{orgId}/dataexplorer/commitments/obligations/download/json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"dimensions": [\
{\
"name": "<string>",\
"filter": [\
"<string>"\
],\
"attributes": [\
"<string>"\
]\
}\
],
"limit": 1000
}
'
import requests
url = "https://api.m3ter.com/organizations/{orgId}/dataexplorer/commitments/obligations/download/json"
payload = {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"dimensions": [\
{\
"name": "<string>",\
"filter": ["<string>"],\
"attributes": ["<string>"]\
}\
],
"limit": 1000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
dimensions: [{name: '<string>', filter: ['<string>'], attributes: ['<string>']}],
limit: 1000
})
};
fetch('https://api.m3ter.com/organizations/{orgId}/dataexplorer/commitments/obligations/download/json', 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://api.m3ter.com/organizations/{orgId}/dataexplorer/commitments/obligations/download/json",\
CURLOPT_RETURNTRANSFER => true,\
CURLOPT_ENCODING => "",\
CURLOPT_MAXREDIRS => 10,\
CURLOPT_TIMEOUT => 30,\
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
CURLOPT_CUSTOMREQUEST => "POST",\
CURLOPT_POSTFIELDS => json_encode([\
'startDate' => '2023-11-07T05:31:56Z',\
'endDate' => '2023-11-07T05:31:56Z',\
'dimensions' => [\
[\
'name' => '<string>',\
'filter' => [\
'<string>'\
],\
'attributes' => [\
'<string>'\
]\
]\
],\
'limit' => 1000\
]),\
CURLOPT_HTTPHEADER => [\
"Authorization: Bearer <token>",\
"Content-Type: application/json"\
],\
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
Response Format
200
{
"downloadUrl": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}
Authorizations
Authorization
- Type: string
- Location: header
- Required: yes
m3ter supports machine to machine authentication using the clientCredentials OAuth2 flow.
Path Parameters
- orgId: string (required) UUID of the organization
Body
application/json
- startDate: string
(required) ISO 8601 formatted start date for the obligations. - endDate: string
(required) ISO 8601 formatted end date for the obligations. - dimensions: object[] Dimensions to filter by (Maximum array length:
100). - limit: integer
Limit the number of data points returned (Required range: 1 <= x <= 2000).
Response
- 200
- Type: application/json
- Description: Contains a link to download the file.