CPR API
/cpr api Request
/cpr is an optional API.
The following is an example REST/JSON "cpr" request:
GET /routelink/v2/cpr?sha1=93201524444RSRRKR1 HTTPS/1.1
Authorization: Bearer c0d97b52-35d9-32c2-a37d-6126a186a844
The wget tool can issue a "cpr" request like this example:
wget --header="Accept-Encoding: gzip" --header="Authorization: Bearer c0d97b52-35d9-32c2-a37d-6126a186a844" https://api-routelink.somos.com/routelink/v2/cpr?sha1=93201524444RSRRKR1
sha1 is required field.
/cpr api Response
The response to a "cpr" request contains the JSON "cpr"and sha.
The following is an example JSON "cpr" response from RouteLink.
{
"id":null,
"sha1":"81a642c51a313314f828a0a8944e3c20be914f66",
"cpr":"{\"node\":{\"type\":\"npa\",\"branches\": [{\"values\": [\"204\",\"226\",\"236\",\"249\",\"250\",\"289\",\"306\",\"343\",\"365\",\"367\",\"403\",\"416\",\"418\",\"431\",\"437\",\"438\",\"450\",\"506\",\"514\",\"519\",\"548\",\"579\",\"581\",\"587\",\"604\",\"613\",\"639\",\"647\",\"705\",\"709\",\"778\",\"780\",\"782\",\"807\",\"819\",\"825\",\"867\",\"873\",\"902\",\"905\"],\"node\":{\"type\":\"action\",\"values\":[{\"action_type\": \"set_carrier\",\"action_value\": \"0247\"},{\"action_type\": \"set_network_management_class\",\"action_value\": \"14\"}]}},{\"values\": [\"others\"],\"node\":{\"type\":\"action\",\"values\":[{\"action_type\": \"set_carrier\",\"action_value\": \"0222\"},{\"action_type\": \"set_network_management_class\",\"action_value\": \"14\"}]}}]}}"
}