Skip to content

feat(api): add endpoint for usage analytics breakdown with detailed r…#19

Draft
piyushryn wants to merge 5 commits into
mainfrom
IK-2639-new-usage-analytics-api
Draft

feat(api): add endpoint for usage analytics breakdown with detailed r…#19
piyushryn wants to merge 5 commits into
mainfrom
IK-2639-new-usage-analytics-api

Conversation

@piyushryn

Copy link
Copy Markdown
Contributor

…esponse structure

Comment thread openapi/v1.0.0.yaml Outdated
"429": *a3
/v1/accounts/usage-analytics:
get:
operationId: getUsageAnalytics

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

operationId: get-usage-analytics

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫡

Comment thread openapi/v1.0.0.yaml Outdated
Returns CDN, video processing, and extension usage
breakdowns over the given date range.
tags:
- Usage Analytics

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add - Account Management API as well. See other apis nearby, these are important for our docs website side navbar rendering.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@piyushryn actually remove Usage Analytics so that it can render directly inside Account Management API.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread openapi/v1.0.0.yaml Outdated
name: startDate
required: true
description: >
Start of the date range, inclusive. Must be strictly before

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the description of get-usage API. We need to at least mention the date format.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated as the description of get-usage API

Comment thread openapi/v1.0.0.yaml Outdated
operationId: get-usage-analytics
summary: Get usage analytics breakdown
description: >
Returns CDN, video processing, and extension usage

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need verbose description. It becomes part of documentation. See other APIs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Comment thread openapi/v1.0.0.yaml Outdated
type: string
format: date-time
description: >
ISO 8601 UTC timestamp indicating when the data was actually computed for consumers to gauge freshness of the computed data.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timestamp and ISO8601 string format doesnt come in one sentence, makes little sense. See other descriptions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Comment thread openapi/v1.0.0.yaml
requestCount:
type: number
bandwidthBytes:
type: number

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how its rendering. No description in name for any nested object. Bhai batao na ki kya aayega isme.

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the descriptions and structure of yaml

image

Comment thread openapi/v1.0.0.yaml Outdated
type: number
required: [hitCount, missCount, errorCount]

VideoProcessingEntry:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Poor name choices.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed these NameRequestCount, NameOperationCount, CacheBreakdown, VideoProcessingEntry

Comment thread openapi/v1.0.0.yaml Outdated
extensions:
type: array
items:
$ref: "#/components/schemas/NameOperationCount"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe NameRequestCount, NameOperationCount, CacheBreakdown, VideoProcessingEntry can be inline, as such not much re-use, at least for latter 2.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made it inline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants