Ruby Fatturazione Elettronica Aruba IT: Monitor Check

Back to Index

Restituisce il valore del metodo check monitor

Documentation: https://fatturazioneelettronica.aruba.it/apidoc/docs.html#_monitorcheck

CURL Command

curl -X POST  https://demows.fatturazioneelettronica.aruba.it/services/invoice/MonitorCheck \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer NLOGDVXLVaF3tzmnVPkTwpkuh7dG0i09uSCcog3u+rE='

Ruby Example

require 'chilkat'

rest = Chilkat::CkRest.new()

#  URL: https://demows.fatturazioneelettronica.aruba.it/services/invoice/MonitorCheck
bTls = true
port = 443
bAutoReconnect = true
success = rest.Connect("demows.fatturazioneelettronica.aruba.it",port,bTls,bAutoReconnect)
if (success != true)
    print "ConnectFailReason: " + rest.get_ConnectFailReason().to_s() + "\n";
    print rest.lastErrorText() + "\n";
    exit
end

rest.AddHeader("Content-Type","application/json")
rest.AddHeader("Authorization","Bearer NLOGDVXLVaF3tzmnVPkTwpkuh7dG0i09uSCcog3u+rE=")
rest.AddHeader("Accept","application/json")

sbResponseBody = Chilkat::CkStringBuilder.new()
success = rest.FullRequestNoBodySb("POST","/services/invoice/MonitorCheck",sbResponseBody)
if (success != true)
    print rest.lastErrorText() + "\n";
    exit
end

respStatusCode = rest.get_ResponseStatusCode()
if (respStatusCode >= 400)
    print "Response Status Code = " + respStatusCode.to_s() + "\n";
    print "Response Header:" + "\n";
    print rest.responseHeader() + "\n";
    print "Response Body:" + "\n";
    print sbResponseBody.getAsString() + "\n";
    exit
end

jsonResponse = Chilkat::CkJsonObject.new()
jsonResponse.LoadSb(sbResponseBody)

#  See the Online Tool for Generating JSON Parse Code

errorCode = jsonResponse.stringOf("errorCode")
errorDescription = jsonResponse.stringOf("errorDescription")
checkValue = jsonResponse.stringOf("checkValue")

Sample JSON Response Body

{
  "errorCode": "",
  "errorDescription": "",
  "checkValue": "Service it.arubapec.fatturapa.uploadservice.UploadService STATUS UP"
}