Toolpack:Add Edit Routeset Files RestFul A: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:Add | {{DISPLAYTITLE:Add and Edit Routeset files with RESTFul API}} | ||
You can Add and Edit routeset files in your system with RestFul API using JSON | 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: | 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 | 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: | 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 | 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:
Example: Using the Postman tool, the URL is:
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