reflexion restful api 1 - amazon s3 · currently, the reflexion api offers token -based...

20
Reflexion API Documentation Reflexion RESTful API 1.1 Updated August 21, 2015

Upload: others

Post on 10-Jun-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Reflexion API Documentation

Reflexion RESTful API 1.1

Updated August 21, 2015

Page 2: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 2

Table of Contents Introduction .................................................................................................................................................. 3

Placeholder Variables ................................................................................................................................... 3

Versioning ..................................................................................................................................................... 3

Authentication .............................................................................................................................................. 3

Generating an Authentication Token ....................................................................................................... 4

Authenticated API Calls ............................................................................................................................. 4

Code Example ............................................................................................................................................... 5

Retrieving Partial Results ............................................................................................................................. 6

Pagination ..................................................................................................................................................... 6

Enterprise Management .............................................................................................................................. 7

Enterprise Fields ........................................................................................................................................ 7

Create an Enterprise ............................................................................................................................... 10

Retrieve an Enterprise by ID ................................................................................................................... 10

Retrieve an Enterprise by Domain .......................................................................................................... 11

Retrieve Customers ................................................................................................................................. 11

Retrieve Users for an Enterprise ............................................................................................................. 11

Update an Enterprise .............................................................................................................................. 12

Delete an Enterprise ............................................................................................................................... 12

Enterprise Archiving Service Fields ......................................................................................................... 13

Create the Archiving Service for an Enterprise ....................................................................................... 13

Modify the Archiving Service for an Enterprise ...................................................................................... 14

Encryption Service Fields ........................................................................................................................ 14

Create the Encryption Service for an Enterprise .................................................................................... 15

Modify the Encryption Service for an Enterprise .................................................................................... 15

User Management ...................................................................................................................................... 16

User Fields ............................................................................................................................................... 16

Create a User........................................................................................................................................... 18

Retrieve a User by ID............................................................................................................................... 18

Retrieve an User by Primary Address ..................................................................................................... 19

Update a User ......................................................................................................................................... 19

Delete a User ........................................................................................................................................... 19

User Archiving Service Fields .................................................................................................................. 20

Page 3: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 3

Modify the Archiving Service for a User ................................................................................................. 20

User Encryption Service Fields ................................................................................................................ 20

Modify the Encryption Service for a User ............................................................................................... 20

Introduction The Reflexion API allows for the provisioning and management of enterprises and users, which are

represented in the JSON (JavaScript Object Notation) format. This document describes the API in detail

and provides examples of how to use it.

Placeholder Variables The following placeholders are used throughout this document and indicate variable fields used during

different API calls.

Variable Placeholder Explanation

{API-URL} https://api.reflexion.net/rfx-rest-api

{ENTERPRISE-ID} Required when retrieving, updating, or deleting an enterprise

{MANAGER-ID} Required when creating an enterprise

{USER-ID} Required when retrieving, updating, or deleting a user or a user’s service

{API-USER-SERVICE-KEY} A service key generated through the Reflexion UI and associated with an end user

{AUTH-TOKEN} A session token generated during initial authentication

Versioning Versioning of the Reflexion API is done through Accept headers. The latest version is 1.

In order to query a later version, one has to provide an Accept header with the value

application/vnd.rfx.api.vX+json where X stands for the version number.

For version testing purposes, the root API URL (see {API-URL}) also accepts a GET request for version 2.

Sending a GET request with the header application/vnd.rfx.api.v2+json will return the following:

HTTP/1.1 200 OK { "name":"Reflexion RESTful API", "version":2 }

Authentication Currently, the Reflexion API offers token-based authentication in combination with user credentials. The

authentication process is explained in this section. Additional authentication methods such as OAuth

1.0a or OAuth 2 may be offered in future versions. SSL/TLS is required for all API communications.

Page 4: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 4

Each API request (except the initial authentication request – see next section) requires two keys:

Service key (see {API-USER-SERVICE-KEY}): the service key is generated through the Reflexion UI.

Authentication token: generated during initial API authentication. In order to successfully

retrieve this authentication token, an API user needs to provide a valid service key as well as

his/her user credentials (only required during authentication). The authentication token will

expire after 30 minutes of inactivity.

Generating an Authentication Token An authentication token can be generated by sending a POST request with the following JSON object to

{API-URL}/auth:

{ "username":"apiUserLogin", "password":"apiUserPassword" }

In addition, this request also needs to provide the following two headers:

service_key: {API_USER_SERVICE_KEY}

content-type: application/json

If successful, the response will contain the authentication token and the ID of the authenticated user:

HTTP/1.1 200 OK { "auth_token" : "f6f1b0c8-63d6-45cc-8bf7-123456789012", "userId" : "5543" }

This token serves as a temporary authentication key and will expire 30 minutes after its last use. Upon

expiration, a new authentication token needs to be requested.

Authenticated API Calls Once an authentication token has been generated, all API requests can be performed by providing the

following request headers:

service_key: {API_USER_SERVICE_KEY} auth_token: {AUTH_TOKEN} content-type: application/json accept: application/json

Page 5: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 5

Code Example The following Python script illustrates the steps necessary to authenticate against the Reflexion API and

run a simple query. The below script utilizes an external module called “requests” for simplified HTTP

request handling. The module is available here: http://docs.python-requests.org/en/latest/.

1. import requests 2. import json 3. 4. apiURL = "{API-URL}" 5. authURL = apiURL + '/auth' 6. userURL = apiURL + '/users/421' 7. 8. # retrieve authentication token 9. credentials = json.dumps({'username':'apiUserLogin', 'password':'apiUserPassword'}) 10. headers = {'content-type':'application/json', 'service_key':'f80ebc-ad5c-...-789012'} 11. response = requests.post(authURL, credentials, headers=headers) 12. 13. print 'Authentication response: \n{0}\n'.format(response.text) 14. 15. responseObj = response.json() 16. authToken = responseObj['auth_token'] 17. 18. # add authentication token to header 19. headers['auth_token'] = authToken 20. 21. # GET user with ID 421 22. r = requests.get(userURL, headers=headers) 23. 24. # print results 25. print 'Response status: {0}\n{1}'.format(r.status_code, r.text)

Line 11 sends an HTTP POST authentication request. Line 16 adds the generated authentication token as

a header field. Line 19 sends a simple GET request, retrieving information for a user with the ID 421. Line

22 prints out the response.

The expected output of the above script is as follows:

Authentication response: { "auth_token" : "ba1d92fd-7aff-. . .-d340511513bf", "userId" : "5543" } Response status: 200 { "name" : "Example User", "userId" : "421", "enterpriseId" : "272", . . }

Page 6: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 6

Retrieving Partial Results By default, the Reflexion API will return all fields of a requested resource. For example, a GET request to

{API-URL}/users/421 will return all fields associated with the user with ID 421. Oftentimes, however, not

all fields are of interest. For this reason, a “fields” parameter can be applied to each request. The

following request would only retrieve the fields name, userId and enterpriseId of the requested user:

Request: GET {API-URL}/users/421?fields=name,userId,enterpriseId Response: { "name" : "Example User", "userId" : "421", "enterpriseId" : "272" }

Pagination Some API requests (e.g. Retrieve Customers or Retrieve Users for an Enterprise) return a list of JSON

objects. In order to keep the return objects within a manageable size, such requests are paginated. Both

the page number and page size are configurable as query parameters. A paginated response will contain

link header information per RFC 5988. When moving through different pages, it is highly advisable to use

the link header information as a reference point.

There are four link headers that might be returned as part of the response. They are:

Link Header Explanation

FIRST Reference to the first page

PREVIOUS Reference to the previous page

NEXT Reference to the next page

LAST Reference to the last page

For example, a request to retrieve users for a given enterprise might return the following response:

Request: GET {API-URL}/enterprises/4/users Response body: [ { "userId" : "7901", "name" : "Api User", "primaryAddress" : [email protected] }, { "userId" : "8904", "name" : "Test User", "primaryAddress" : [email protected] }, ... ]

Page 7: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 7

Response headers: 'link': '<{API-URL}/enterprises/1/users?page=2&pageSize=100&sortBy=NAME>;rel="NEXT", <{API-URL}/enterprises/1/users?page=5&pageSize=100&sortBy=NAME>;rel="LAST"'

The above response headers indicate that the NEXT page (relative to the current page) is located at:

{API-URL}/enterprises/1/users?page=2&pageSize=100

And the LAST page is located at:

{API-URL}/enterprises/1/users?page=5&pageSize=100

Link headers are only present if they make contextual sense. For example, a request for the first page

will not contain a link to the first page, nor will it contain a reference to the previous page.

Enterprise Management This section provides information on how to create, retrieve, delete, and update enterprises. This also

includes retrieving users and customers, and modifying services for a given enterprise.

Enterprise Fields The below table provides a complete list of all currently available settings and flags for enterprises.

Field Name Explanation Permitted Values

name The enterprise name Any text

enterpriseId The ID assigned to this enterprise Digits (read only)

managedByEnterpriseId The ID of the managing enterprise Digits (read only)

type The enterprise type REGULAR SOLUTION_PROVIDER

settings These settings are the default settings for new users for the given enterprise

settings └ msgToUnknown

Should messages to unknown users be delivered (passed through) or denied?

PASS_THROUGH DENY

settings └ newUserOnOutbound

Add new users the first time they send an email

ON OFF

settings └ outboundNote └ tagText

Note appended to outbound non-HTML emails

Any text

settings └ outboundNote └ tagHTML

Note appended to outbound HTML emails

HTML

settings └ quarantineHeadersOnly

In quarantine, view the message headers only

ON OFF

settings └ sendWelcomeMessage

Should a welcome message be sent to new users?

ON OFF

Page 8: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 8

default Default settings for new users in an enterprise

default └ attachControlPanel

For new users, should a control panel be added to inbound messages?

ON OFF

default └ aotfStatus

Enable Address-on-the-Fly for new users? ON OFF

default └ autoAotf

If enabled, creates a new Protective Address and uses it for all future communication with that contact

ON OFF

default └ blockBulkEmails

Block incoming newsletters and bulk mailings?

ON OFF

default └ filter └ type

The filter type LOW MEDIUM HIGH CUSTOM

default └ filter └ score

A custom filter score; if settings-filter-type is not set to CUSTOM, this score is not required

Number between 0 - 100

default └ language

The default language for new users ENGLISH SPANISH GERMAN FRENCH PORTUGUESE DUTCH ITALIAN

default └ outlookFormatting

Format delivery for Microsoft Outlook? ON OFF

default └ securityEnforcement

How to handle spam REJECT_SEND_NOTICE FLAG_DELIVER_TO_INBOX FLAG_DELIVER_TO_DELEGATE VAPORIZE REJECT_SEND_NOTICE_QUAR REJECT_QUAR

default └ securityStatus

Should security be enabled for this user? ON OFF

default └ securityType

The mode this user should operate in FILTER ALLOW_LIST

default └ spoofingPrevention

Block all messages that originate outside the enterprise but that appear to be both from and to domains in the enterprise?

ON OFF

default └ vaporizeSenderOnBL

Should messages on the block list be vaporized instead of quarantined?

DO_NOT_VAPORIZE VAPORIZE

default └ spamShredderScore

Anything above this spam threshold will be vaporized instead of quarantined

Number between 0 - 100

Page 9: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 9

quarantine Default quarantine settings for new users in a given enterprise

quarantine └ blatantSpamScore

Messages whose content filter scores are above this threshold will not be included in the daily quarantine summary

Number between 0 - 100

quarantine └ status

If enabled, quarantine summaries will be delivered to the user

ON OFF

quarantine └ redactSubject

Partially block quarantined message subject lines?

ON OFF

quarantine └ summaryDelivery

Force the quarantine summary to be sent even if the quarantine is empty?

FORCE_DELIVERY CONDITIONAL_DELIVERY

domains A list of domains associated with this enterprise

List of domains; must contain one primary domain

Domains └ name

The domain name Any fully qualified domain name

domains └ isPrimary

Is this the primary domain for this enterprise?

true false

domains └ deliveryDestinations └ destination

The delivery destination Any fully qualified domain name or IP address

domains └ deliveryDestinations └ port

The delivery destination port Any positive integer

domains └ deliveryDestinations └ preference

The delivery destination preference Any positive integer

trustedHosts A list of trusted hosts associated with this enterprise

List of trusted hosts; can be empty

trustedHosts └ address

The trusted host address Any IP address or IP subnet

trustedHosts └ type

The type of trusted host IP_ADDRESS IP_SUBNET

Page 10: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 10

Create an Enterprise The above table provides a complete list of all currently available settings and flags for enterprises.

However, only a small subset of settings is required to create an enterprise. The following POST request

contains all of the information required to create a new enterprise. Any setting or flag not provided will

be inherited from the managing enterprise.

POST {API-URL}/enterprises/{MANAGER-ID}/customers

Example request data Response: HTTP/1.1 200 OK { "name" : "Api Inc.", "domains" : [ { "name" : "primdomain.com", "deliveryDestinations" : [ { "destination" : "delivery.com", "port" : 75, "preference" : 10 } ], "isPrimary" : true } ] }

{ "name" : "Api Inc.", "enterpriseId" : "1272", "managedByEnterpriseId" : "272", "type" : "REGULAR", "settings" : { "msgToUnknown" : "PASS_THROUGH", "newUserOnOutbound" : "OFF", ... }, "default":{ "attachControlPanel":"ON", "aotfStatus":"ON", ... }, "quarantine":{ "blatantSpamScore":65, "status":"ON", ... }, "domains" : [ { "name" : "primdomain.com", "deliveryDestinations" : [ { "destination" : "delivery.com", "port" : 75, "preference" : 10 } ], "isPrimary" : true } ], "trustedHosts" : [ ], "services" : [ ] }

Retrieve an Enterprise by ID Retrieving an enterprise is a simple GET request. If no field parameter is provided, all applicable settings

and flags will be returned in one single JSON. The following request retrieves the fields name,

enterpriseId, and settings for an enterprise with ID 1272:

GET {API-URL}/enterprises/{ENTERPRISE-ID}?fields=name,enterpriseId,settings

No request data Response: HTTP/1.1 200 OK

{ "name" : "Example Networks", "enterpriseId" : "1272", "settings" : { "newUserOnOutbound" : "OFF", "msgToUnknown" : "PASS_THROUGH", ... } }

Page 11: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 11

Retrieve an Enterprise by Domain In addition to retrieving an enterprise by ID, an enterprise can also be retrieved by any of its assigned

domains. The following request retrieves the enterprise owning the domain example.com:

GET {API-URL}/enterprises?domain=example.com

No request data Response: HTTP/1.1 200 OK

{ "name" : "Example Networks", "enterpriseId" : "1272", ... }

Retrieve Customers This is a paginated request (see Pagination) and returns customers for a given enterprise through the

following GET request:

GET {API-URL}/enterprises/{ENTERPRISE-ID}/customers

No request data Response: HTTP/1.1 200 OK

[ { "name" : "Example Networks", "enterpriseId" : "2273", "managedByEnterpriseId" : "272", "type" : "REGULAR", ... }, { "name" : "Sec Enterprise", "enterpriseId" : "2295", "managedByEnterpriseId" : "272", "type" : "REGULAR", ... } ]

Retrieve Users for an Enterprise This is a paginated request (see Pagination) and returns users for a given enterprise through the

following GET request:

GET {API-URL}/enterprises/{ENTERPRISE-ID}/users

No request data Response: HTTP/1.1 200 OK

[ { "userId" : "7901", "name" : "Api User", "primaryAddress" : [email protected] . . . }, { "userId" : "8904", "name" : "Test User", "primaryAddress" : [email protected] . . . } ]

Page 12: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 12

Update an Enterprise An enterprise can have its settings and flags updated by sending a PATCH request, as shown below:

PATCH {API-URL}/enterprises/{ENTERPRISE-ID}

Example request data Response: HTTP/1.1 200 OK [ { "op":"replace", "path":"/name", "value":"Example Networks" }, { "op":"replace", "path":"/settings/outboundNote", "value":{ "tagType":"BOTTOM_TAG", "tagText":"Outbound Signature", "tagHTML":"<html>...</html>" } }, { "op":"remove", "path":"/domains/1" }, { "op":"add", "path":"/trustedHosts/-", "value":{ "address":"23.43.95.2", "type":"IP_ADDRESS" } }, { "op":"replace", "path":"/default/outlookFormatting", "value":"ON" } ]

{ "name" : "Example Networks", "enterpriseId" : "1272", "managedByEnterpriseId" : "272", "type" : "REGULAR", "settings" : { "msgToUnknown" : "PASS_THROUGH", "newUserOnOutbound" : "OFF", "outboundNote":{ "tagType":"BOTTOM_TAG", "tagText":"Outbound Signature", "tagHTML":"<html>...</html>" }, "quarantineHeadersOnly" : "ON", "sendWelcomeMessage" : "OFF" }, "default":{ . . . "language":"GERMAN", "outlookFormatting":"ON", "securityEnforcement":"REJECT_QUAR", "securityStatus":"ON", "securityType":"FILTER" }, "domains" : [ { "name" : "primdomain.com", "deliveryDestinations" : [ { "destination" : "delivery.com", "port" : 75, "preference" : 10 } ], "isPrimary" : true } ], "trustedHosts" : [ { "address" : "23.94.12.53", "type" : "IP_ADDRESS" }, { "address" : "99.99.99.0/24", "type" : "IP_SUBNET" }, { "address" : "23.43.95.2", "type" : "IP_ADDRESS" } ] }

Delete an Enterprise Sending a DELETE request, as shown below, will delete an enterprise. Please note that all users

associated with the enterprise will be deleted as well.

DELETE {API-URL}/enterprises/{ENTERPRISE-ID}

No request data Response: HTTP/1.1 200 OK

Page 13: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 13

Enterprise Archiving Service Fields The following fields indicate different settings and flags for handling Archiving through the API:

Field Name Explanation Allowed Values

status The current status of the Archiving service ACTIVE INACTIVE

enableForNewUsers Should Archiving be activated for new users?

ON OFF

enableForAllUsers Should Archiving be activated for all existing users?

true false

type The type of archiving: FULL is unlimited, LITE is a 60-day rolling archive

FULL LITE

contact General contact information

contact └ enterpriseName

Enterprise name Any text

contact └ phone

Phone number Digits

contact └ address

Address Any text

contact └ name

Contact name Any text

contact └ email

Contact email address Any text

Create the Archiving Service for an Enterprise The following POST request illustrates how the Archiving service can be created for a given enterprise:

POST {API-URL}/enterprises/{ENTERPRISE-ID}/services/archiving

Request data Response: HTTP/1.1 200 OK { "status" : "ACTIVE", "enableForNewUsers" : "ON", “enableForAllUsers: : true, "type" : "FULL", "contact" : { "enterpriseName" : "Example Networks", "phone" : "8571234567”, "address" : "Test Way 123", "contactName" : "John Smith", "contactEmail" : "[email protected]" } }

{ "status" : "ACTIVE", "enableForNewUsers" : "ON", "type" : "FULL", "userCount" : 3, "contact" : { "enterpriseName" : "Example Networks", "phone" : "8571234567", "address" : "Test Way 123", "contactName" : "John Smith", "contactEmail" : "[email protected]" } }

Page 14: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 14

Modify the Archiving Service for an Enterprise The Archiving service for a given enterprise can be modified (enable, disable, change settings, etc.)

through a PATCH request, as shown below:

PATCH {API-URL}/enterprises/{ENTERPRISE-ID}/services/archiving

Request data Response: HTTP/1.1 200 OK [ { "op":"replace", "path":"/status", "value":"INACTIVE" }, { "op":"replace", "path":"/enableForNewUsers", "value":"OFF" } ]

{ "status" : "INACTIVE", "type" : "FULL", "userCount" : 3, "contact" : { "enterprise-name" : "Example Networks", "phone" : "8571234567", "address" : "Test Way 123", "contact-name" : "John Smith", "contact-email" : "[email protected]" }, "enableForNewUsers" : "OFF" }

Encryption Service Fields The following fields indicate different settings and flags for handling Encryption through the API:

Field Name Explanation Permitted Values

status The current status of the encryption service

ACTIVE INACTIVE

enableForNewUsers Should encryption be activated for new users?

ON OFF

enableForAllUsers Should encryption be activated for all existing users?

true false

policies Different policies applicable to the encryption service

policies └ ssn

Contains social security numbers ON OFF

policies └ hipaa

Violates HIPAA ON OFF

policies └ personal_financial_info

Violates financial services regulations ON OFF

policies └ profanity

Contains profanity ON OFF

policies └ violates_uk

Violates UK privacy policy ON OFF

policies └ ca_privacy_law

Violates California privacy law ON OFF

policies └ ma_privacy_law

Violates Massachusetts privacy law ON OFF

policies └ nv_privacy_law

Violates Nevada privacy law ON OFF

policies └ wa_privacy_law

Violates Washington privacy law ON OFF

Page 15: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 15

forcePhrases Phrases to force encryption when added to the subject of a message

OFF ENCRYPTMAIL ENCRYPTEDEMAIL ONE_SECURE1 ECRYPTTHIS ENCRYPTSECURE SECUREMAIL SECUREMESSAGE

Create the Encryption Service for an Enterprise The following POST request illustrates how the Encryption service can be created for a given enterprise:

POST {API-URL}/enterprises/{ENTERPRISE-ID}/services/encryption

Request data Response: HTTP/1.1 200 OK { "status":"ACTIVE", "enableForNewUsers":"OFF", "enableForAllUsers":true, "policies":{ "ssn":"OFF", "hipaa":"OFF", "personal_financial_info":"OFF", "profanity":"OFF", "violates_uk":"OFF", "ca_privacy_law":"ON", "ma_privacy_law":"ON", "nv_privacy_law":"ON", "wa_privacy_law":"ON" }, "forcePhrases":"OFF" }

{ "status":"ACTIVE", "userCount":0, "enableForNewUsers":"OFF", "enableForAllUsers":true, "approvedStatus":"INACTIVE", "policies":{ "ssn":"OFF", "hipaa":"OFF", "personal_financial_info":"OFF", "profanity":"OFF", "violates_uk":"OFF", "ca_privacy_law":"ON", "ma_privacy_law":"ON", "nv_privacy_law":"ON", "wa_privacy_law":"ON" }, "forcePhrases":"OFF" }

Modify the Encryption Service for an Enterprise The Encryption service for a given enterprise can be modified (enable, disable, change settings, etc.)

through a PATCH request, as shown below:

PATCH {API-URL}/enterprises/{ENTERPRISE-ID}/services/encryption

Request data Response: HTTP/1.1 200 OK [ { "op":"replace", "path":"/enableForNewUsers", "value":"ON" }, { "op":"replace", "path":"/policies/ssn", "value":"ON" }, { "op":"replace", "path":"/forcePhrases", "value":"SECUREMESSAGE" } ]

{ "status":"ACTIVE", "userCount":0, "enableForNewUsers":"ON", "enableForAllUsers":true, "approvedStatus":"INACTIVE", "policies":{ "ssn":"ON", "hipaa":"OFF", "personal_financial_info":"OFF", "profanity":"OFF", "violates_uk":"OFF", "ca_privacy_law":"ON", "ma_privacy_law":"ON", "nv_privacy_law":"ON", "wa_privacy_law":"ON" }, "forcePhrases":"SECUREMESSAGE" }

Page 16: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 16

User Management This section contains information regarding the creation, retrieval, deletion, and updating of users.

User Fields The following table provides a complete list of all currently available settings and flags for users:

Field Name Explanation Permitted Values

name The enterprise name Any text

userId The ID assigned to this enterprise Digits (read-only)

enterpriseId The user’s enterprise ID Digits (read-only)

primaryAddress The user’s primary email address Any valid email address for this enterprise

type The user type MAILBOX DISTRIBUTION_LIST PUBLIC_FOLDER

policyGroups A list of policies associated with this user; currently, a higher-privileged policy will overwrite a lower-privileged policy

NORMAL_USER ENTERPRISE_ADMIN SOLUTION_PROVIDER DISTRIBUTOR

settings General settings applicable to this user

settings └ attachControlPanel

Should a control panel be added to inbound messages?

ON OFF

settings └ autoAotf

If enabled, creates a new Protective Address and uses it for all future communication with that contact

ON OFF

settings └ blockBulkEmails

Block incoming newsletters and bulk mailings

ON OFF

settings └ filter └ type

The filter type LOW MEDIUM HIGH CUSTOM

settings └ filter └ score

A custom filter score; if settings-filter-type is not set to CUSTOM, this score is not required

Number between 0 - 100

settings └ language

The user’s language setting ENGLISH SPANISH GERMAN FRENCH PORTUGUESE DUTCH ITALIAN

settings └ outboundNote └ tagType

If set to BOTTOM_TAG, the message in tagText and tagHTML will be appended to outgoing emails

NO_TAG BOTTOM_TAG

settings └ outboundNote └ tagText

Note appended to outbound non-HTML emails

Any text

settings └ outboundNote └ tagHTML

Note appended to outbound HTML emails HTML

Page 17: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 17

settings └ outlookFormatting

Format delivery for Microsoft Outlook ON OFF

settings └ reverseSecurity

Should reverse security be activated? ON OFF

settings └ securityEnforcement

How to handle spam REJECT_SEND_NOTICE FLAG_DELIVER_TO_INBOX FLAG_DELIVER_TO_DELEGATE VAPORIZE REJECT_SEND_NOTICE_QUAR REJECT_QUAR

settings └ securityStatus

Should security be enabled for this user? ON OFF

settings └ securityType

The mode this user should operate in FILTER ALLOW_LIST

settings └ spoofingPrevention

Blocks all messages that originate outside the enterprise but that appear to be both from and to domains in the enterprise

ON OFF

settings └ vaporizeSenderOnBL

Should messages on the block list be vaporized instead of quarantined?

DO_NOT_VAPORIZE VAPORIZE

quarantine Quarantine settings for this user

quarantine └ blatantSpamScore

Messages whose content filter scores are above this threshold will not be included in the daily quarantine summary

Number between 0 - 100

quarantine └ status

If enabled, quarantine summaries will be delivered to the user

ON OFF

quarantine └ redactSubject

Partially block quarantined message subject lines?

ON OFF

quarantine └ summaryDelivery

Force the quarantine summary to be sent even if the quarantine is empty?

FORCE_DELIVERY CONDITIONAL_DELIVERY

aliases A list of aliases associated with this user

aliases └ address

The email address of the alias Any valid email address for the user’s enterprise

aliases └ security

The security type for this alias PUBLIC PROTECTED DISABLED

services A list of active services for the given user ARCHIVING ENCRYPTION

Page 18: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 18

Create a User The above table provides a complete list of all currently available settings and flags for users. However,

only a small subset of these settings is required during user creation. The following POST request

illustrates the smallest possible JSON needed to create a new user. Any setting or flag not provided will

be inherited from the user’s enterprise:

POST {API-URL}/enterprises/{ENTERPRISE-ID}/users

Example request data Response: HTTP/1.1 200 OK { "name":"Example User", "primaryAddress":"[email protected]" }

{ "name":"Example User", "userId":"10905", "enterpriseId":"2273", "primaryAddress":"[email protected]", "type":"MAILBOX", "policyGroups":[ "NORMAL_USER" ], "settings":{ "attachControlPanel":"ON", "autoAotf":"OFF", "blockBulkEmails":"OFF", ... }, "quarantine":{ "blatantSpamScore":100, "status":"ON", ... }, "aliases":[ ], "services":[ ] }

Retrieve a User by ID Retrieving a user is a simple GET request. If no field parameter is provided, all applicable settings and

flags will be returned in one single JSON. The following request retrieves the fields name, settings, and

aliases.

GET {API-URL}/users/{USER-ID}?fields=name,settings,aliases

Example request data Response: HTTP/1.1 200 OK

{ "name":"Example User", "enterpriseId":"2273", "settings":{ "attachControlPanel":"ON", "autoAotf":"OFF", ... }, "aliases":[ { "address":"[email protected]", "security":"PROTECTED" }, { "address":"[email protected]", "security":"PUBLIC" } ] }

Page 19: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 19

Retrieve an User by Primary Address In addition to retrieving a user by ID, a user can also be retrieved by the user’s primary address. The

following request retrieves the user with the primary address [email protected].

GET {API-URL}/[email protected]

No request data Response: HTTP/1.1 200 OK

{ "name" : "Example Networks", "enterpriseId" : "1272", ... }

Update a User A user can have his or her settings and flags updated by sending a PATCH request, as shown below.

PATCH {API-URL}/users/{USER-ID}

Example request data Response: HTTP/1.1 200 OK [ { "op":"replace", "path":"/name", "value":"John Smith" }, { "op":"add", "path":"/policyGroups/-", "value":"ENTERPRISE_ADMIN" }, { "op":"replace", "path":"/settings/filter", "value":{ "type":"HIGH" } }, { "op":"replace", "path":"/quarantine/summaryDelivery", "value":"FORCE_DELIVERY" }, { "op":"add", "path":"/aliases/-", "value":{ "address":"[email protected]", "security":"PROTECTED" } } ]

{ "name" : "John Smith", "userId" : "10905", ... "policyGroups" : [ "ENTERPRISE_ADMIN" ], "settings" : { "attachControlPanel" : "ON", "autoAotf" : "OFF", "blockBulkEmails" : "OFF", "filter" : { "type" : "HIGH", "score" : 60 }, ... }, "quarantine" : { "blatantSpamScore" : 98, "status" : "ON", "redactSubjectFlag" : "OFF", "summaryDelivery" : "FORCE_DELIVERY" }, "aliases" : [ { "address" : "[email protected]", "security" : "PROTECTED" }, { "address" : "[email protected]", "security" : "PROTECTED" }, { "address" : "[email protected]", "security" : "PUBLIC" }, { "address" : "[email protected]", "security" : "PROTECTED" } ], "services" : [ "ARCHIVING", "ENCRYPTION" ] }

Delete a User Sending a DELETE request, as shown below, can perform deleting a user. Please note that all aliases

associated with the user will be deleted as well.

DELETE {API-URL}/users/{USER-ID}

No request data Response: HTTP/1.1 200 OK

Page 20: Reflexion RESTful API 1 - Amazon S3 · Currently, the Reflexion API offers token -based authentication in combination with user credentials. The authentication process is explained

Page 20

User Archiving Service Fields The fields below indicate different settings and flags for handling Archiving for users through the API:

Field name Explanation Allowed values

status The current status of the archiving service for this user

ACTIVE INACTIVE

admin Should the user have admin rights? ON OFF

globalSearch Should the user have global search capabilities?

ON OFF

Modify the Archiving Service for a User The Archiving service for a given user can be modified through a PATCH request, as shown below:

PATCH {API-URL}/users/{USER-ID}/services/archiving

Request data Response: HTTP/1.1 200 OK [ { "op":"replace", "path":"/status", "value":"ACTIVE" }, { "op":"replace", "path":"/globalSearch", "value":"ON" } ]

{ "status":"ACTIVE", "admin":"OFF", "globalSearch":"ON" }

User Encryption Service Fields The fields below indicate different settings and flags for handling Encryption for users through the API:

Field name Explanation Allowed values

status The current status of the encryption service for this user

ACTIVE INACTIVE

Modify the Encryption Service for a User The Encryption service for a given user can be modified through a PATCH request, as shown below:

PATCH {API-URL}/users/{USER-ID}/services/encryption

Request data Response: HTTP/1.1 200 OK [ { "op":"replace", "path":"/status", "value":"ACTIVE" } ]

{ "status":"ACTIVE" }