Adapter registration

The API UrlNotify, which is supplied by HTTP-based IMPACT gateway is the first operation that the Adapter must call with IMPACT. When a request is received in IMPACT, the server validates the Adapter and authorizes it.

IMPACT does the following:
  • Records the IP address and the port
  • Uses it for all the future interactions with the Adapter

Following is an example for UrlNotify payload. The URL mentioned in the following payload is of the Adapter.

http://<impact_hostname>:<port>/m2m/device 
{
"urlNotify": {
"url": http://demo.iot.com:9090
"protocol":"HTTP"
}
}
Note:

All REST methods (including urlNotify) to IMPACT from the Adapter must have the following HTTP headers for authentication.

  • x-adaptation_layer_id: This is the adaptationLayerName specified in IMPACT.
  • Authorization: Authorization is the Basic form with the base64 encoded value of the username and the secret concatenated using a colon (:) separator. Secret is the value generated as part of create token request. For example, if the token request returns:
    {
      "msg": "Success", "tokenResponse": {
        "token": "1jylmg8lwa1cy",
        "secret": "iJ6ZIaJNUsILm3WGNr55LDDCV3iQ+RjmOcQbY2IGquY=", 
        "username": "Test1234"
      }
    }
    
    The generated secret key must be used as a password in any REST client.

    Then the encoding is: base64_encoded(“Test1234:iJ6ZIaJNUsILm3WGNr55LDDCV3iQ+RjmOcQbY2IGquY=”), and hence the Authorization field is “Basic VGVzdDEyMzQ6aUo2WklhSk5Vc0lMbTNXR05yNTVMRERDVjNpUStSam1PY1FiWTJJR3F1WT0=”