Milestone XProtect REST API
www.milestonesys.com · Security
REST API for Milestone XProtect VMS — retrieve cameras, live and recorded video, bookmarks, alarms, and events. Used by thousands of integrators globally. On-premise or cloud deployment.
Authentication
Basic Auth
Windows Basic authentication or token-based auth depending on XProtect version. Requires XProtect license.
Sample Requests
GET
List cameras
List all cameras in the XProtect VMS.
http://YOUR_MILESTONE_SERVER/api/rest/v1/cameras
Hover any highlighted part to learn what it does
Headers — extra info sent with the request
| Accept | application/json |
| Authorization | Basic BASE64_CREDENTIALS |
curl -X GET "http://YOUR_MILESTONE_SERVER/api/rest/v1/cameras" \ -H "Accept: application/json" \ -H "Authorization: Basic YOUR_BASE64_CREDENTIALS"
import requests
headers = {
"Accept": "application/json",
"Authorization": "Basic YOUR_BASE64_CREDENTIALS"
}
response = requests.get(
"http://YOUR_MILESTONE_SERVER/api/rest/v1/cameras",
headers=headers,
)
print(response.json())const url = 'http://YOUR_MILESTONE_SERVER/api/rest/v1/cameras';
const response = await fetch(url, {
headers: {
'Accept': 'application/json',
'Authorization': 'Basic YOUR_BASE64_CREDENTIALS'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "http://YOUR_MILESTONE_SERVER/api/rest/v1/cameras"
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("Accept", "application/json")
req.Header.Set("Authorization", "Basic YOUR_BASE64_CREDENTIALS")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("http://YOUR_MILESTONE_SERVER/api/rest/v1/cameras")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["Accept"] = "application/json"
req["Authorization"] = "Basic YOUR_BASE64_CREDENTIALS"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "http://YOUR_MILESTONE_SERVER/api/rest/v1/cameras";
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"Accept: application/json",
"Authorization: Basic YOUR_BASE64_CREDENTIALS"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- Requires Milestone XProtect license — see milestonesys.com
- API runs on your XProtect server (on-premise or cloud)
- Replace YOUR_MILESTONE_SERVER with your server address
- Auth: Base64-encode username:password for Basic auth
- Full MIP REST API docs at doc.milestonesys.com/MIPrestAPI/