Java North
Java North

Reputation: 63

Azure Management API via SPA (and diff. API Management)?

I want to call this url:

https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories?api-version=2016-06-01

In order to do so:

  1. Do I need to set up an API through API Management in the portal? Or can I call it directly?

  2. Can it be called directly from a Single Page (Web) App? Or will it have CORS issues?

  3. Do I need to register the web domain/app in order to do so?

Upvotes: 0

Views: 85

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136196

The URL you are trying to call is part of Azure REST Management API. There are certain things that you would need to do before you can call these APIs. The steps are very well documented here: https://learn.microsoft.com/en-us/rest/api/azure/.

To answer your specific questions:

Do I need to set up an API through API Management in the portal? Or can I call it directly?

You can call these APIs directly. No need to set up API management to do so.

Can it be called directly from a Single Page (Web) App? Or will it have CORS issues?

You should be able to call these APIs directly from a SPA. You should not encounter CORS issues.

Do I need to register the web domain/app in order to do so?

No, as such there is not need to do so unless you are planning on calling these APIs from a web application. You can very well call these APIs from a console application if you like.

Upvotes: 0

Related Questions