-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
172 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ info: | |
description: Making SaaS chill. | ||
contact: | ||
email: [email protected] | ||
version: 0.1-296b8c8 | ||
version: 0.1-f7863eb | ||
servers: | ||
- url: localhost:8080 | ||
paths: | ||
|
@@ -705,6 +705,67 @@ paths: | |
type: array | ||
items: | ||
$ref: '#/components/schemas/Invite' | ||
/workspaces/{workspace}/metrics/filter: | ||
post: | ||
tags: | ||
- metrics | ||
summary: List of metrics matching the filter | ||
operationId: filterMetrics | ||
parameters: | ||
- $ref: '#/components/parameters/workspace' | ||
- name: from_timestamp | ||
in: query | ||
schema: | ||
type: string | ||
description: "The ISO-8601 formatted timestamp used to begin searching for\ | ||
\ matching metrics, i.e., 2018-11-13T20:20:39+00:00. If not provided the\ | ||
\ range will start from the epoch. Results returned are inclusive of this\ | ||
\ timestamp." | ||
format: date-time | ||
- name: duration | ||
in: query | ||
schema: | ||
type: integer | ||
description: "The duration (seconds) added to from_timestamp to limit the\ | ||
\ time range of the query. i.e., the query will be restricting to metric.timestamp\ | ||
\ >= from_timestamp AND metric.timestamp < from_timestamp + duration.\ | ||
\ If not provided or the duration is <=0 then the end timestamp is set\ | ||
\ to now" | ||
format: int32 | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Filter' | ||
required: true | ||
responses: | ||
"200": | ||
description: A list of metrics that match the filter | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Metric' | ||
/workspaces/{workspace}/metrics: | ||
post: | ||
tags: | ||
- metrics | ||
summary: Produce a Batch of Metrics | ||
operationId: produceBatchOfMetrics | ||
parameters: | ||
- $ref: '#/components/parameters/workspace' | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Metric' | ||
required: true | ||
responses: | ||
"204": | ||
description: the metrics have been saved | ||
/workspaces/{workspace}/orgs/{org}/users: | ||
get: | ||
tags: | ||
|
@@ -1045,6 +1106,35 @@ paths: | |
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Workspace' | ||
/workspaces/{workspace}/openapi: | ||
get: | ||
tags: | ||
- workspaces | ||
summary: Get the OpenAPI specification for all events and entities in this workspace | ||
operationId: getWorkspaceOpenApi | ||
parameters: | ||
- name: workspace | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
"200": | ||
description: The yaml OpenAPI specification for all events and entities | ||
in this workspace | ||
content: | ||
application/yaml: | ||
schema: | ||
type: string | ||
application/json: | ||
schema: | ||
type: string | ||
"401": | ||
description: The current user is not authorized to access this resource | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
components: | ||
schemas: | ||
Action: | ||
|
@@ -1460,6 +1550,67 @@ components: | |
type: string | ||
enum: | ||
- active | ||
Measurement: | ||
required: | ||
- instance_id | ||
- timestamp | ||
- value | ||
type: object | ||
properties: | ||
timestamp: | ||
type: string | ||
description: An ISO-8601 formatted date-time https://www.iso.org/iso-8601-date-and-time-format.html | ||
that represents the time the datapoint was created | ||
format: date-time | ||
value: | ||
type: number | ||
description: the measured value | ||
format: double | ||
instance_id: | ||
type: string | ||
description: InstanceId of the Nile instance this datapoint is related to | ||
attributes: | ||
type: object | ||
additionalProperties: | ||
type: object | ||
description: Measurements associated with this metric | ||
Metric: | ||
required: | ||
- entityType | ||
- measurements | ||
- name | ||
- type | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
description: The name of the metric that is unique in a workspace | ||
type: | ||
type: string | ||
description: Type of metric. Currently sum or gauge | ||
enum: | ||
- gauge | ||
- sum | ||
entityType: | ||
type: string | ||
description: The Nile entity type this metric is related to | ||
measurements: | ||
type: array | ||
description: Measurements associated with this metric | ||
items: | ||
$ref: '#/components/schemas/Measurement' | ||
Filter: | ||
type: object | ||
properties: | ||
metric_name: | ||
type: string | ||
description: Name of the metric to filter on | ||
instance_id: | ||
type: string | ||
description: The Nile instance id to filter on | ||
entity_type: | ||
type: string | ||
description: The Nile entity type to filter on | ||
AddUserToOrgRequest: | ||
required: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters