Services
Query Portax service database.
Services REST API is available at $Portax::WebPath/rest/services
DESCRIPTION
Services REST resource provides simple methods to query and/or update Portax service database.
METHODS
GET
Query service(s).
- service
- Limit query results to service code
EXAMPLE
curl -s --cert-type P12 --cert $CERT:$PASS \ $URL/rest/services?service=disconnect
Response:
{"responseData":[{"rate_down":2000000,"ppp_group":null,"ignore_redirect":[],"max_cpe":4,"family":null,"name":"disconnect","rate_up":100000,"service":"disconnect"}]}
PUT
Create or replace service.
URI
$Portax::WebPath/rest/services/:service
Expects UTF-8 JSON encoded data in the POST body.
FIELDS
- name
- Service name
- rate_down
- Downstream rate
- rate_up
- Upstream rate
- max_cpe
- maximum number of CPE allowed
- family
- Array of family allowed family classes, ie. Wireless, Cable, xTTH, PON, DSL
- ppp_group
- PPP group (DSL services only)
EXAMPLE
curl -s --cert-type P12 --cert $CERT:$PASS -X PUT \ --data @data.json \ $URL/rest/services/S01
data.json:
{ "ignore_redirect": [ "ABUSE" ], "rate_up": 180000000, "rate_down": 180000000, "name": "Service 1", "max_cpe": 1, "family": null, "ppp_group": "" }
PATCH
Update service.
URI
$Portax::WebPath/rest/services/:service?<reprovision>
Expects UTF-8 JSON encoded data in the POST body.
Optional reprovision argument triggers immediate reprovisioning of subscribers of the respective service, eg.:
EXAMPLE
curl -s --cert-type P12 --cert $CERT:$PASS -X PATCH \ --data @data.json \ $URL/rest/services/S01
data.json:
{ "max_cpe": 1, "family": [ "DSL" ], "ppp_group": "cetin", "name": "DSL 3XL", "rate_up": 25000000, "rate_down": 250000000 }
Last modified
4 months ago
Last modified on Jan 5, 2024, 1:38:55 PM
Note:
See TracWiki
for help on using the wiki.