Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Add API Endpoints to Plugin #68

Closed
ghost opened this issue Apr 12, 2022 · 5 comments
Closed

Add API Endpoints to Plugin #68

ghost opened this issue Apr 12, 2022 · 5 comments

Comments

@ghost
Copy link

ghost commented Apr 12, 2022

Environment

  • Nautobot version: 1.2.11
  • aristacv-sync version: 1.0.5

Proposed Functionality

At the moment there are no API endpoints for this plugin. This means that all sync jobs have to be executed within nautobot. This also prevents the user from executing a sync operation outside of nautobot. I think it would be beneficial to add API endpoints to run sync jobs in either direction.

Use Case

When working with CVP, there can be a workflow to add or remove devices. Once this is complete, a workflow could then be initiated to call the sync from cloudvision to nautbot job. This would then keep nautobot and CVP in sync in a fairly close window. Allowing this option in the form of an endpoint would allow the user to initiate this from whatever workflow currently exists in their environment.

@chadell
Copy link

chadell commented Jun 28, 2022

Hi @juliop-arista , Nautobot Jobs can be triggered via API.
isn't this what you are requesting?

@JulioPDX
Copy link

JulioPDX commented Jul 5, 2022

Hi @juliop-arista , Nautobot Jobs can be triggered via API. isn't this what you are requesting?

Hi @chadell, that is correct. I don't believe that is possible with this plugin at the moment.

@jvanderaa
Copy link
Contributor

@JulioPDX - this is where the Jobs would be launched from the API - https://nautobot.readthedocs.io/en/stable/additional-features/jobs/#via-the-api.

I'm still working on getting the exact URL for the sync.

@jvanderaa
Copy link
Contributor

The api endpoint would be: <nautobot_server>/api/extras/jobs/plugins/nautobot_ssot_aristacv.jobs/CloudVisionDataSource/run/ if running the sync from CloudVision to Nautobot. Basically insert the /api/ stanza in the front of the URL and send a POST.

@JulioPDX
Copy link

JulioPDX commented Jul 5, 2022

Thank you @jvanderaa !

@ghost ghost closed this as completed Jul 5, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants