Forum Discussion

fpt_371479's avatar
fpt_371479
Icon for Nimbostratus rankNimbostratus
Sep 06, 2018

Could F5 return a JSON string with a specific http status code (503 for example) if an API is down?

If someone tries to reach out our UIs via a VIP and all instances are down, we display a maintenance page (html). We are looking to do something equivalent if our API is down, meaning that we want to return to the calling system a specific JSON string and http status code to let them know that the system is down. Is that possible? If so, would someone please give me some info on how to implement that? High level is fine.

 

1 Reply

  • This should be possible. You can use the HTTP::respond command with a specific response code of your choice along with custom content - no reason that can't be a JSON string, along with appropriate headers.