Actions

ProSBC:Restful API User: Difference between revisions

No edit summary
mNo edit summary
Line 1: Line 1:
You can create/modify a user in your system with RestFul API using JSON format. The JSON must be in the following format:
You can create or modify a user in your system with the RestFul API using JSON format. The JSON must be in the following format:


<pre>
<pre>
Line 30: Line 30:
ProSBC will create a new User from the name in the JSON file.
ProSBC will create a new User from the name in the JSON file.


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


http://192.168.1.25:12358/users
http://192.168.1.25:12358/users
Line 36: Line 36:
[[Image:RestFul_user_Post_Send.png|800px| ]]
[[Image:RestFul_user_Post_Send.png|800px| ]]


If the new User is created successfully, you will see the following information in the Postman Tool
If the new User is created successfully, the following message is returned in the Postman Tool


[[Image:RestFul_user_Post_Response.png|800px| ]]
[[Image:RestFul_user_Post_Response.png|800px| ]]
Line 46: Line 46:
PUT http://ProSBCIP:12358/users/user_name
PUT http://ProSBCIP:12358/users/user_name


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


http://192.168.1.25:12358/users/support  we change the support account password to 123@Abc!9
http://192.168.1.25:12358/users/support  we change the support account password to 123@Abc!9
Line 52: Line 52:
[[Image:User_Put_Send.png|800px| ]]
[[Image:User_Put_Send.png|800px| ]]


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


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




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

Revision as of 13:02, 1 March 2023

You can create or modify a user in your system with the RestFul API using JSON format. The JSON must be in the following format:

{
    "pass": "Abc_123@",
    "user_group": "Admin",
    "account_enabled": true,
    "email": "support@telcobridges.com",
    "***meta***": {
        "version": "3.1.137",
        "src_path": ""
    },
    "name": "support"
}

Important parameters in the JSON file

Adding a new User

You can add a new User with the POST command:

POST http://ProSBCIP:12358/users

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

Example: We use the Postman tool and the URL is:

http://192.168.1.25:12358/users

If the new User is created successfully, the following message is returned in the Postman Tool

Modifiying a User

You can modify the existing User with the PUT command:

PUT http://ProSBCIP:12358/users/user_name

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

http://192.168.1.25:12358/users/support we change the support account password to 123@Abc!9

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


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