PushBits Server API Documentation (0.7.2)

Download OpenAPI specification:Download

Documentation for the PushBits server API.

Authentication

BasicAuth

Security Scheme Type HTTP
HTTP Authorization Scheme basic

Alertmanager

Create an Alert

Creates an alert that is send to the channel as a notification. This endpoint is compatible with alertmanager webhooks.

query Parameters
token
required
string

Channels token, can also be provieded in the header

Request Body schema: application/json

alertmanager webhook call

Array of objects (model.AlertmanagerAlert) [ items ]
object
object
externalURL
string
groupKey
string
object
receiver
string
version
string

Responses

Request samples

Content type
application/json
{
  • "alerts": [
    ],
  • "commonAnnotations": {
    },
  • "commonLabels": {
    },
  • "externalURL": "string",
  • "groupKey": "string",
  • "groupLabels": {
    },
  • "receiver": "string",
  • "version": "string"
}

Response samples

Content type
application/json
[
  • {
    }
]

Application

Get Applications

Get all applications from current user

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Application

Create a new application

Authorizations:
query Parameters
name
required
string

Name of the application

strict_compatability
boolean

Use strict compatability mode

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "token": "string"
}

Delete Application

Delete an application

Authorizations:
path Parameters
id
required
integer

ID of the application

Responses

Get Application

Get single application by ID

Authorizations:
path Parameters
id
required
integer

ID of the application

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "token": "string"
}

Update Application

Update an application

Authorizations:
path Parameters
id
required
integer

ID of the application

query Parameters
name
string

New name for the application

refresh_token
boolean

Generate new refresh token for the application

strict_compatability
boolean

Whether to use strict compataibility mode

Responses

Create a Notification

Creates a new notification for the given channel

query Parameters
message
required
string

The message to send

title
string

The title to send

priority
integer

The notifications priority

token
required
string

Channels token, can also be provieded in the header

Responses

Response samples

Content type
application/json
{
  • "appid": 0,
  • "date": "string",
  • "extras": { },
  • "id": "string",
  • "id_url_encoded": "string",
  • "message": "string",
  • "priority": 0,
  • "title": "string"
}

Delete a Notification

Informs the channel that the notification is deleted

path Parameters
message_id
required
string

ID of the message to delete

query Parameters
token
required
string

Channels token, can also be provieded in the header

Responses

Health

Health of the application

Responses

User

Get Users

Gets a list of all users

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a User

Creates a new user

Authorizations:
query Parameters
name
required
string

Name of the user

is_admin
boolean

Whether to set the user as admin or not

matrix_id
required
string

Matrix ID of the user in the format @user:domain.tld

password
required
string

The users password

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "is_admin": true,
  • "matrix_id": "string",
  • "name": "string"
}

Delete User

Delete user

Authorizations:
path Parameters
id
required
integer

The users id

Responses

Get User

Gets single user

Authorizations:
path Parameters
id
required
integer

The users id

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "is_admin": true,
  • "matrix_id": "string",
  • "name": "string"
}

Update User

Update user information

Authorizations:
path Parameters
id
required
integer

The users id

query Parameters
name
required
string

Name of the user

is_admin
boolean

Whether to set the user as admin or not

matrix_id
required
string

Matrix ID of the user in the format @user:domain.tld

password
required
string

The users password

Responses