Skip to content

Instantly share code, notes, and snippets.

@chook
Created July 29, 2018 13:18
Show Gist options
  • Save chook/d61f9a9f6146450a83bbe54e8c7c432e to your computer and use it in GitHub Desktop.
Save chook/d61f9a9f6146450a83bbe54e8c7c432e to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
version: 'v1'
title: 'Services API'
contact:
email: [email protected]
description: |
Main OverOps API.
All calls must be authenticated using one of the following methods:
1. Using `username:password`.
2. Using `x-api-key` header (To generate the token, go to `Settings` --> `Account Settings` in the OverOps App)
securityDefinitions:
basicAuth:
type: basic
ApiKeyAuth:
type: apiKey
in: header
name: X-API-KEY
security:
- basicAuth: []
- ApiKeyAuth: []
host: api.overops.com
basePath: /api/v1
tags:
- name: General
description: Fetching general information about services (Not yet implemented)
- name: Data Redaction
description: Fetching and manipulating the data redaction (PII) settings of the service
- name: Code Redaction
description: Fetching and manipulating the 3rd party and utility classes settings.
- name: Views
description: Fetching information about the views
- name: View Metrics
description: Fetching data points about views in order to plot graphs
- name: Alerts
description: APIs related to the alerting mechanism
- name: Events
description: Event data
schemes:
- "https"
paths:
/services/{service_id}/views/{view_id}/metrics/view/graph:
get:
tags:
- View Metrics
summary: "Fetch event metrics"
description: "Fetch event metrics"
parameters:
- in: path
name: service_id
description: Environment to use
type: string
required: true
- in: path
name: view_id
description: View to use
type: string
required: true
- in: query
name: from
type: string
description: Start time of requested graph. Date in ISO8601 format (yyyy-MM-ddTHH:mm:ss.SSSZ)
required: true
- in: query
name: to
type: integer
description: End time of requested graph. Date in ISO8601 format (yyyy-MM-ddTHH:mm:ss.SSSZ)
required: true
- in: query
name: points
type: integer
description: Number of data points to return within the interval
required: true
- in: query
name: server
type: string
description: Server(s) added to the filter
- in: query
name: app
type: string
description: Application(s) added to the filter
- in: query
name: deployment
type: string
description: Deployment(s) added to the filter
responses:
200:
description: Graphs
schema:
$ref: "#/definitions/Graphs"
401:
$ref: "#/responses/UnauthorizedError"
404:
$ref: "#/responses/NotFoundError"
definitions:
CodeLocation:
description: A code location, for error location, etc
type: object
properties:
prettified_name:
type: "string"
example: "Main.main"
class_name:
type: "string"
example: "com.company.Main"
method_name:
type: "string"
example: "main"
method_desc:
type: "string"
example: "([Ljava/lang/String;)V"
Graphs:
description: "List of graph series"
type: "object"
properties:
graphs:
type: "array"
items:
$ref: "#/definitions/GraphSeries"
GraphSeries:
description: "Event graph"
type: "object"
properties:
type:
type: "string"
example: "event"
id:
type: "string"
example: "42"
points:
type: "array"
items:
type: "object"
properties:
time:
type: "string"
example: "2018-02-28T22:47:09.038Z"
value:
type: "number"
example: 42
contributors:
type: "array"
items:
type: "object"
properties:
id:
type: "string"
example: "42"
value:
type: "number"
example: 42
responses:
OK:
description: OK
TBD:
description: TBD
UnauthorizedError:
description: Unauthorized
NotFoundError:
description: Not Found
ForbiddenError:
description: Forbidden
BadRequestError:
description: Bad Request
Conflict:
description: Conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment