[Spce-user] [mr10.x] New NGCP REST API "expand" functionality

Alex Lutay alutay at sipwise.com
Mon Apr 25 04:30:37 EDT 2022

Dear Community!

The new LTS release mr10.5 is on the way.
It is the first announcement of some new and nice features there.

The REST API interface got significant improvements there,
one of them we called "API expand" functionality.
Clients can request expanded data from the server in one request
effectively saving requests count and significantly speeding up the 
processing time.

The simplest example here will be the page "Domains" on the
new Admin UI interface. There you will see the list of domains on NGCP 
displayed together with their Resellers' names.

Obliviously data in a database is normalized,
Resellers and Domains are stored in separate DB tables.
Therefore REST API returns reseller_id only on /api/domains request.
At this stage, clients have to request reseller's names using 
/api/resellers several times using reseller_id from the previous reply.

All the above is way inefficient. The solution here to request 
/api/domains with expanded reseller information (see the attached picture).

An example of such a request will be:
 > https://X.X.X.X:1443/api/domains/?expand=reseller_id&...

The server will perform the necessary merge of data and will provide all 
the necessary details in one reply.

We believe it will improve your NGCP integration efforts using our API!
Enjoy NGCP!

P.S. the"expand" functionality is available to a selected list of 
methods starting mr10.0!
Read more in the commit message:
> https://github.com/sipwise/ngcp-panel/commit/2b144caf2cee031a4fbb45b8906eb1a4b5b6d2fe

Alex Lutay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NGCP_REST_API_expand_example.png
Type: image/png
Size: 300446 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20220425/a12ade6e/attachment-0001.png>

More information about the Spce-user mailing list