Webconsole - REST APIs

Hi,

I would like to ask whether there is a documentation or examples for using webconsole REST APIs?

I would like to register several UEs using a script that calls into api/subscriber.

I found it in the sources (https://github.com/free5gc/webconsole/blob/f110a389169f7bc62f291fe4aa23b5f5e825ab02/backend/WebUI/routers.go#L162) but having an example would be very helpful.

Thanks in advance,
Avi

  1. Command to get subscriber list
    curl -v -X GET http://192.168.10.1:30500/api/subscriber -H “Token: admin” | jq

  2. command to get perticular subscriber detail
    curl -v -X GET http://192.168.10.1:30500/api/subscriber/imsi-208930000000007/20893 -H “Token: admin” | jq

  3. command to add subscriber
    curl -v -X POST http://192.168.10.1:30500/api/subscriber/imsi-208930000000007/20893 -H “Token: admin” -d @subscriber.json

  4. command to update subscriber
    curl -v -X PUT http://192.168.10.1:30500/api/subscriber/imsi-208930000000007/20893 -H “Token: admin” -d @subscriber.json

  5. command to delete subscriber
    curl -v -X DELETE http://192.168.10.1:30500/api/subscriber/imsi-208930000000007/20893 -H “Token: admin”

  6. command to check pdp active subscriber
    curl -v -X GET http://192.168.10.1:30500/api/registered-ue-context -H “Token: admin” | jq

Hi @weit,

You can use postman for testing APIs,
please refer to the https://developer.ft.com/portal/docs-start-install-postman-and-import-request-collection for more informations.

Tks.

Hi @ianchen0119,

thanks for the reply.
I am looking for Webui REST examples to register couple of UEs from via either curl (bash) or python (e.g. via requests lib).

An example for building such a REST request might help and save time. Otherwise I will look into the sources to figure our the variables and the legal values they should be set with.

Thanks,
Avi