Actions

Toolpack:Add Edit Routeset Files RestFul A: Difference between revisions

No edit summary
mNo edit summary
 
Line 1: Line 1:
{{DISPLAYTITLE:Add and Edit Routeset files with RestFul API}}
{{DISPLAYTITLE:Add and Edit Routeset files with RESTFul API}}


You can Add and Edit routeset files in your system with RestFul API using JSON format. The JSON must be in the following format:
You can Add and Edit routeset files in your system with RestFul API using JSON, in the following format:
<pre>
<pre>
{
{
Line 24: Line 24:
ProSBC will create a new Routeset file from the name in the JSON file.
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:  
Example: Using the Postman tool, the URL is:  


http://192.168.1.25:12358/configurations/config_2/file_dbs/File_DB/routesets_definitions/
http://192.168.1.25:12358/configurations/config_2/file_dbs/File_DB/routesets_definitions/
Line 30: Line 30:
[[Image:RestFul_routeset_Post_Send.png|800px| ]]
[[Image:RestFul_routeset_Post_Send.png|800px| ]]


If the import is successful, the following message is returned in the Postman Tool
If the import is successful, the following message is returned:


[[Image:RestFul_Routeset_Post_Response.png|800px| ]]
[[Image:RestFul_Routeset_Post_Response.png|800px| ]]
Line 39: Line 39:
PUT http://ProSBCIP:12358/configurations/Configurationname/file_dbs/File_DB/routesets_definitions/routesetfilename%2Ecsv
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
Example: Using the Postman tool, the URL is:
 
http://192.168.1.25:12358/configurations/config_2/file_dbs/File_DB/routesets_definitions/routeset_1%2Ecsv


[[Image:RestFul_Routeset_Put_Send.png|800px| ]]
[[Image:RestFul_Routeset_Put_Send.png|800px| ]]


If the update is successful, the following message is returned in the Postman Tool
If the update is successful, the following message is returned:


[[Image:RestFul_Routeset_Put_Response.png|800px| ]]
[[Image:RestFul_Routeset_Put_Response.png|800px| ]]

Latest revision as of 11:40, 3 March 2023


You can Add and Edit routeset files in your system with RestFul API using JSON, 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: Using the Postman tool, the URL is:

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

If the import is successful, the following message is returned:

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: Using the Postman tool, 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, the following message is returned:


Learn about how to use RestFul API and Postman Tool from the following link Northbound_interface:RESTful