POST api/Monitor
Returns an object indicating whether or not the query was successful, and a collection of objects that provide the status of individual sites.
Request Information
URI Parameters
None.
Body Parameters
SiteStatusRequestName | Description | Type | Additional information |
---|---|---|---|
URL |
The URL provided to act as a filter and return the appropriate sites as results. |
string |
None. |
RequestTokens |
Tokens acquired from performing a GET request on /api/Monitor. These should never be altered by the client, and are used to determine whether the client request is valid. |
KeyHashPair |
None. |
Request Formats
application/json, text/json
Sample:
{ "URL": "https://med.ucf.edu/example/url/for/filtering/results", "RequestTokens": { // This object is retrieved via a GET request to api/Monitor. "Key": "QEA=", "Hash": "QEA=" } } Example implementation with JavaScript: var tokenRequest = new XMLHttpRequest(), statusRequest = new XMLHttpRequest(); statusRequest.onreadystatechange = function() { if(statusRequest.readyState == XMLHttpRequest.DONE){ if(statusRequest.status == 200){ // The call was successful. Parse the response as JSON. var siteStatus = JSON.parse(statusRequest.responseText); // Your code here. } else { // The call wasn't successful for some reason. Check statusRequest.status to see what it returned. Your error handling here. } } } tokenRequest.onreadystatechange = function(){ if(tokenRequest.readyState == XMLHttpRequest.DONE){ if(tokenRequest.status == 200){ // The call to get tokens was successful. Parse the response as JSON. var requestTokens = JSON.parse(tokenRequest.responseText); // Now we query site status using those tokens statusRequest.open("Post", "https://services.med.ucf.edu/api/Monitor"); statusRequest.setRequestHeader("Content-type", "application/json"); statusRequest.send(JSON.stringify({ URL: "https://med.ucf.edu/example/url/for/filtering/results", RequestTokens: requestTokens })); } else { // The call wasn't successful for some reason. Check tokenRequest.status to see what it returned. Your error handling here. } } }; tokenRequest.open("Get", "https://services.med.ucf.edu/api/Monitor"); tokenRequest.setRequestHeader("Content-type", "application/json"); tokenRequest.send(); Example implementation with jQuery: $.ajax({ type: "Get", url: "https://services.med.ucf.edu/api/Monitor", contentType: "application/json; charset=utf-8", dataType: "json", success: function(requestTokens){ $.ajax({ type: "Post", url: "https://services.med.ucf.edu/api/Monitor", contentType: "application/json; charset=utf-8", dataType: "json", data: JSON.stringify({ URL: "https://med.ucf.edu/example/url/for/filtering/results", RequestTokens: requestTokens }), success: function(result){ // Your code here }, error: function(jqXHR, textStatus, errorThrown){ // Your error handling here } }); }, error: function(jqXHR, textStatus, errorThrown){ // Your error handling here } });
Response Information
Resource Description
ServiceMonitorResultName | Description | Type | Additional information |
---|---|---|---|
Success |
Indicates whether or not the query completed successfully. |
boolean |
None. |
LastRefreshed |
The last time the status of sites was refreshed. |
date |
None. |
Results |
A collection of objects representing individual sites. |
Collection of ServiceResult |
None. |
Response Formats
application/json, text/json
Sample:
{ "Success": true, "LastRefreshed": "2025-04-30T07:29:19.164764-04:00", "Results": [ { "UID": "ccb3c864-a08c-4d1c-b727-6051aa647d27", "Title": "UCF College of Medicine", "URL": "http://www.med.ucf.edu/", "Status": "Online", "OfflineDependentEndpoints": null } ] }