Search code examples
jsonhttpiismeraki-api

IIS interactions with API


I am developing an IIS web server to act as a receiver for Meraki's API scanner. Their API sends out .json periodically with information pertaining to the wireless clients connected to each Meraki device.

I'm having problems understanding the process of correctly reading these POSTs from Meraki and manipulating/accessing them in general on the server to be displayed on a web page.

I am very new to server-side programming (and programming in general) so apologies if this is a very vague/unhelpful description of my problem.

Things I have looked at so far -

  • Have ensured both client and server are validated (based off server logs I can see data being sent (in varying byte sizes with HTTP 200 status code)
  • Have added MIME Type for .json (application/json)
  • Have enabled Request Filtering for .json files
  • Have added mapping for POST requests (wasn't configured beforehand)
  • This is all being ran on a Windows 2012 R2 server with IIS 8.5

Do I need to be telling the server what to do inside the web.config file with all this incoming data?

More than happy to share as much information as possible to anyone that is willing to help.


Solution

  • In my opinion, the api couldn't directly send the json file to the server. You should make sure which way the api send the json data to the server.By using FTP or http.

    If the api used the ftp to send the json file to server, there is no need to set the mime type in the server, you just neeed to make sure the API has the enough permission to write the file into your server disk.

    If the api use http to send the json to the server, it will not send the json file direclty. It will send it in the request body. That also no need to set the json MIME type in the server.

    All the setting is based on how api send the json to the server. So you should connect to the api provider to ask for more details information.