Azure / api-management-developer-portal

Developer portal provided by the Azure API Management service.
MIT License
479 stars 307 forks source link

Workspace Products/APIs are not published to Developer Portal #2277

Closed melanki closed 3 months ago

melanki commented 10 months ago

Bug description

When creating Product with API in Azure API Management workspace I expect it to show up in Azure API management Developer Portal.

Reproduction steps

  1. Create Workspace
  2. Create API in Workspace
  3. Add GET operation to created API
  4. Set API and operation to subscription not required
  5. Create Product with API created in step 3, and set subscription to not required.
  6. Ensure that workspace / product / api is published
  7. Go to developer Portal => Products
  8. Workspace Products with API does not show up.

Expected behavior

Workspace Products with API does shows up under Products page

Is your portal managed or self-hosted?

Managed

Additional context

When I manually subscribe my user from Azure Portal, I get an email to workspace product in Developer Portal without any content.

When adding Workspace level API to Service Product, I can see API under Products, but going to api-details shows "The specified API does not exist"

marius-terciu commented 10 months ago

TL;DR : This will not work because the API Management REST API version for GA is 2022-08-01

"Workspaces are supported in API Management REST API version 2022-09-01-preview or later." This is written in the notes section of the Workspaces page

Long version: I know this is till in Preview, but I can confirm this behavior.

I've tried with two different API-M instances:

In both cases, I get the same behavior.

Steps to reproduce this issue:

  1. Create a new Workspace
  2. Create a new blank API (I've called it "API-01")
  3. Add at least one Operation to that API
  4. Create a new Product (I've called it "Product 01"), and assign the API created before to this Product.
  5. In the Access control menu, click Add Service Group, and I've checked the developers group, Add
  6. Publish this Product (I've checked Published, Requires Subscription, Requires Approval)

When visiting the Developer Portal, the Product is not displayed in the Product page

Additionally

Later edit: I've tried also to use the REST API to retrieve all products, and I still got only two Products (Started and Unlimited), so at a first glance, it seem that this is not an issue with the Developer Portal. GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products?api-version=2022-08-01

melanki commented 10 months ago

@marius-terciu I expect it to work based on the latest release note here

Developer portal now surfaces APIs and products managed in workspaces. This change applies only to managed portals.

marius-terciu commented 10 months ago

Okay, got it. I've missed that part where it says "only to managed portals" (my bad)

Anyways, I can confirm it is not working for me either in the APIM instance with the managed portal.

Just as a side comment: I was looking through the REST API docs, and I saw there is a specific operation that will return only the Products from a specific Workspace

GET https://{management.azure.com}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products?api-version=2023-03-01-preview

I've tried it and it brings back the my Product from that specific Workspace. I did not find an operation that will list all Products, regardless if they are or not in a Workspace.

UppyAU commented 9 months ago

Also not working for me here either but I suspect its due to the deployed version of APIM. Is there any way to trigger an update? This is all that is missing for us :(


{
    "Status": 200,
    "PortalVersion": "20230925100914",
    "CodeVersion": "20230524115147",
    "Version": "0.38.16110.0",
    "RoleNumber": "gwhost_0"
}
JelleBroekhuijsen commented 9 months ago

I am also experiencing this issue; none of the products or api's published in a workspace show up in the (managed) developer portal.

mrcarlosdev commented 3 months ago

This issue is related to managed developer portal. We advise you to create a Azure support request to get assistance on this issue. Please refer to the below link to create a new Azure support request, Please select Problem Type = "Developer Portal" in the request to route it appropriately.

https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request