Actions

Add/Edit Routeset files with RestFul API

Revision as of 04:55, 5 January 2023 by Serdar Civici (talk | contribs) (Created page with "{{DISPLAYTITLE:Add/Edit Routeset files with RestFul API}} You can Add/Edit routeset files in your system with RestFul API using JSON format. The JSON must be in the following...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


You can Add/Edit routeset files in your system with RestFul API using JSON format. The JSON must be in the following format:

{
    "***meta***": {
        "version": "3.1.135",
        "src_path": ""
    },
    "name": "routeset_1.csv",
    "content": "routeset_name,priority,weight\r\nNAP_1,3,100\r\nNAP_2,4,100"
}
  • name: routeset file name
  • \r\n: new line. Each routesets you entered must start with the new line.

Adding a new Routeset File

You can add a new Routeset file with the POST command:

POST http://ProSBCIP:12358/configurations/Configurationname/file_dbs/File_DB/routesets_definitions/

ProSBC will create a new Routeset file from the name in the JSON file.

Example: We use the Postman tool in this example and the URL is:

http://192.168.1.25:12358/configurations/config_2/file_dbs/File_DB/routesets_definitions/

If the import is successful you will see the following information in the Postman Tool

Updating a Routeset File

You can update the existing Routeset file with the PUT command:

PUT http://ProSBCIP:12358/configurations/Configurationname/file_dbs/File_DB/routesets_definitions/routesetfilename%2Ecsv

Example: We use the Postman tool in this example and the URL is http://192.168.1.25:12358/configurations/config_2/file_dbs/File_DB/routesets_definitions/routeset_1%2Ecsv

If the update is successful you will see the following information in the Postman Tool


You can get more information about how to use RestFul API and Postman Tool from the following link Northbound_interface:RESTful