4c74356b41
4c74356b41

Reputation: 72191

Are there rest calls for these Api Management actions?

Say I want to automate API Management, I would want to

  1. Create Api (https://learn.microsoft.com/en-us/rest/api/apimanagement/apis#Apis_CreateOrUpdate)
  2. Create certificate (https://learn.microsoft.com/en-us/rest/api/apimanagement/certificates#Certificates_CreateOrUpdate)
  3. Tie certificate to API (¿?)
  4. Create API Policy (¿?)

I've went through all the calls one by one, and wasn't able to identify anything meaningful.

edit: or a confirmation that this is not yet possible with the API.
edit: looking at the swagger definition of ApiManagement, I don't think its there?
edit: exported configuration to Git, doesn't look like it contains the cert, so this also wouldn't help?

Upvotes: 1

Views: 133

Answers (1)

Samir
Samir

Reputation: 679

The client Certificate is not represented in the model of the ApiContract. When you want to tie a Certificate to an API, we create a policy authentication certificate policy in the API Scope.

<policies>
<inbound>
    <base />
    <authentication-certificate thumbprint="***19B22E********5E2E**820" />
</inbound>
<backend>
    <base />
</backend>
<outbound>
    <base />
</outbound>
<on-error>
    <base />
</on-error>

You can create an API Policy using https://learn.microsoft.com/en-us/rest/api/apimanagement/apimanagementrest/azure-api-management-rest-api-api-entity#SetAPIPolicy

Upvotes: 2

Related Questions