SONiC Utilities Commands Vs API - Is quick reference available ?

134 views
Skip to first unread message

HLSonic

unread,
Feb 23, 2022, 8:17:48 PM2/23/22
to sonicproject
Hi,

I have got the SONiC commands for the utilities from the below link.

And also I have got the source image and download for the same from the below link

For my project, we need to find the API equivalent for the above mentioned commands. We are currently browsing through the code and finding the APIs for each of these commands. 

My query is to know if there is any readily available link for the API list for each of those commands which can be reused thereby saving our search time. If its not readily available, any pointers to quickly find the related APIs will also be helpful.

Thanks in advance.

Tom Ammon

unread,
Feb 23, 2022, 8:59:00 PM2/23/22
to HLSonic, sonicproject
There is an openapi/swagger interface on the switch at https://<switch ip or name>/ui/ which will give you a list of all the API endpoints available and let you experiment with them.

Tom

--
You received this message because you are subscribed to the Google Groups "sonicproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonicproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonicproject/b93a6d13-db8f-4d4e-88f3-8e0485879ff3n%40googlegroups.com.


--
-----------------------------------------------------------------------------
Tom Ammon
M: (737) 400-9042
thoma...@gmail.com
-----------------------------------------------------------------------------

Liat Grozovik

unread,
Feb 24, 2022, 6:41:30 PM2/24/22
to HLSonic, sonicproject
Many of the commands has been introduced and documented via the relevant HLD.
HLDs are available in SONiC Azure under the doc directory.

You won't find a document which translate each CLI command in the reference guide to source code. This can be done only be reverse engineering and reading the available HLD in case it is informative enough.

BTW some of the commands are from early SONiC and has no documentation but most of the CLI backend can be found under sonic-utilities repo.

Hope it helps.
Liat

--
You received this message because you are subscribed to the Google Groups "sonicproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonicproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonicproject/b93a6d13-db8f-4d4e-88f3-8e0485879ff3n%40googlegroups.com.
--
 
בברכת יום טוב,
ליאת גרוזוביק

Hema Latha

unread,
Mar 1, 2022, 10:07:56 PM3/1/22
to sonicproject
Thank you Tom and Liat for your prompt response and for your pointers. I will try the steps that you have mentioned. 
Sorry for the late response.

Reply all
Reply to author
Forward
0 new messages