It is possible to test the SRP HTTP Framework without having to go through the effort of creating any APIs. This will not guarantee that all possible configuration details have been properly updated, but at this point we just want to make sure that HTTP requests are getting received by the SRP HTTP Framework and a proper response is being sent back.

The quickest way to run a test is to enter your API URL into a browser and submit the request. For instance, if your Home URL is https://api.mysite.com and your API URL is /v1, then enter the following into your browser's address bar:

https://api.mysite.com/v1

This should immediately make contact with the OECGI and then OpenEngine. If you are running the Engine Server in the command line you will see an instance of OpenEngine running on the desktop. Otherwise, if you are running the Engine Server as a service, you will probably not see any OpenEngine activity.

The clearest indicator that the SRP HTTP Framework system is running is based on the response you get. If you enabled authentication in the HTTP Framework Setup form, the response should appear like this:

{
   "URL" : "https://api.mysite.com/v1/",
   "method" : "GET",
   "phrase" : "Unauthorized (RFC 7235)",
   "status" : 401
}

If authentication is disabled, the response should appear like this:

{
"_links": {
"item": [
{
"href": "https://api.mysite.com/v1/contacts",
"title": "contacts"
},
{
"href": "https://api.mysite.com/v1/version",
"title": "version"
}
],
"self": {
"href": "https://api.mysite.com/v1/"
}
}
}

Either of the above responses indicates that the API entry point was reached and processed accordingly. Congratulations! You are now ready to start building your own RESTful web services.

  • No labels