Audit Message Details
The following sections describe the JSON details of each message discussed above.
Audit Request from RouteLink Server
The RouteLink® Server is the only initiator of audit requests. The RouteLink Server initiates an audit for a prefix by loading an audit event onto the client's event queue. The RouteLink Client downloads this event and as a result must start the audit. Only the first audit request will contain an "id" value. The following is an example event that starts the audit:
{ "action" : "audit_request", "prefix" : "800", "id" : <index> }
"800" indicates one of 11 prefixes that can be audited
"id" from above request should be sent in subsequent download request after audit is done.
The RouteLink Server also provides other partial CRNs for the audit, besides "800". The JSON for those messages is the same as the above, where "800" becomes more specific, partial, CRNs as the server traverses the CRN tree if it deems it necessary.
For example:
{ "action" : "audit_request", "prefix" : "866", "id" : <value> }
// "WHERE (crn LIKE '866%')"
{ "action" : "audit_request", "prefix" : "8660", "id" : null }
// "WHERE (crn LIKE '8660%')"
{ "action" : "audit_request", "prefix" : "8661", "id" : null }
// "WHERE (crn LIKE '8661%')"
Audit Responses from RouteLink Client
The RouteLink Client is the only sender of audit reply. It issues a response containing the hash of the partial CRN indicated in the audit request. The API Client sends this message to RouteLink URL endpoint /routelink/v2/audit using an HTTPS POST.
The JSON of an example response to an audit of "800" is like:
{ "action":"audit_reply",
"prefix":"800",
"sha1": "acb2237d0679ca88db6464eac60da96345513964"
}
All CRNs for prefix 800
The JSON of an example response to an audit of "8662561" (thereby processing 8662561000..8662561999) is like:
{ "action":"audit_reply",
"prefix":"8662561",
"sha1": "3de1247d07398078db6487230a0da9634583096c"
}
Audit Completed
The RouteLink Server is the only sender of the success message. The RouteLink Server indicates that it is done with the audit for a prefix with this event:
{ "result" : "success" }
When the RouteLink Client receives this downloaded message, it can assume any corrections were made during the audit by placing new download events on its event queue.