New API vs Old API


Badge
Hi , Can you please let me know the key differences between RESTAPI V2 and RESTAPI V3
Thanking you in advance for yor reply, I Remain.

3 replies

Userlevel 7
Badge +35
Hi @ramakant38

Did you see the http://developer.nutanix.com/ site - this might help answer some of your questions. If yes, consider clicking the 'like' link on this reply to help others. Thanks
Badge +6
Hi @ramakant38 ! 🙂

In addition to the response from @aluciani, I'll make a couple of comments. They could be considered my opinion so please don't treat them as the source of truth ...

  • The v2 APIs in their current state are the first GA implementation of what were previously v0.8 and v1 APIs. Many of the operations in those older APIs have been ported to the v2 APIs, with some exceptions.
  • The v2 APIs are aimed at single-cluster operations whereas the v3 APIs are where you'll find, amongst other things, multi-cluster operations. For example, you'll see the "storage_containers" endpoint in the v2 APIs but it doesn't exist in the v3 APIs. This is quite easily demonstrated by the fact that Prism Central doesn't support v2 APIs at all - hit the REST API Explorer in the current version (5.6) and you'll see v2 isn't even an option there.
  • Many of our new features, e.g. Calm and Microsegmentation, can be automated via the v3 APIs only. They can't be manipulated with the v2 APIs due to their implied multi-cluster nature.
  • The v3 APIs introduce the "Intentful" paradigm. This is quite different from the v2 way of doing things, where you would specify an object type to work on but you'd still pretty much have to tell the cluster what to do. The "Intentful" approach, for example, specifies a "spec" for some of the object types and tells the cluster (or Prism Central, in most cases) what the desired state is. Prism Central then "figures out" the best way to get there. That is probably oversimplifying things somewhat but gives you an idea of what I mean, I hope.
  • The best explanation of "Intentful" APIs would be in the developer docs linked by @aluciani above - see here: https://
In most cases I would suggest using the v3 APIs, unless there's an object type or endpoint you need to work with that is unavailable in the v3 APIs e.g. "storage_containers" as mentioned above.

Hope that helps!

Cheers,
Chris R @ Nutanix
Userlevel 7
Badge +35
Hi @ramakant38

Did you see the reply from @ChrisRNutanix ? if it helps, consider clicking the 'like' and 'best answer' link on the reply - that will help others find answers to similar questions much quicker, Thanks 👍

Reply