openapi: 3.2.0 info: title: Microsoft Azure Metrics Advisor Data Feed API description: Microsoft Azure Metrics Advisor REST API (OpenAPI v2) version: '1.0' security: - apim_key: [] ma_api_key: [] tags: - name: Data Feed paths: /dataFeeds: get: tags: - Data Feed summary: Microsoft Azure List All Data Feeds operationId: microsoftAzureListdatafeeds parameters: - in: query name: dataFeedName description: filter data feed by its name schema: type: string - in: query name: dataSourceType description: filter data feed by its source type x-ms-enum: name: DataSourceType modelAsString: true schema: type: string enum: - AzureApplicationInsights - AzureBlob - AzureCosmosDB - AzureDataExplorer - AzureDataLakeStorageGen2 - AzureEventHubs - AzureLogAnalytics - AzureTable - InfluxDB - MongoDB - MySql - PostgreSql - SqlServer - in: query name: granularityName description: filter data feed by its granularity x-ms-enum: name: Granularity modelAsString: true schema: type: string enum: - Yearly - Monthly - Weekly - Daily - Hourly - Minutely - Custom - in: query name: status description: filter data feed by its status x-ms-enum: name: EntityStatus modelAsString: true schema: type: string enum: - Active - Paused - in: query name: creator description: filter data feed by its creator schema: type: string - in: query name: $skip description: for paging, skipped number schema: type: integer format: int32 - in: query name: $maxpagesize description: the maximum number of items in one page schema: type: integer format: int32 responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DataFeedList' default: description: Client error or server error (4xx or 5xx) content: application/json: schema: $ref: '#/components/schemas/ErrorCode' x-ms-pageable: nextLinkName: '@nextLink' x-ms-examples: List all data feeds: $ref: ./examples/listDataFeeds.json description: Needs a more full description created. post: tags: - Data Feed summary: Microsoft Azure Create A New Data Feed operationId: microsoftAzureCreatedatafeed responses: '201': description: Success headers: Location: description: Location of the newly created resource. schema: type: string default: description: Client error or server error (4xx or 5xx) content: application/json: schema: $ref: '#/components/schemas/ErrorCode' x-ms-examples: Create a new data feed: $ref: ./examples/createDataFeed.json description: Needs a more full description created. requestBody: content: application/json: schema: $ref: '#/components/schemas/DataFeedDetail' description: parameters to create a data feed required: true /dataFeeds/{dataFeedId}: get: tags: - Data Feed summary: Microsoft Azure Get A Data Feed By Its Id operationId: microsoftAzureGetdatafeedbyid parameters: - in: path name: dataFeedId description: The data feed unique id required: true schema: type: string format: uuid responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DataFeedDetail' default: description: Client error or server error (4xx or 5xx) content: application/json: schema: $ref: '#/components/schemas/ErrorCode' x-ms-examples: Get a data feed by its id: $ref: ./examples/getDataFeedById.json description: Needs a more full description created. patch: tags: - Data Feed summary: Microsoft Azure Update A Data Feed operationId: microsoftAzureUpdatedatafeed parameters: - in: path name: dataFeedId description: The data feed unique id required: true schema: type: string format: uuid responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DataFeedDetail' default: description: Client error or server error (4xx or 5xx) content: application/json: schema: $ref: '#/components/schemas/ErrorCode' x-ms-examples: Update a data feed: $ref: ./examples/updateDataFeed.json description: Needs a more full description created. requestBody: content: application/merge-patch+json: schema: $ref: '#/components/schemas/DataFeedDetailPatch' description: parameters to update a data feed required: true delete: tags: - Data Feed summary: Microsoft Azure Delete A Data Feed operationId: microsoftAzureDeletedatafeed parameters: - in: path name: dataFeedId description: The data feed unique id required: true schema: type: string format: uuid responses: '204': description: The resource is deleted successfully or does not exist. default: description: Client error or server error (4xx or 5xx) content: application/json: schema: $ref: '#/components/schemas/ErrorCode' x-ms-examples: Delete a data feed: $ref: ./examples/deleteDataFeed.json description: Needs a more full description created. components: schemas: Metric: required: - metricName type: object properties: metricId: format: uuid description: metric id type: string readOnly: true metricName: description: metric name type: string metricDisplayName: description: metric display name pattern: '[.a-zA-Z0-9_-]+' type: string metricDescription: description: metric description type: string DataFeedDetail: required: - dataFeedName - dataSourceType - dataStartFrom - granularityName - metrics type: object properties: dataSourceType: description: data source type enum: - AzureApplicationInsights - AzureBlob - AzureCosmosDB - AzureDataExplorer - AzureDataLakeStorageGen2 - AzureEventHubs - AzureLogAnalytics - AzureTable - InfluxDB - MongoDB - MySql - PostgreSql - SqlServer type: string x-ms-enum: name: DataSourceType modelAsString: true dataFeedId: format: uuid description: data feed unique id type: string readOnly: true dataFeedName: description: data feed name type: string example: dummy data feed name dataFeedDescription: description: data feed description default: '' type: string granularityName: description: granularity of the time series enum: - Yearly - Monthly - Weekly - Daily - Hourly - Minutely - Custom type: string x-ms-enum: name: Granularity modelAsString: true granularityAmount: format: int32 description: if granularity is custom,it is required. type: integer metrics: description: measure list uniqueItems: true type: array items: $ref: '#/components/schemas/Metric' dimension: description: dimension list uniqueItems: true type: array items: $ref: '#/components/schemas/Dimension' timestampColumn: description: user-defined timestamp column. if timestampColumn is null, start time of every time slice will be used as default value. default: '' type: string dataStartFrom: format: date-time description: ingestion start time type: string startOffsetInSeconds: format: int64 description: the time that the beginning of data ingestion task will delay for every data slice according to this offset. default: 0 type: integer maxConcurrency: format: int32 description: the max concurrency of data ingestion queries against user data source. 0 means no limitation. default: -1 type: integer minRetryIntervalInSeconds: format: int64 description: the min retry interval for failed data ingestion tasks. default: -1 type: integer stopRetryAfterInSeconds: format: int64 description: stop retry data ingestion after the data slice first schedule time in seconds. default: -1 type: integer needRollup: description: mark if the data feed need rollup default: NoRollup enum: - NoRollup - NeedRollup - AlreadyRollup type: string x-ms-enum: name: NeedRollupEnum modelAsString: true rollUpMethod: description: roll up method default: None enum: - None - Sum - Max - Min - Avg - Count type: string x-ms-enum: name: RollUpMethod modelAsString: true rollUpColumns: description: roll up columns uniqueItems: true type: array items: type: string allUpIdentification: description: the identification value for the row of calculated all-up value. type: string fillMissingPointType: description: the type of fill missing point for anomaly detection default: SmartFilling enum: - SmartFilling - PreviousValue - CustomValue - NoFilling type: string x-ms-enum: name: FillMissingPointType modelAsString: true fillMissingPointValue: format: double description: the value of fill missing point for anomaly detection type: number viewMode: description: data feed access mode, default is Private default: Private enum: - Private - Public type: string x-ms-enum: name: ViewMode modelAsString: true admins: description: data feed administrator uniqueItems: true type: array items: type: string viewers: description: data feed viewer uniqueItems: true type: array items: type: string isAdmin: description: the query user is one of data feed administrator or not type: boolean readOnly: true creator: description: data feed creator type: string readOnly: true status: description: data feed status enum: - Active - Paused type: string readOnly: true x-ms-enum: name: EntityStatus modelAsString: true createdTime: format: date-time description: data feed created time type: string readOnly: true actionLinkTemplate: description: action link for alert default: '' type: string authenticationType: description: authentication type for corresponding data source default: Basic enum: - Basic - ManagedIdentity - AzureSQLConnectionString - DataLakeGen2SharedKey - ServicePrincipal - ServicePrincipalInKV type: string x-ms-enum: name: AuthenticationTypeEnum modelAsString: true credentialId: description: The credential entity id type: string discriminator: propertyName: dataSourceType example: dataSourceParameter: connectionString: Server=PlaceholderSqlServer,1433;Initial Catalog=PlaceholderDatabase;User ID=PlaceholderUserName;Password=PlaceholderPassword; query: select * from your_table where timestamp = @StartTime dataFeedName: Sample - cost/revenue - city/category dataFeedDescription: This is a sample data feed. granularityName: Daily metrics: - metricName: cost metricDisplayName: cost - metricName: revenue metricDisplayName: revenue dimension: - dimensionName: category dimensionDisplayName: category - dimensionName: city dimensionDisplayName: city timestampColumn: timestamp dataStartFrom: '2020-01-01T00:00:00Z' dataSourceType: SqlServer startOffsetInSeconds: 86400 maxConcurrency: 5 minRetryIntervalInSeconds: 3600 stopRetryAfterInSeconds: 604800 needRollup: NeedRollup rollUpMethod: Sum allUpIdentification: __SUM__ fillMissingPointType: SmartFilling viewMode: Private authenticationType: Basic DataFeedDetailPatch: required: - dataSourceType type: object properties: dataSourceType: description: data source type enum: - AzureApplicationInsights - AzureBlob - AzureCosmosDB - AzureDataExplorer - AzureDataLakeStorageGen2 - AzureEventHubs - AzureLogAnalytics - AzureTable - InfluxDB - MongoDB - MySql - PostgreSql - SqlServer type: string x-ms-enum: name: DataSourceType modelAsString: true dataFeedName: description: data feed name type: string dataFeedDescription: description: data feed description type: string timestampColumn: description: user-defined timestamp column. if timestampColumn is null, start time of every time slice will be used as default value. type: string dataStartFrom: format: date-time description: ingestion start time type: string startOffsetInSeconds: format: int64 description: the time that the beginning of data ingestion task will delay for every data slice according to this offset. type: integer maxConcurrency: format: int32 description: the max concurrency of data ingestion queries against user data source. 0 means no limitation. type: integer minRetryIntervalInSeconds: format: int64 description: the min retry interval for failed data ingestion tasks. type: integer stopRetryAfterInSeconds: format: int64 description: stop retry data ingestion after the data slice first schedule time in seconds. type: integer needRollup: description: mark if the data feed need rollup enum: - NoRollup - NeedRollup - AlreadyRollup type: string x-ms-enum: name: NeedRollupEnum modelAsString: true rollUpMethod: description: roll up method enum: - None - Sum - Max - Min - Avg - Count type: string x-ms-enum: name: RollUpMethod modelAsString: true rollUpColumns: description: roll up columns uniqueItems: true type: array items: type: string allUpIdentification: description: the identification value for the row of calculated all-up value. type: string fillMissingPointType: description: the type of fill missing point for anomaly detection enum: - SmartFilling - PreviousValue - CustomValue - NoFilling type: string x-ms-enum: name: FillMissingPointType modelAsString: true fillMissingPointValue: format: double description: the value of fill missing point for anomaly detection type: number viewMode: description: data feed access mode, default is Private enum: - Private - Public type: string x-ms-enum: name: ViewMode modelAsString: true admins: description: data feed administrator uniqueItems: true type: array items: type: string viewers: description: data feed viewer uniqueItems: true type: array items: type: string status: description: data feed status enum: - Active - Paused type: string x-ms-enum: name: EntityStatus modelAsString: true actionLinkTemplate: description: action link for alert type: string authenticationType: description: authentication type for corresponding data source enum: - Basic - ManagedIdentity - AzureSQLConnectionString - DataLakeGen2SharedKey - ServicePrincipal - ServicePrincipalInKV type: string x-ms-enum: name: AuthenticationTypeEnum modelAsString: true credentialId: description: The credential entity id type: string discriminator: propertyName: dataSourceType ErrorCode: type: object properties: message: type: string code: type: string DataFeedList: type: object properties: '@nextLink': type: string readOnly: true value: type: array items: $ref: '#/components/schemas/DataFeedDetail' readOnly: true Dimension: required: - dimensionName type: object properties: dimensionName: description: dimension name type: string dimensionDisplayName: description: dimension display name pattern: '[.a-zA-Z0-9_-]+' type: string securitySchemes: ma_api_key: type: apiKey name: x-api-key in: header apim_key: type: apiKey name: Ocp-Apim-Subscription-Key in: header x-ms-parameterized-host: hostTemplate: '{endpoint}/metricsadvisor/v1.0' useSchemePrefix: false parameters: - $ref: '#/components/parameters/Endpoint'