OpenAPI Specification
openapi: 3.0.0
info:
version: v1
title: Services Alerts Labels API
contact:
email: hello@overops.com
description: "Main OverOps API.\nThe REST API layer enables OverOps admins and users to perform and automate all actions\nprovided by the OverOps UI available at https://app.overops.com (or On-premises equivalent URL) via a platform independent programmatic interface.\nA wrapper Java client API library that leverages these APIs for convenience by\nJava and Scala developers is available at https://github.com/takipi/api-client and on Maven Central.\n\nAll calls must be authenticated using one of the following methods:\n 1. Using `x-api-key` header (To generate the token, go to `Settings` --> `Account Settings` in the OverOps App). This is the recommended method.\n 2. Using Basic auth with `username:password` combo.\n"
servers:
- url: https://api.overops.com/api/v1
security:
- basicAuth: []
- ApiKeyAuth: []
tags:
- name: Labels
description: Fetch and manipulate events labels
paths:
/services/{env_id}/events/{event_id}/inbox:
post:
tags:
- Labels
summary: Move to Inbox
description: Move the specified event into Inbox
parameters:
- in: path
name: env_id
description: Environment ID to use (e.g. S1234)
required: true
schema:
type: string
- in: path
name: event_id
description: Event to use
required: true
schema:
type: string
- in: query
name: force
description: Force adding labels, even if it exists
schema:
type: boolean
default: false
- in: query
name: handle_similar_events
description: Change the labels on all similar events
schema:
type: boolean
default: true
responses:
'200':
$ref: '#/components/responses/OK'
'401':
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
/services/{env_id}/events/{event_id}/delete:
post:
tags:
- Labels
summary: Move to Trash
description: Move the specified event into Trash
parameters:
- in: path
name: env_id
description: Environment ID to use (e.g. S1234)
required: true
schema:
type: string
- in: path
name: event_id
description: Event to use
required: true
schema:
type: string
- in: query
name: force
description: Force adding labels, even if it exists
schema:
type: boolean
default: false
- in: query
name: handle_similar_events
description: Change the labels on all similar events
schema:
type: boolean
default: true
responses:
'200':
$ref: '#/components/responses/OK'
'401':
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
/services/{env_id}/events/{event_id}/resolve:
post:
tags:
- Labels
summary: Mark as resolved
description: Marks the specified event as resolved
parameters:
- in: path
name: env_id
description: Environment ID to use (e.g. S1234)
required: true
schema:
type: string
- in: path
name: event_id
description: Event to use
required: true
schema:
type: string
- in: query
name: force
description: Force adding labels, even if it exists
schema:
type: boolean
default: false
- in: query
name: handle_similar_events
description: Change the labels on all similar events
schema:
type: boolean
default: true
responses:
'200':
$ref: '#/components/responses/OK'
'401':
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
/services/{env_id}/labels:
get:
tags:
- Labels
summary: List labels
description: List all existing labels
parameters:
- in: path
name: env_id
description: Environment ID to use (e.g. S1234)
required: true
schema:
type: string
responses:
'200':
description: List of labels
content:
'*/*':
schema:
type: object
properties:
labels:
type: array
items:
$ref: '#/components/schemas/Label'
'401':
$ref: '#/components/responses/UnauthorizedError'
post:
tags:
- Labels
summary: Create new label
description: Create a new label. Labels are used to tag events with custom classifications. Labels help support use cases such as classifying an event as severe / regressed, assign it to a specific developer or team (e.g prod-team-A) or any other user defined categorization.
parameters:
- in: path
name: env_id
description: Environment ID to use (e.g. S1234)
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Label'
description: Single label
responses:
'200':
$ref: '#/components/responses/OK'
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/UnauthorizedError'
'409':
$ref: '#/components/responses/Conflict'
/services/{env_id}/events/labels:
post:
tags:
- Labels
summary: Batch Add/Remove labels
description: Append/Detach labels to/from events
parameters:
- in: path
name: env_id
description: Environment ID to use (e.g. S1234)
required: true
schema:
type: string
- in: query
name: force
description: Force adding labels, even if it exists
schema:
type: boolean
default: false
- in: query
name: handle_similar_events
description: Change the labels on all similar events
schema:
type: boolean
default: true
requestBody:
content:
application/json:
schema:
type: object
properties:
items:
type: array
items:
type: object
properties:
event_id:
type: string
example: 42
add:
type: array
items:
type: string
example: Critical
remove:
type: array
items:
type: string
example: Low
description: list of events and label names to append/detach
responses:
'200':
$ref: '#/components/responses/OK'
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
/services/{env_id}/events/{event_id}/labels:
post:
tags:
- Labels
summary: Add/Remove labels
description: Append and remove label(s) from an event
parameters:
- in: path
name: env_id
description: Environment ID to use (e.g. S1234)
required: true
schema:
type: string
- in: path
name: event_id
description: Event to use
required: true
schema:
type: string
- in: query
name: force
description: Force adding labels, even if it exists
schema:
type: boolean
default: false
- in: query
name: handle_similar_events
description: Change the labels on all similar events
schema:
type: boolean
default: true
requestBody:
content:
application/json:
schema:
type: object
properties:
add:
type: array
items:
type: string
example: Critical
remove:
type: array
items:
type: string
example: Low
description: list of label names to add / remove
responses:
'200':
$ref: '#/components/responses/OK'
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
components:
responses:
NotFoundError:
description: Not Found
OK:
description: OK
Conflict:
description: Conflict
UnauthorizedError:
description: Unauthorized
BadRequestError:
description: Bad Request
schemas:
Label:
type: object
properties:
name:
type: string
example: HighPriority
type:
type: string
enum:
- DEFAULT
- USER
example: USER
color:
type: string
example: RED
created_on:
type: string
description: Label creation time. Date in ISO8601 format (yyyy-MM-ddTHH:mm:ss.SSSZ)
example: '2018-02-28T22:47:09.038Z'
created_by:
type: string
description: View creator
example: John Doe
securitySchemes:
basicAuth:
type: http
scheme: basic
ApiKeyAuth:
type: apiKey
in: header
name: X-API-KEY