Skip to main content
GET
/
operator
/
{did}
/
machines
GET /operator/{did}/machines
curl --request GET \
  --url https://mcr.peaq.xyz/operator/{did}/machines

Documentation Index

Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

GET /operator/{did}/machines
Returns a paginated list of machines registered under an operator DID, with a full MCR score for each machine. The MCR score is computed from the machine’s full event history (not bond-only). Machines that are not registered in the IdentityRegistry contract are silently excluded. The server reads the operator’s machines DID attribute, truncates the list to the first 100 entries as a defensive bound, then paginates over that window. Operators with more than 100 registered machines surface only the first 100 here. Query the IdentityRegistry contract directly to enumerate the full set.

Path parameters

did
string
required
Operator DID (did:peaq:0x...) or raw EVM address (0x...)

Query parameters

offset
integer
default:"0"
Number of machines to skip before the returned page. Must be >= 0.
limit
integer
default:"20"
Maximum number of machines to return per page. Range 1-20.

Response

200 OK
FieldTypeDescription
operator_didstringThe operator DID as supplied in the request path
machinesarrayList of machines registered to this operator (for the current page)
machines[].didstringMachine DID derived from the machine wallet address (did:peaq:<machine_wallet>)
machines[].machine_idintegerOn-chain machine ID
machines[].mcr_scoreintegerMCR score 0-100
machines[].mcrstringLetter rating: AAA, AA, A, BBB, BB, B, NR, or Provisioned
machines[].negative_flagbooleantrue when the AdminFlags contract has a negative-flag timestamp set for this machine. Stays true regardless of whether the 180-day MCR scoring penalty is still active.
paginationobjectPagination metadata
pagination.offsetintegerThe offset used for this page
pagination.limitintegerThe limit used for this page
pagination.totalintegerNumber of valid machine IDs in the operator’s machines DID attribute, after the 100-entry cap and integer validation but before registration filtering. Page slices may be smaller than limit because unregistered machines are dropped silently.
An operator with no machines returns 200 with an empty machines array and pagination.total of 0.

Error responses

StatusdetailCondition
400"Empty DID"Path parameter resolves to an empty string
400"Invalid Ethereum address format"DID or address does not match the expected hex format
422(FastAPI validation error)offset or limit fails validation constraints
503"Service not initialised"Server started without contract addresses
503"Chain unavailable"Any chain or DID call failed

Example

curl "${PEAQOS_MCR_API_URL}/operator/did:peaq:0xoperator0000000000000000000000000000001/machines?offset=0&limit=10"
Response
{
  "operator_did": "did:peaq:0xoperator0000000000000000000000000000001",
  "machines": [
    {
      "did": "did:peaq:0xabc1230000000000000000000000000000000001",
      "machine_id": 1,
      "mcr_score": 45,
      "mcr": "BB",
      "negative_flag": false
    },
    {
      "did": "did:peaq:0xdef4560000000000000000000000000000000002",
      "machine_id": 2,
      "mcr_score": 0,
      "mcr": "NR",
      "negative_flag": false
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 10,
    "total": 2
  }
}
  • GET /mcr/ returns detailed MCR data for a single machine, including revenue trend and summary.
  • GET /machine/ returns the full machine profile with data visibility-dependent fields.