Make REST API settings

Enable the REST API, set an IP range and the server port, and test your API.

  1. Go to REST API and enable the Rest API function.
  2. Go to Permitted IP addresses and specify a start address and an end address if you want to restrict access to the REST API to a certain IP range.

    If either the start address or the end address is set to 0.0.0.0 or to 255.255.255.255, requests from all IP addresses will be accepted.

  3. To change the default HTTP port (2000) used to connect to the REST API, go to General settings > Server port and enter a number.

    You can only use port numbers greater than 1024 with the exception of 3000, 8000, 8080, 8081, and the ports you have opened on the Port page.

  4. Enable Use encryption if you want to encrypt the client/server communication (recommended).

    If encryption is used, external REST API calls must ignore CA verification because the certificate is self-signed. For development purposes, we recommend to disable encryption.

    With Use CORS (Cross-Origin Resource Sharing), Web pages outside of FP-I4C are allowed to access the REST API. This option should only be used for development purposes.

  5. Save your configuration.

    When you have changed any settings, a Save button appears in the upper right corner of the screen. You can make changes on multiple pages and then save your settings.

    To reset all settings on the current page to the default configuration, select the Reset button at the bottom of the page.

  6. After you have saved your settings, click on the link provided under API test to test your settings.

    If the API is running properly, a message with the following JSON string appears: {"err":false,"msg":"Test successful"}.

    If this message is not displayed, there may be a problem with your port settings. Make sure the API port you selected has not been set on the Port page.

    To specify access restrictions for certain memory areas, go to the Port page.

Related topics:

Modified on: 2024-10-02Feedback on this pagePanasonic hotline