Download Commitments Obligations data in CSV format - m3ter Documentation

Download Commitments Obligations data in CSV format

cURL

curl --request POST \ --url https://api.m3ter.com/organizations/{orgId}/dataexplorer/commitments/obligations/download/csv \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "startDate": "2023-11-07T05:31:56Z", "endDate": "2023-11-07T05:31:56Z", "dimensions": [ \ { \ "name": "", \ "filter": [ \ "" \ ], \ "attributes": [ \ "" \ ] \ } \ ],\ "limit": 1000 }'

Python Example

import requests

url = "https://api.m3ter.com/organizations/{orgId}/dataexplorer/commitments/obligations/download/csv"

payload = { "startDate": "2023-11-07T05:31:56Z", "endDate": "2023-11-07T05:31:56Z", "dimensions": [
{
"name": "",
"filter": [""],
"attributes": [""]
}
], "limit": 1000 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" }

response = requests.post(url, json=payload, headers=headers)

print(response.text)

JavaScript Example

const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ startDate: '2023-11-07T05:31:56Z', endDate: '2023-11-07T05:31:56Z', dimensions: [{name: '', filter: [''], attributes: ['']}], limit: 1000 }) };

fetch('https://api.m3ter.com/organizations/{orgId}/dataexplorer/commitments/obligations/download/csv', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));

PHP Example

"https://api.m3ter.com/organizations/{orgId}/dataexplorer/commitments/obligations/download/csv",\ 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' => '',\ 'filter' => [\ ''\ ],\ 'attributes' => [\ ''\ ]\ ]\ ],\ 'limit' => 1000\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "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 Example

{ "downloadUrl": "" }

Error Messages

{ "message": "" }

Authorization

Authorization string header required

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