APIs & Integrations

gsolomon
Member

Get the daily API usage of a specific Private App

SOLVE

I am inquiring to see if anybody has a solution or workaround to the problem I am facing. I am looking to get the daily API usage statistics for a single Private App on my HS account. I found the below endpoint in HubSpot's documentation (GET/account-info/v3/api-usage/daily/private-apps) but it seems the response from this endpoint just totals the current usage for all Private Apps on an account. 

 

I was hoping maybe it was possible to pass some parameter or filter to that endpoint to just fetch a single private app.

 

Any suggestions would be helpful

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Get the daily API usage of a specific Private App

SOLVE

@gsolomon 

I haven't tested the endpoint myself yet, so I was hoping that the "name" returned in the response would point to a single private app.

 

In the header of the response, when you are making an API call using a Private App, you should get X-HubSpot-RateLimit-Daily-Remaining as a result, with should give you the data you are looking for: https://developers.hubspot.com/docs/api/usage-details

 



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

0 Upvotes
3 Replies 3
Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Get the daily API usage of a specific Private App

SOLVE

Hi @gsolomon ,

 

I've triple checked the docs, but I'm afraid that it's not possible to get the daily usage of a single private app through the API.

The response of the endpoint that you are using should return an array. Could it be that you could filter out a single private app based on the name that is returned in the response?

 



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes
gsolomon
Member

Get the daily API usage of a specific Private App

SOLVE

I'm not exactly sure how I would do that. The below is the generic response of the call, which doesn't seem to have any fields based upon Private App Title or ID.

{
"results": [
{
"name": "api-calls-daily",
"usageLimit": 500000,
"currentUsage": 1,
"collectedAt": "2020-04-10T06:46:40.789Z",
"fetchStatus": "NOTFOUND",
"resetsAt": "2020-04-10T04:00:00Z"
}
]
}

0 Upvotes
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Get the daily API usage of a specific Private App

SOLVE

@gsolomon 

I haven't tested the endpoint myself yet, so I was hoping that the "name" returned in the response would point to a single private app.

 

In the header of the response, when you are making an API call using a Private App, you should get X-HubSpot-RateLimit-Daily-Remaining as a result, with should give you the data you are looking for: https://developers.hubspot.com/docs/api/usage-details

 



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes