notificationcenter (1.0)

Download OpenAPI specification:Download

The (OX Protect) Notification Center takes care of sending messages to users. This can be real-time security alerts as well as other security related or informal messages, based on events generated by various source like PowerDNS, Anti Abuse Shield or other sources.

Authentication

X-API-Key

Security Scheme Type API Key
Header parameter name: X-API-Key

user

The user API to manage the users of the notifcationcenter

Create a user

post /user
/notificationcenter/api/v1/user
Authorizations:
Request Body schema: application/json

Data of the new user

emailaddress
Array of objects (EmailAddress)
locale
string

The selected language of the user

phonenumbers
Array of objects (PhoneNumber)
pushtokens
Array of objects (PushToken)
userMappings
Array of objects (UserMapping)
user_id
required
string [ 1 .. 50 ] characters

Unique user id for notification centre

Responses

200

OK

201

Successful created. The return value is the id of the created user.

400

Invalid input data

401

Unauthorized

403

Forbidden

404

Not Found

409

User already exists

500

Unexpected error

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "emailaddress":
    [
    ],
  • "locale": "string",
  • "phonenumbers":
    [
    ],
  • "pushtokens":
    [
    ],
  • "userMappings":
    [
    ],
  • "user_id": "string"
}

Delete a user

delete /user/{userId}
/notificationcenter/api/v1/user/{userId}
Authorizations:
path Parameters
userId
required
string

The id of the user to delete

Responses

200

OK

204

Successful deleted

401

Unauthorized

403

Forbidden

404

User does not exists

500

Unexpected error

Get a user with the userId

get /user/{userId}
/notificationcenter/api/v1/user/{userId}
Authorizations:
path Parameters
userId
required
string

The user id of the user to get

Responses

200

Successful

401

Unauthorized

403

Forbidden

404

User does not exists

500

Unexpected error

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "emailaddress":
    [
    ],
  • "id": 0,
  • "locale": "string",
  • "phonenumbers":
    [
    ],
  • "pushtokens":
    [
    ],
  • "userMappings":
    [
    ],
  • "user_id": "string"
}

Partial update of a user

patch /user/{userId}
/notificationcenter/api/v1/user/{userId}
Authorizations:
path Parameters
userId
required
string

The current id of the user to update

Request Body schema: application/json

Update data for a user

locale
string

The selected language of the user

user_id
string

Unique user id for notification centre

Responses

200

Successful updated

204

No Content

400

Invalid input data

401

Unauthorized

403

Forbidden

404

User does not exists

500

Unexpected error

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "locale": "string",
  • "user_id": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "emailaddress":
    [
    ],
  • "id": 0,
  • "locale": "string",
  • "phonenumbers":
    [
    ],
  • "pushtokens":
    [
    ],
  • "userMappings":
    [
    ],
  • "user_id": "string"
}

Update or create a user

put /user/{userId}
/notificationcenter/api/v1/user/{userId}
Authorizations:
path Parameters
userId
required
string

The current id of the user to update

query Parameters
create
boolean

Create if not exists?

add
boolean

Add and not replace notification channels?

Request Body schema: application/json

Update data for a user

emailaddress
Array of objects (EmailAddress)
locale
string

The selected language of the user

phonenumbers
Array of objects (PhoneNumber)
pushtokens
Array of objects (PushToken)
userMappings
Array of objects (UserMapping)
user_id
required
string [ 1 .. 50 ] characters

Unique user id for notification centre

Responses

200

Successful updated

201

Created

400

Invalid input data

401

Unauthorized

403

Forbidden

404

User does not exists

500

Unexpected error

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "emailaddress":
    [
    ],
  • "locale": "string",
  • "phonenumbers":
    [
    ],
  • "pushtokens":
    [
    ],
  • "userMappings":
    [
    ],
  • "user_id": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": 0,
  • "message": "string"
}

Get the current channel configuration of all channels of the user with the userId. If there is no channel configuration the lists of the configuration will be empty

get /user/{userId}/channelconfiguration
/notificationcenter/api/v1/user/{userId}/channelconfiguration
Authorizations:
path Parameters
userId
required
string

Id of the user to create the device for

Responses

200

Successful operation

401

Unauthorized

403

Forbidden

404

User not found

500

Unexpected error

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "email":
    {
    },
  • "push":
    {
    },
  • "sms":
    {
    }
}

Sets or updates the channel configuration of all channels of the user with the userId. The old channel configurations will be overwritten completly

put /user/{userId}/channelconfiguration
/notificationcenter/api/v1/user/{userId}/channelconfiguration
Authorizations:
path Parameters
userId
required
string

Id of the user to create the notificationconfiguration for

Request Body schema: application/json

Data of all channel configuration

email
object (ChannelConfiguration)

The configuration for a channel to send notifications to a user. The object contains a whitelist. Each notification which has a category or code which is mentioned in configuration list will be send. If the list is empty all notifications will be send.

push
object (ChannelConfiguration)

The configuration for a channel to send notifications to a user. The object contains a whitelist. Each notification which has a category or code which is mentioned in configuration list will be send. If the list is empty all notifications will be send.

sms
object (ChannelConfiguration)

The configuration for a channel to send notifications to a user. The object contains a whitelist. Each notification which has a category or code which is mentioned in configuration list will be send. If the list is empty all notifications will be send.

Responses

200

Successful operation

201

Created

401

Unauthorized

403

Forbidden

404

User not found

500

Unexpected error

Request samples

Content type
application/json
Copy
Expand all Collapse all