cURL
curl --request GET \
--url https://api.mudstack.com/accounts/history \
--header 'Authorization: Bearer <token>' \
--header 'x-account-id: <x-account-id>'import requests
url = "https://api.mudstack.com/accounts/history"
headers = {
"x-account-id": "<x-account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-account-id': '<x-account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.mudstack.com/accounts/history', 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.mudstack.com/accounts/history",
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>",
"x-account-id: <x-account-id>"
],
]);
$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://api.mudstack.com/accounts/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-account-id", "<x-account-id>")
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://api.mudstack.com/accounts/history")
.header("x-account-id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mudstack.com/accounts/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-account-id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"account_id": "<string>",
"user_id": "<string>",
"type": "<string>",
"record_id": "<string>",
"data": {}
}
]History
Get history
Retrieve the history of the account.
GET
/
accounts
/
history
cURL
curl --request GET \
--url https://api.mudstack.com/accounts/history \
--header 'Authorization: Bearer <token>' \
--header 'x-account-id: <x-account-id>'import requests
url = "https://api.mudstack.com/accounts/history"
headers = {
"x-account-id": "<x-account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-account-id': '<x-account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.mudstack.com/accounts/history', 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.mudstack.com/accounts/history",
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>",
"x-account-id: <x-account-id>"
],
]);
$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://api.mudstack.com/accounts/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-account-id", "<x-account-id>")
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://api.mudstack.com/accounts/history")
.header("x-account-id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mudstack.com/accounts/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-account-id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"account_id": "<string>",
"user_id": "<string>",
"type": "<string>",
"record_id": "<string>",
"data": {}
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Response
Successfully retrieved account history
Unique identifier for the account history record.
Identifier of the associated account.
Identifier of the user associated with the account history.
Type of the account history record.
Identifier of the related record.
Additional data related to the account history.
Was this page helpful?
⌘I