Syniverse Whitelisting Service API documentation version 1.0.0
https://api.syniverse.com/sws/v1
Syniverse Whitelisting Service
The Whitelisting service holds associated "endpoints" for a "companyId" plus "service" combination. A "service" is a Syniverse product offering. "Endpoints" validation is handled by SWS. A "service" within WLS needs to be provisioned using the "admin" APIs.
Administrative resources
Top level resource that aggregates administrative functions
This lists all template types registered with SWS.
Return all template types
Create an template type
get /admin/template-types
Return all template types
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"templates": {
"id": "templates",
"type": "array",
"items": [
{
"id": "0",
"type": "object",
"properties": {
"template_name": {
"id": "template_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"template_id": {
"id": "template_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"template_description": {
"id": "template_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"template_text": {
"id": "template_text",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,20}$"
}
},
"required": [
"template_name",
"template_id",
"template_description",
"template_text"
]
}
],
"required": [
"0"
]
}
},
"required": [
"templates"
]
}
Example:
{
"templates": [
{
"template_name": "IMN code",
"template_id": "sadfafd1133",
"template_description": "Use confirmation code",
"template_text": "Your confirmation code is: { TEXT }"
},
{
"template_name": "IMN pin",
"template_id": "1sadfafd1133",
"template_description": "Send a pin code",
"template_text": "Your pin code is: { TEXT }"
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
post /admin/template-types
Create an template type
Body
Type: application/json
Example:
{
"template_name": "IMN",
"template_description": "IMN SMS text HTTP",
"template_text": "Your confirmation code is: { TEXT }"
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"operation": {
"id": "operation",
"type": "string",
"pattern": "^(success|fail)"
},
"templates": {
"id": "templates",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"template_name": {
"id": "template_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"template_id": {
"id": "template_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"template_description": {
"id": "template_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"template_text": {
"id": "template_text",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,20}$"
}
}
}
}
},
"required": [
"operation",
"templates"
]
}
Example:
{
"operation": "success",
"templates": [
{
"template_name": "IMN",
"template_id": "sadfafd1133",
"template_description": "IMN SMS text HTTP",
"template_text": "Your confirmation code is: { TEXT }"
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
Operate on template type by its ID.
Return tempalte by ID
Remove an template
Update template type
get /admin/template-types/{template_id}
Return tempalte by ID
URI Parameters
- template_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"templates": {
"id": "templates",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"template_name": {
"id": "template_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"template_id": {
"id": "template_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"template_description": {
"id": "template_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"template_text": {
"id": "template_text",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,20}$"
}
},
"required": [
"template_name",
"template_id",
"template_description",
"template_text"
]
},
"required": [
"0"
]
}
},
"required": [
"templates"
]
}
Example:
{
"templates": [
{
"template_name": "IMN",
"template_id": "sadfafd1133",
"template_description": "IMN SMS text HTTP",
"template_text": "Your confirmation code is: { TEXT }"
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
delete /admin/template-types/{template_id}
Remove an template
URI Parameters
- template_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"operation": {
"id": "operation",
"type": "string",
"pattern": "^(success|fail)"
}
},
"required": [
"operation"
]
}
Example:
{
"operation": "success"
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
put /admin/template-types/{template_id}
Update template type
URI Parameters
- template_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"template_name": {
"id": "template_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"template_description": {
"id": "template_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"template_text": {
"id": "template_text",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,20}$"
}
},
"required": [
"template_name",
"template_description",
"template_text"
]
}
Example:
{
"template_name": "IMN",
"template_description": "IMN SMS text HTTP",
"template_text": "Your confirmation code is: { TEXT }"
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
This lists all channel types registered with SWS.
Return all channel types
Create an channel type
get /admin/channel-types
Return all channel types
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"channels": {
"id": "channels",
"type": "array",
"items": [
{
"id": "0",
"type": "object",
"properties": {
"channel_name": {
"id": "channel_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"channel_id": {
"id": "channel_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"channel_description": {
"id": "channel_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"channel_protocol": {
"id": "channel_protocol",
"type": "string",
"pattern": "^(https|http)"
},
"template_id": {
"id": "template_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"channel_endpoint": {
"id": "channel_endpoint",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"channel_meta": {
"id": "channel_meta",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
}
},
"required": [
"channel_name",
"channel_id",
"channel_description",
"channel_protocol",
"template_id",
"channel_endpoint",
"channel_meta"
]
}
],
"required": [
"0"
]
}
},
"required": [
"channels"
]
}
Example:
{
"channels": [
{
"channel_name": "IMN",
"channel_id": "IMN-asdf601-11",
"channel_description": "IMN SMS text HTTP",
"channel_protocol": "HTTPS",
"template_id": "IMN-template-asdf601-11",
"channel_endpoint": "text.mes.synivsere.com/IMNSend",
"channel_meta": "credentials, other info"
},
{
"channel_name": "Synvierse email server",
"channel_id": "EMAIL-asdf601-11",
"channel_description": "Syniverse email server - corporate",
"channel_protocol": "smtp",
"template_id": "EMAIL-template-asdf601-11",
"channel_endpoint": "smtp.syniverse.com",
"channel_meta": "credentials, other info"
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
post /admin/channel-types
Create an channel type
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"channel_name": {
"id": "channel_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"template_id": {
"id": "template_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"channel_description": {
"id": "channel_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"channel_protocol": {
"id": "channel_protocol",
"type": "string",
"pattern": "^(http|https)"
},
"channel_endpoint": {
"id": "channel_endpoint",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"channel_meta": {
"id": "channel_meta",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
}
},
"required": [
"channel_name",
"template_id",
"channel_description",
"channel_protocol",
"channel_endpoint",
"channel_meta"
]
}
Example:
{
"channel_name": "IMN",
"template_id": "IMN-template-asdf601-11",
"channel_description": "IMN SMS text HTTP",
"channel_protocol": "HTTPS",
"channel_endpoint": "text.mes.synivsere.com/IMNSend",
"channel_meta": "credentials, other info"
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"operation": {
"id": "operation",
"type": "string",
"pattern": "^(success|fail)"
},
"channels": {
"id": "channels",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"channel_name": {
"id": "channel_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"channel_id": {
"id": "channel_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"template_id": {
"id": "template_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"channel_description": {
"id": "channel_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"channel_protocol": {
"id": "channel_protocol",
"type": "string",
"pattern": "^(https|http)"
},
"channel_endpoint": {
"id": "channel_endpoint",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"channel_meta": {
"id": "channel_meta",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
}
}
}
}
},
"required": [
"operation",
"channels"
]
}
Example:
{
"operation": "success",
"channels": [
{
"channel_name": "IMN",
"channel_id": "IMN-asdf601-11",
"template_id": "IMN-template-asdf601-11",
"channel_description": "IMN SMS text HTTP",
"channel_protocol": "HTTPS",
"channel_endpoint": "text.mes.synivsere.com/IMNSend",
"channel_meta": "credentials, other info"
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
Operate on channel type by its ID.
Return channel by ID
Remove an channel
Update entry type
get /admin/channel-types/{channel_id}
Return channel by ID
URI Parameters
- channel_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"channels": {
"id": "channels",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"channel_name": {
"id": "channel_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"channel_id": {
"id": "channel_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"channel_description": {
"id": "channel_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"channel_protocol": {
"id": "channel_protocol",
"type": "string",
"pattern": "^(https|http)"
},
"template_id": {
"id": "template_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"channel_endpoint": {
"id": "channel_endpoint",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"channel_meta": {
"id": "channel_meta",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
}
},
"required": [
"channel_name",
"channel_id",
"channel_description",
"channel_protocol",
"template_id",
"channel_endpoint",
"channel_meta"
]
},
"required": [
"0"
]
}
},
"required": [
"channels"
]
}
Example:
{
"channels": [
{
"channel_name": "IMN",
"channel_id": "IMN-asdf601-11",
"channel_description": "IMN SMS text HTTP",
"channel_protocol": "HTTPS",
"template_id": "IMN-template-asdf601-11",
"channel_endpoint": "text.mes.synivsere.com/IMNSend",
"channel_meta": "credentials, other info"
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
delete /admin/channel-types/{channel_id}
Remove an channel
URI Parameters
- channel_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"operation": {
"id": "operation",
"type": "string",
"pattern": "^(success|fail)"
}
},
"required": [
"operation"
]
}
Example:
{
"operation": "success"
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
put /admin/channel-types/{channel_id}
Update entry type
URI Parameters
- channel_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"channel_name": {
"id": "channel_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"template_id": {
"id": "template_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"channel_description": {
"id": "channel_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"channel_protocol": {
"id": "channel_protocol",
"type": "string",
"pattern": "^(https|http)"
},
"channel_endpoint": {
"id": "channel_endpoint",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"channel_meta": {
"id": "channel_meta",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
}
},
"required": [
"channel_name",
"template_id",
"channel_description",
"channel_protocol",
"channel_endpoint",
"channel_meta"
]
}
Example:
{
"channel_name": "IMN",
"template_id": "IMN-template-asdf601-11",
"channel_description": "IMN SMS text HTTP",
"channel_protocol": "HTTPS",
"channel_endpoint": "text.mes.synivsere.com/IMNSend",
"channel_meta": "credentials, other info"
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
This lists all entry types registered with SWS.
Return all entry types
Create an entry type
get /admin/entry-types
Return all entry types
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"types": {
"id": "types",
"type": "array",
"items": [
{
"id": "0",
"type": "object",
"properties": {
"type_name": {
"id": "type_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"type_id": {
"id": "type_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"channel_id": {
"id": "channel_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"type_description": {
"id": "type_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"type_validator": {
"id": "type_validator",
"type": "array",
"items": {
"id": "0",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
}
}
},
"required": [
"type_name",
"type_id",
"channel_id",
"type_description",
"type_validator"
]
}
],
"required": [
"0"
]
}
},
"required": [
"types"
]
}
Example:
{
"types": [
{
"type_name": "MDN",
"type_id": "ad124124sdaf",
"channel_id": "IMN-asdf601-11",
"type_description": "Mobile numbers for SCG",
"type_validator": [ "^(\\+\\d{1,3}[- ]?)?\\d{10}$" ]
},
{
"type_name": "Email",
"type_id": "1ad124124sdaf",
"channel_id": "SMTP-asdf601-11",
"type_description": "Email addresses for SCG",
"type_validator": [ "^(\\+\\d{1,3}[- ]?)?\\d{10}$" ]
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
post /admin/entry-types
Create an entry type
Body
Type: application/json
Example:
{
"type_name": "MDN",
"channel_id": "IMN-asdf601-11",
"type_description": "Mobile numbers for SCG"
"type_validator": [ "^(\\+\\d{1,3}[- ]?)?\\d{10}$" ]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"operation": {
"id": "operation",
"type": "string",
"pattern": "^(success|fail)"
},
"types": {
"id": "types",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"type_name": {
"id": "type_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"type_id": {
"id": "type_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"channel_id": {
"id": "channel_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"type_description": {
"id": "type_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"type_validator": {
"id": "type_validator",
"type": "array",
"items": {
"id": "0",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
}
}
}
}
}
},
"required": [
"operation",
"types"
]
}
Example:
{
"operation": "success",
"types": [
{
"type_name": "MDN",
"type_id": "ad124124sdaf",
"channel_id": "IMN-asdf601-11",
"type_description": "Mobile numbers for SCG",
"type_validator": [ "^(\\+\\d{1,3}[- ]?)?\\d{10}$" ]
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
Operate on entry type by its ID.
Return entry type by ID
Remove an entry type
Update entry type
get /admin/entry-types/{type_id}
Return entry type by ID
URI Parameters
- type_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"types": {
"id": "types",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"type_name": {
"id": "type_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"type_id": {
"id": "type_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"channel_id": {
"id": "channel_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"type_description": {
"id": "type_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"type_validator": {
"id": "type_validator",
"type": "array",
"items": {
"id": "0",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
}
}
},
"required": [
"type_name",
"type_id",
"channel_id",
"type_description",
"type_validator"
]
},
"required": [
"0"
]
}
},
"required": [
"types"
]
}
Example:
{
"types": [
{
"type_name": "Email",
"type_id": "1ad124124sdaf",
"channel_id": "SMTP-asdf601-11",
"type_description": "Email addresses for SCG",
"type_validator": [ "^(\\+\\d{1,3}[- ]?)?\\d{10}$" ]
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
delete /admin/entry-types/{type_id}
Remove an entry type
URI Parameters
- type_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"operation": {
"id": "operation",
"type": "string",
"pattern": "^(success|fail)"
}
},
"required": [
"operation"
]
}
Example:
{
"operation": "success"
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
put /admin/entry-types/{type_id}
Update entry type
URI Parameters
- type_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"type_name": {
"id": "type_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"type_id": {
"id": "type_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"channel_id": {
"id": "channel_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"type_description": {
"id": "type_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"type_validator": {
"id": "type_validator",
"type": "array",
"items": {
"id": "0",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
}
}
},
"required": [
"type_name",
"type_id",
"channel_id",
"type_description",
"type_validator"
]
}
Example:
{
"type_name": "Email",
"type_id": "1ad124124sdaf",
"channel_id": "SMTP-asdf601-11",
"type_description": "Email addresses for SCG",
"type_validator": [ "^(\\+\\d{1,3}[- ]?)?\\d{10}$" ]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
This lists all services that are registered with SWS.
Return all white_list type
Create a service
get /admin/whitelist-type
Return all white_list type
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"types": {
"id": "types",
"type": "array",
"items": [
{
"id": "0",
"type": "object",
"properties": {
"whitelist_name": {
"id": "whitelist_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"whitelist_description": {
"id": "whitelist_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"type_id": {
"id": "type_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"whitelist_id": {
"id": "whitelist_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"validation_expires": {
"id": "validation_expires",
"type": "integer",
"pattern": "^[0-9]+"
},
"limit_entries": {
"id": "limit_entries",
"type": "integer",
"pattern": "^[0-9]+"
}
},
"required": [
"whitelist_name",
"whitelist_description",
"type_id",
"whitelist_id",
"validation_expires",
"limit_entries"
]
}
],
"required": [
"0"
]
}
},
"required": [
"services"
]
}
Example:
{
"types": [
{
"whitelist_name": "SCG MDN",
"whitelist_description": "Mobile numbers for SCG",
"type_id": "asdfl1606",
"whitelist_id": "a11sdfl1606",
"validation_expires": 7200,
"limit_entries": 5
},
{
"whitelist_name": "SCG Email",
"whitelist_description": "Email addresses for SCG",
"type_id": "1asdfl1606",
"whitelist_id": "aasdsdfl1606",
"validation_expires": 14400,
"limit_entries": 5
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
post /admin/whitelist-type
Create a service
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"types": {
"id": "types",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"whitelist_description": {
"id": "whitelist_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"type_id": {
"id": "type_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"validation_expires": {
"id": "validation_expires",
"type": "integer",
"pattern": "^[0-9]+"
},
"limit_entries": {
"id": "limit_entries",
"type": "integer",
"pattern": "^[0-9]+"
}
},
"required": [
"whistlist_name",
"whitelist_description",
"type_id",
"validation_expires",
"limit_entries"
]
}
Example:
{
"whistlist_name": "SCG MDN",
"whitelist_description": "Mobile numbers for SCG",
"type_id": "asdfl1606",
"validation_expires": 7200,
"limit_entries": 5
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"operation": {
"id": "operation",
"type": "string",
"pattern": "^(success|fail)"
},
"types": {
"id": "types",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"whistlist_name": {
"id": "whistlist_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"whitelist_id": {
"id": "whitelist_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"whitelist_description": {
"id": "whitelist_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"type_id": {
"id": "type_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"validation_expires": {
"id": "validation_expires",
"type": "integer",
"pattern": "^[0-9]+"
},
"limit_entries": {
"id": "limit_entries",
"type": "integer",
"pattern": "^[0-9]+"
}
}
}
}
},
"required": [
"operation",
"types"
]
}
Example:
{
"operation": "success",
"types": [
{
"whistlist_name": "SCG1",
"whitelist_id": "adsdaf",
"whitelist_description": "Mobile numbers for SCG",
"type_id": "asdfl1606",
"validation_expires": 7200,
"limit_entries": 5
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
Operate on whitelist by its ID.
Return whitelist type
Remove a whitelist type
Update whitelist type
get /admin/whitelist-type/{whitelist_id}
Return whitelist type
URI Parameters
- whitelist_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"types": {
"id": "types",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"whitelist_name": {
"id": "whitelist_name",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,10}$"
},
"whitelist_id": {
"id": "whitelist_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"whitelist_description": {
"id": "whitelist_description",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"type_id": {
"id": "type_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"validation_expires": {
"id": "validation_expires",
"type": "integer",
"pattern": "^[0-9]+"
},
"limit_entries": {
"id": "limit_entries",
"type": "integer",
"pattern": "^[0-9]+"
}
},
"required": [
"whitelist_name",
"whitelist_id",
"whitelist_description",
"type_id",
"validation_expires",
"limit_entries"
]
},
"required": [
"0"
]
}
},
"required": [
"types"
]
}
Example:
{
"types": [
{
"whitelist_name": "SCG MDN",
"whitelist_id": "Sasdfjkl06",
"whitelist_description": "Mobile numbers for SCG",
"type_id": "asdfl1606",
"validation_expires": 9200,
"service_limit_entries": 5
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
delete /admin/whitelist-type/{whitelist_id}
Remove a whitelist type
URI Parameters
- whitelist_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"operation": {
"id": "operation",
"type": "string",
"pattern": "^(success|fail)"
}
},
"required": [
"operation"
]
}
Example:
{
"operation": "success"
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
put /admin/whitelist-type/{whitelist_id}
Update whitelist type
URI Parameters
- whitelist_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://jsonschema.net",
"type": "object",
"properties": {
"whitelist_name": {
"id": "http://jsonschema.net/whitelist_name",
"pattern": "^[A-Za-z0-9-]{1,10}$",
"type": "string"
},
"whitelist_description": {
"id": "http://jsonschema.net/whitelist_description",
"pattern": "^[A-Za-z0-9-]{1,24}$",
"type": "string"
},
"type_id": {
"id": "http://jsonschema.net/type_id",
"pattern": "^[0-9-a-z]{1,10}$",
"type": "string"
},
"validation_expires": {
"id": "http://jsonschema.net/limit_entries",
"pattern": "^[0-9]{1,10}$",
"type": "integer"
},
"limit_entries": {
"id": "http://jsonschema.net/limit_entries",
"pattern": "^[0-9]{1,10}$",
"type": "integer"
}
},
"required": [
"whitelist_name",
"whitelist_description",
"type_id",
"validation_expires",
"limit_entries"
]
}
Example:
{
"whitelist_name": "SCG MDN",
"whitelist_description": "Mobile numbers for SCG",
"type_id": "asdfl1606",
"validation_expires": 9200,
"limit_entries": 5
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
Whitelist resources
Top level resource that aggregates whitelist functions
Register/retrieve entity associations with a whitelist_id
Return all whitelist entities
Create an whitelist entry
get /whitelist/{whitelist_id}
Return all whitelist entities
URI Parameters
- whitelist_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"whitelist": {
"id": "whitelist",
"type": "array",
"items": [
{
"id": "0",
"type": "object",
"properties": {
"entity": {
"id": "entity",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"entity_id": {
"id": "entity_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"created": {
"id": "created",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"updated": {
"id": "updated",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"verified": {
"id": "verified",
"type": "boolean",
"pattern": "^(true,false)"
}
},
"required": [
"entity",
"entity_id",
"created",
"updated",
"verified"
]
}
],
"required": [
"0"
]
}
},
"required": [
"whitelist"
]
}
Example:
{
"whitelist": [
{
"entity": "+18313255793",
"entity_id": "asdfasd601601243",
"created": "2013-05-10T01:30:30.518Z",
"updated": "2013-05-10T01:30:30.518Z",
"verified": false
},
{
"entity": "+1831324152",
"entity_id": "112asdfasd601601243",
"created": "2013-05-10T01:30:30.518Z",
"updated": "2013-05-10T01:30:30.518Z",
"verified": true
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
post /whitelist/{whitelist_id}
Create an whitelist entry
URI Parameters
- whitelist_id: required (string)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"entity": {
"id": "entity",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
}
},
"required": [
"entity"
]
}
Example:
{
"entity": "+18323255793"
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"operation": {
"id": "operation",
"type": "string",
"pattern": "^(success|fail)"
},
"transaction_id": {
"id": "transaction_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"whitelist": {
"id": "whitelist",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"entity": {
"id": "entity",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"entity_id": {
"id": "entity_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"created": {
"id": "created",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"updated": {
"id": "updated",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"verified": {
"id": "verified",
"type": "boolean",
"pattern": "^(true,false)"
}
}
}
}
},
"required": [
"operation",
"transaction_id",
"whitelist"
]
}
Example:
{
"operation": "success",
"transaction_id": "aljksdjkl60060660",
"whitelist": [
{
"entity": "+18313255793",
"entity_id": "asdfasfd1111",
"created": "2013-05-10T01:30:30.518Z",
"updated": "2013-05-10T01:30:30.518Z",
"verified": false
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
Operate on an entity_id
Return whitelist entity
Delete an entity
get /whitelist/{whitelist_id}/{entity_id}
Return whitelist entity
URI Parameters
- whitelist_id: required (string)
- entity_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"whitelist": {
"id": "whitelist",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"entity": {
"id": "entity",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"entity_id": {
"id": "entity_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"created": {
"id": "created",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"updated": {
"id": "updated",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"verified": {
"id": "verified",
"type": "boolean",
"pattern": "^(true,false)"
}
},
"required": [
"entity",
"entity_id",
"created",
"updated",
"verified"
]
},
"required": [
"0"
]
}
},
"required": [
"whitelist"
]
}
Example:
{
"whitelist": [
{
"entity": "+18313255793",
"entity_id": "asdfasd601601243",
"created": "2013-05-10T01:30:30.518Z",
"updated": "2013-05-10T01:30:30.518Z",
"verified": false
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
delete /whitelist/{whitelist_id}/{entity_id}
Delete an entity
URI Parameters
- whitelist_id: required (string)
- entity_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"operation": {
"id": "operation",
"type": "string",
"pattern": "^(success|fail)"
}
},
"required": [
"operation"
]
}
Example:
{
"operation": "success"
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
Verify/list entity association
Return state of entity associated with the transcation_id
Validate token for a transaction_id
get /whitelist/{whitelist_id}/{entity_id}/{transaction_id}
Return state of entity associated with the transcation_id
URI Parameters
- whitelist_id: required (string)
- entity_id: required (string)
- transaction_id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"whitelist": {
"id": "whitelist",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"entity": {
"id": "entity",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"entity_id": {
"id": "entity_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"created": {
"id": "created",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"updated": {
"id": "updated",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"verified": {
"id": "verified",
"type": "boolean",
"pattern": "^(true,false)"
}
},
"required": [
"entity",
"entity_id",
"created",
"updated",
"verified"
]
},
"required": [
"0"
]
}
},
"required": [
"whitelist"
]
}
Example:
{
"whitelist": [
{
"entity": "+18313255793",
"entity_id": "asdfasfd1111",
"created": "2013-05-10T01:30:30.518Z",
"updated": "2013-05-10T01:30:30.518Z",
"verified": false
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.
post /whitelist/{whitelist_id}/{entity_id}/{transaction_id}
Validate token for a transaction_id
URI Parameters
- whitelist_id: required (string)
- entity_id: required (string)
- transaction_id: required (string)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"pin": {
"id": "pin",
"type": "integer",
"pattern": "^[0-9]+{5}"
}
},
"required": [
"pin"
]
}
Example:
{
"pin": "1235"
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"operation": {
"id": "operation",
"type": "string",
"pattern": "^(success|fail)"
},
"whitelist": {
"id": "whitelist",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"entity": {
"id": "entity",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"entity_id": {
"id": "entity_id",
"type": "string",
"pattern": "^[0-9-a-z]{1,10}$"
},
"created": {
"id": "created",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"updated": {
"id": "updated",
"type": "string",
"pattern": "^[A-Za-z0-9-]{1,24}$"
},
"verified": {
"id": "verified",
"type": "boolean",
"pattern": "^(true,false)"
}
}
}
}
},
"required": [
"operation",
"whitelist"
]
}
Example:
{
"operation": "success",
"whitelist": [
{
"entity": "+18313255793",
"entity_id": "asdfasfd1111",
"created": "2013-05-10T01:30:30.518Z",
"updated": "2013-05-10T01:30:30.518Z",
"verified": true
}
]
}
HTTP status code 400
Bad Request. The request could not be understood by the server.
HTTP status code 401
"Unauthorized. The request requires user authentication."
HTTP status code 404
"Not Found. The server has not found anything matching the Request-URI."
HTTP status code 503
Server Unavailable.