OpenAPI PostMaster

Base URL: /api/v1, Version: 1.0.0

This is the API spec for PostMaster.

Schemes: http

Summary

Tag: admins

Manage the local administrators of the application

Operation Description
GET /admins

Get all the administrators

POST /admins

Create an administrator

GET /admins/{admin_id}

Get a specific administrator

PUT /admins/{admin_id}

Update an existing administrator

DELETE /admins/{admin_id}

Delete a specific administrator

PUT /admins/{admin_id}/unlock

Unlocks a locked out local administrator

Tag: aliases

Manage the email aliases

Operation Description
GET /aliases

Get all the aliases

POST /aliases

Create an alias

GET /aliases/{alias_id}

Get a specific alias

PUT /aliases/{alias_id}

Update an existing alias

DELETE /aliases/{alias_id}

Delete a specific alias

Tag: configs

Manage the configuration items for the application

Operation Description
GET /configs

Get all the configuration items

GET /configs/{config_id}

Get a specific configuration item

PUT /configs/{config_id}

Update an existing configuration item

Tag: domains

Manage the email domains the application can control

Operation Description
GET /domains

Get all the domains

POST /domains

Create a domain

GET /domains/{domain_id}

Get a specific domain

DELETE /domains/{domain_id}

Delete a specific domain

Tag: logs

Get the last 50 log entries

Operation Description
GET /logs

Get the last 50 logs in the log file

Tag: users

Manage the email users

Operation Description
GET /users

Get all the users

POST /users

Create a user

GET /users/{user_id}

Get a specific user

PUT /users/{user_id}

Update an existing user

DELETE /users/{user_id}

Delete a specific user

Paths

Get all the administrators

GET /admins

Tags: admins

application/json

search

Search query to filter the administrators returned

query string (string)

application/json

200 OK

The requested administrators were returned

Create an administrator

POST /admins

Tags: admins

application/json

The administrator object to create

application/json

201 Created

The administrator was created

404 Not Found

The administrator was not found

Unlocks a locked out local administrator

PUT /admins/{admin_id}/unlock

Tags: admins

application/json

admin_id

The ID of the administrator to unlock

path integer (int64)

application/json

200 OK

The administrator was unlocked

404 Not Found

The administrator was not found

Delete a specific administrator

DELETE /admins/{admin_id}

Tags: admins

application/json

admin_id

The ID of administrator to delete

path integer (int64)

application/json

204 No Content

The administrator was deleted

404 Not Found

The administrator was not found

Get a specific administrator

GET /admins/{admin_id}

Tags: admins

application/json

admin_id

The ID of the administrator to return

path integer (int64)

application/json

200 OK

The administrator was returned

404 Not Found

The administrator was not found

Update an existing administrator

PUT /admins/{admin_id}

Tags: admins

application/json

The attributes of the administrator to update

admin_id

The ID of the administrator to update

path integer (int64)

application/json

200 OK

The administrator was updated

404 Not Found

The administrator was not found

Get all the aliases

GET /aliases

Tags: aliases

application/json

search

Search query to filter the aliases returned

query string (string)

application/json

200 OK

The requested aliases were returned

Create an alias

POST /aliases

Tags: aliases

application/json

The alias object to create

application/json

201 Created

The alias was created

404 Not Found

The alias was not found

Delete a specific alias

DELETE /aliases/{alias_id}

Tags: aliases

application/json

alias_id

The ID of the alias to delete

path integer (int64)

application/json

204 No Content

The alias was deleted

404 Not Found

The alias was not found

Get a specific alias

GET /aliases/{alias_id}

Tags: aliases

application/json

alias_id

The ID of the alias to return

path integer (int64)

application/json

200 OK

The alias was returned

404 Not Found

The alias was not found

Update an existing alias

PUT /aliases/{alias_id}

Tags: aliases

application/json

The attributes of the alias to update

alias_id

The ID of the alias to update

path integer (int64)

application/json

200 OK

The alias was updated

404 Not Found

The alias was not found

Get all the configuration items

GET /configs

Tags: configs

application/json

application/json

200 OK

The configuration items were returned

Get a specific configuration item

GET /configs/{config_id}

Tags: configs

application/json

config_id

The ID of configuration item to return

path integer (int64)

application/json

200 OK

The configuration item was returned

404 Not Found

The configuration item was not found

Update an existing configuration item

PUT /configs/{config_id}

Tags: configs

application/json

The configuration item value to update

config_id

The ID of the configuration item to return

path integer (int64)

application/json

200 OK

The configuration item was updated

404 Not Found

The configuration item was not found

Get all the domains

GET /domains

Tags: domains

application/json

search

Search query to filter the domains returned

query string (string)

application/json

200 OK

The requested domains were returned

Create a domain

POST /domains

Tags: domains

application/json

The domain object to create

application/json

201 Created

The domain was created

404 Not Found

The domain was not found

Delete a specific domain

DELETE /domains/{domain_id}

Tags: domains

application/json

domain_id

The ID of the domain to delete

path integer (int64)

application/json

204 No Content

The domain was deleted

404 Not Found

The domain was not found

Get a specific domain

GET /domains/{domain_id}

Tags: domains

application/json

domain_id

The ID of the domain to return

path integer (int64)

application/json

200 OK

The domain was returned

404 Not Found

The domain was not found

Get the last 50 logs in the log file

GET /logs

Tags: logs

application/json

200 OK

The last 50 logs in the log file were returned

Get all the users

GET /users

Tags: users

application/json

search

Search query to filter the users returned

query string (string)

application/json

200 OK

The requested users were returned

Create a user

POST /users

Tags: users

application/json

The user object to create

application/json

201 Created

The user was created

404 Not Found

The user was not found

Delete a specific user

DELETE /users/{user_id}

Tags: users

application/json

user_id

The ID of the user to delete

path integer (int64)

application/json

204 No Content

The user was deleted

404 Not Found

The user was not found

Get a specific user

GET /users/{user_id}

Tags: users

application/json

user_id

The ID of the user to return

path integer (int64)

application/json

200 OK

The user was returned

404 Not Found

The user was not found

Update an existing user

PUT /users/{user_id}

Tags: users

application/json

The attributes of the user to update

user_id

The ID of user to update

path integer (int64)

application/json

200 OK

THe user was updated

404 Not Found

The user was not found

Schema definitions

admin: object

name: string (string)
username: string (string)
"matt"
                                                        
password: string (password)
"hunter2"
                                                        

alias: object

source: string (email)
"some_alias@example.com"
                                                        
destination: string (email)
"the_real_mailbox@example.com"
                                                        

config: object

value: string (string)
"/var/log/postmaster.log"
                                                        

domain: object

name: string (domaiun)
"example.com"
                                                        

user: object

email: string (email)
"the_real_mailbox@example.com"
                                                        
password: string (password)
"hunter2"