1

I was wondering if there is a way to monitor Costs and billing through products for API-Management (APIM)?

The thing is now I have two APIM's - one used for test environments and another for production environment.

I know this is a bit unnecessary, but as I have two subscriptions one for test and one for prod, I thought at the beginning this was the logical way to go.

The thing is now developers have to register to 2 developer portals to be able to use both test and production and this is not optimal for me.

I still want to be able to get the billing statistics or test environments and production environments so that's why I'm wondering if there is a way to do this with products in APIM?

SiHa
  • 7,830
  • 13
  • 34
  • 43
H4p7ic
  • 1,669
  • 2
  • 32
  • 61

1 Answers1

1

You need to tag your components/resources in Azure. Create a tag, say "Environment", and tag your one APIM as "Dev" and the other as "test". You can then report on your billing by tag.

A quick Google led me to a blog on some best practices

Microsoft's documentation on how tagging applies to billing can be found here

Murray Foxcroft
  • 12,785
  • 7
  • 58
  • 86
  • 1
    Thank you very much, i guess i didn't know what exactly I as looking for. – H4p7ic Mar 06 '18 at 11:29
  • Haha - yes, you just needed the seed planted :) – Murray Foxcroft Mar 06 '18 at 11:35
  • Hi @MurrayFoxcroft, I've been looking into this a bit more and i'm starting to think that i maybe formed my question in a wring way. The thing is that the method you are talking about still refers to having two separate APIM's, I just want to have one. and split the billing between the different API's within that one. When asked The azure support they say its not possible to get the billing for the specific API's inside the APIM resource. Only for the whole resource... So i'm thinking is there maybe a way to do it the API method? To get more detailed information. – H4p7ic Mar 13 '18 at 09:05
  • Add the "cost center" or similar as a header or an attribute of the API calls. Query your logs to see what % of traffic came from what cost center and then split the billing yourself by ratio. – Murray Foxcroft Mar 13 '18 at 19:35
  • Hmm... that could definitely by something to look at. I'll look into it. Thanks Murray. :) – H4p7ic Mar 14 '18 at 07:16