support-notifications API documentation version 1.1.x
http://localhost:48060/api
Welcome
Welcome to the Alerts and Notifcations Microservice API Documentation.
Notification
Receive Alerts or Notifications. If the severity is CRITICAL, the Notifications are processed (distributed) immediately. Or, the Notification is processed in batch.
post /v1/notification
Receive Alerts or Notifications. If the severity is CRITICAL, the Notifications are processed (distributed) immediately. Or, the Notification is processed in batch.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
}
Example:
{
"slug": "notice-test-001",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"labels": [
"cool",
"test"
]
}
HTTP status code 202
If Alerts and Notifications Service is available, it always returns 202 Accepted to clients with the new ID to indicate the Notification has been received.
Body
Type: text/plain
Example:
fd388f69-9393-49a7-9962-d70938438b47
HTTP status code 409
The slug is duplicate. Please try another one.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query a specific Notification by slug.
Delete a specific Notification by slug.
get /v1/notification/slug/{slug}
Query a specific Notification by slug.
URI Parameters
- slug: required (string)
Slug is a meaningful identifier provided by client, and is case insensitive for query.
Example:
notice-test-001
HTTP status code 200
Return a Notification
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
}
Example:
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"slug": "notice-test-001",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"created": 1469175494527,
"modified": 1469175494527
}
HTTP status code 404
The targeted resource is not found.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
delete /v1/notification/slug/{slug}
Delete a specific Notification by slug.
URI Parameters
- slug: required (string)
Slug is a meaningful identifier provided by client, and is case insensitive for query.
Example:
notice-test-001
HTTP status code 200
Return "True" to represent successful.
Body
Type: application/json
Example:
true
HTTP status code 404
The targeted resource is not found.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Delete the proccessed Notifications if the current timestamp minus their last modification timestamp is less than the age parameter, and the corresponding Transmissions will also be deteled. Please notice this API is only for proccessed Notifications (status = PROCCESSED). If the deletion purpose includes each kind of Notifications, please refer to /cleanup API.
delete /v1/notification/age/{age}
Delete the proccessed Notifications if the current timestamp minus their last modification timestamp is less than the age parameter, and the corresponding Transmissions will also be deteled. Please notice this API is only for proccessed Notifications (status = PROCCESSED). If the deletion purpose includes each kind of Notifications, please refer to /cleanup API.
URI Parameters
- age: required (number)
Specify the age of Notification, and the format is in milliseconds.
Example:
2592000000
HTTP status code 200
Return "True" to represent successful.
Body
Type: application/json
Example:
true
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Notifications by sender name with limited returned records.
get /v1/notification/sender/{sender}/{limit}
Query the Notifications by sender name with limited returned records.
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
- sender: required (string)
The sender name of the Subscription, which could be partially matched, and is case insensitive for query.
Example:
Management
HTTP status code 200
Return a Notification array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Notification",
"type": "array",
"items": {
"$ref": "#/definitions/Notification"
},
"definitions": {
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
}
}
}
Example:
[
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"slug": "notice-test-001",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"created": 1469175494527,
"modified": 1469175494527
},
{
"id": "dd5de4ff-ae3b-44b1-997d-5d410cd22e1c",
"slug": "notice-test-002",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification Again!",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"created": 1469175499898,
"modified": 1469175499898
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Notifications by creation timestamp between start date and end date.
get /v1/notification/start/{start}/end/{end}/{limit}
Query the Notifications by creation timestamp between start date and end date.
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
- start: required (number)
Start date in long form.
Example:
1469175494521
- end: required (number)
End date in long form.
Example:
1469175499899
HTTP status code 200
Return a Notification array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Notification",
"type": "array",
"items": {
"$ref": "#/definitions/Notification"
},
"definitions": {
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
}
}
}
Example:
[
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"slug": "notice-test-001",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"created": 1469175494527,
"modified": 1469175494527
},
{
"id": "dd5de4ff-ae3b-44b1-997d-5d410cd22e1c",
"slug": "notice-test-002",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification Again!",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"created": 1469175499898,
"modified": 1469175499898
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Notifications by creation timestamp after start date.
get /v1/notification/start/{start}/{limit}
Query the Notifications by creation timestamp after start date.
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
- start: required (number)
Start date in long form.
Example:
1469175494521
HTTP status code 200
Return a Notification array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Notification",
"type": "array",
"items": {
"$ref": "#/definitions/Notification"
},
"definitions": {
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
}
}
}
Example:
[
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"slug": "notice-test-001",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"created": 1469175494527,
"modified": 1469175494527
},
{
"id": "dd5de4ff-ae3b-44b1-997d-5d410cd22e1c",
"slug": "notice-test-002",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification Again!",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"created": 1469175499898,
"modified": 1469175499898
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Notifications by creation timestamp before end date.
get /v1/notification/end/{end}/{limit}
Query the Notifications by creation timestamp before end date.
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
- end: required (number)
End date in long form.
Example:
1469175499899
HTTP status code 200
Return a Notification array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Notification",
"type": "array",
"items": {
"$ref": "#/definitions/Notification"
},
"definitions": {
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
}
}
}
Example:
[
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"slug": "notice-test-001",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"created": 1469175494527,
"modified": 1469175494527
},
{
"id": "dd5de4ff-ae3b-44b1-997d-5d410cd22e1c",
"slug": "notice-test-002",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification Again!",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"created": 1469175499898,
"modified": 1469175499898
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Notifications by labels matching any one of them.
get /v1/notification/labels/{labels}/{limit}
Query the Notifications by labels matching any one of them.
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
- labels: required (string)
Accept multiple labels separated by comma.
Example:
test,Dell,IoT
HTTP status code 200
Return a Notification array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Notification",
"type": "array",
"items": {
"$ref": "#/definitions/Notification"
},
"definitions": {
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
}
}
}
Example:
[
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"slug": "notice-test-001",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"created": 1469175494527,
"modified": 1469175494527
},
{
"id": "dd5de4ff-ae3b-44b1-997d-5d410cd22e1c",
"slug": "notice-test-002",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification Again!",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"created": 1469175499898,
"modified": 1469175499898
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Fetch the unprocessed Notifications (status = NEW).
get /v1/notification/new/{limit}
Fetch the unprocessed Notifications (status = NEW).
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
HTTP status code 200
Return a Notification array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Notification",
"type": "array",
"items": {
"$ref": "#/definitions/Notification"
},
"definitions": {
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
}
}
}
Example:
[
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"slug": "notice-test-001",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"status": "NEW",
"labels": [
"cool",
"test"
],
"created": 1469175494527,
"modified": 1469175494527
},
{
"id": "dd5de4ff-ae3b-44b1-997d-5d410cd22e1c",
"slug": "notice-test-002",
"sender": "System Management",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification Again!",
"status": "NEW",
"labels": [
"cool",
"test"
],
"created": 1469175499898,
"modified": 1469175499898
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Subscription
List all Subscriptions.
Create a new Subscritpion.
Update a specific Subscription according to the slug in request body, and the Boolean value "true" will be returned to indicate updating successfully. If the slug doesn't exit, the 404 NotFound error will be returned.
get /v1/subscription
List all Subscriptions.
HTTP status code 200
Return a Subscription array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Subscription",
"type": "array",
"items": {
"$ref": "#/definitions/Subscription"
},
"definitions": {
"Subscription":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Subscription Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"receiver": {
"type": "string"
},
"description": {
"type": "string"
},
"subscribedCategories": {
"type": "array",
"items": { "enum": ["SECURITY","HW_HEALTH","SW_HEALTH"] },
"uniqueItems": true
},
"subscribedLabels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"channels": {
"type": "array",
"items": {
"type": "object",
"anyOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","receiver","channels"]
},
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
},
"contentType": {
"type": "string"
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
}
}
}
Example:
[
{
"id": "dd5de4ff-ae3b-44b1-997d-5d410cd22e1c",
"slug": "sys-admin",
"receiver": "System Administrator",
"description": "The system administrator",
"subscribedCategories": [
"SECURITY",
"HW_HEALTH",
"SW_HEALTH"
],
"subscribedLabels": [
"Dell",
"IoT",
"test"
],
"channels": [
{
"type": "REST",
"url": "http://abc.def/alert",
"httpMethod": "POST"
},
{
"type": "EMAIL",
"mailAddresses": [
"cloud@abc.def",
"jack@abc.def"
]
}
],
"created": 1472121841753,
"modified": 1472121841753
},
{
"id": "eb5771d3-93f6-4b14-b285-9ed836ed5e35",
"slug": "sw-admin",
"receiver": "Software Administrator",
"description": "The software administrator",
"subscribedCategories": [
"SW_HEALTH"
],
"subscribedLabels": [
"IoT"
],
"channels": [
{
"type": "EMAIL",
"mailAddresses": [
"david@abc.def"
]
}
],
"created": 1472121850240,
"modified": 1472121850240
}
]
post /v1/subscription
Create a new Subscritpion.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Subscription Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"receiver": {
"type": "string"
},
"description": {
"type": "string"
},
"subscribedCategories": {
"type": "array",
"items": { "enum": ["SECURITY","HW_HEALTH","SW_HEALTH"] },
"uniqueItems": true
},
"subscribedLabels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"channels": {
"type": "array",
"items": {
"type": "object",
"anyOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","receiver","channels"],
"definitions": {
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
},
"contentType": {
"type": "string"
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
}
}
}
Example:
{
"slug": "sys-admin",
"receiver": "System Administrator",
"subscribedCategories": [
"SECURITY",
"HW_HEALTH",
"SW_HEALTH"
],
"subscribedLabels": [
"Dell",
"IoT",
"test"
],
"channels": [
{
"type": "REST",
"url": "http://abc.def/alert"
},
{
"type": "EMAIL",
"mailAddresses": [
"cloud@abc.def",
"jack@abc.def"
]
}
]
}
HTTP status code 201
Return the slug when the Subscription has been created successfully.
Body
Type: text/plain
Example:
sys-admin
HTTP status code 409
The slug is duplicate. Please try another one.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
put /v1/subscription
Update a specific Subscription according to the slug in request body, and the Boolean value "true" will be returned to indicate updating successfully. If the slug doesn't exit, the 404 NotFound error will be returned.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Subscription Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"receiver": {
"type": "string"
},
"description": {
"type": "string"
},
"subscribedCategories": {
"type": "array",
"items": { "enum": ["SECURITY","HW_HEALTH","SW_HEALTH"] },
"uniqueItems": true
},
"subscribedLabels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"channels": {
"type": "array",
"items": {
"type": "object",
"anyOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","receiver","channels"],
"definitions": {
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
},
"contentType": {
"type": "string"
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
}
}
}
Example:
{
"slug": "sys-admin",
"receiver": "System Administrator",
"subscribedCategories": [
"SECURITY",
"HW_HEALTH",
"SW_HEALTH"
],
"subscribedLabels": [
"Dell",
"IoT",
"test"
],
"channels": [
{
"type": "REST",
"url": "http://abc.def/alert"
},
{
"type": "EMAIL",
"mailAddresses": [
"cloud@abc.def",
"jack@abc.def"
]
}
]
}
HTTP status code 200
Return "True" to represent successful.
Body
Type: application/json
Example:
true
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Fetch a specific subscription by database specified id - returning null if none are found. ServiceException (HTTP 500) for unknown or unanticipated issues
Delete a subscription given its database generated ID. NotFoundException (HTTP 404) if the subscription cannot be found by ID. ServiceException (HTTP 500) for unknown or unanticipated issues.
get /v1/subscription/{id}
Fetch a specific subscription by database specified id - returning null if none are found. ServiceException (HTTP 500) for unknown or unanticipated issues
URI Parameters
- id: (string)
database generated id
HTTP status code 200
subscription
Body
Type: application/json
Schema:
subscription
Example:
{"slug":"group-a-member","receiver":"Group A Member","subscribedCategories":["HW_HEALTH"],"subscribedLabels":["temperature","humidity"],"channels":[{"type":"EMAIL","mailAddresses":["andy@abc.def","tom@abc.def"]}]}
HTTP status code 404
if the subscription cannot be found by id.
HTTP status code 500
for unknown or unanticipated issues.
delete /v1/subscription/{id}
Delete a subscription given its database generated ID. NotFoundException (HTTP 404) if the subscription cannot be found by ID. ServiceException (HTTP 500) for unknown or unanticipated issues.
Query a specific Subscription by slug.
Delete a specific Subscription by slug.
get /v1/subscription/slug/{slug}
Query a specific Subscription by slug.
URI Parameters
- slug: required (string)
Slug is a meaningful identifier provided by client, and is case insensitive for query.
Example:
sys-admin
HTTP status code 200
Return a Subscription.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Subscription Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"receiver": {
"type": "string"
},
"description": {
"type": "string"
},
"subscribedCategories": {
"type": "array",
"items": { "enum": ["SECURITY","HW_HEALTH","SW_HEALTH"] },
"uniqueItems": true
},
"subscribedLabels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"channels": {
"type": "array",
"items": {
"type": "object",
"anyOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","receiver","channels"],
"definitions": {
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
},
"contentType": {
"type": "string"
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
}
}
}
Example:
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"slug": "sys-admin",
"receiver": "System Administrator",
"subscribedCategories": [
"SECURITY",
"HW_HEALTH",
"SW_HEALTH"
],
"channels": [
{
"type": "REST",
"url": "http://abc.def/alert"
},
{
"type": "EMAIL",
"mailAddresses": [
"cloud@abc.def",
"jack@abc.def"
]
}
],
"created": 1469679383646,
"modified": 1469679383646
}
HTTP status code 404
The targeted resource is not found.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
delete /v1/subscription/slug/{slug}
Delete a specific Subscription by slug.
URI Parameters
- slug: required (string)
Slug is a meaningful identifier provided by client, and is case insensitive for query.
Example:
sys-admin
HTTP status code 200
Return "True" to represent successful.
Body
Type: application/json
Example:
true
HTTP status code 404
The targeted resource is not found.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Subscription by subscribed categories and labels matching any one of them.
get /v1/subscription/categories/{categories}/labels/{labels}
Query the Subscription by subscribed categories and labels matching any one of them.
URI Parameters
- categories: required (string)
The subscribed categories, accepting multiple categories separated by comma.
Example:
SECURITY,HW-HEALTH,SW-HEALTH
- labels: required (string)
The subscribed labels, accepting multiple labels separated by comma.
Example:
test,Dell,IoT
HTTP status code 200
Return a Subscription array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Subscription",
"type": "array",
"items": {
"$ref": "#/definitions/Subscription"
},
"definitions": {
"Subscription":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Subscription Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"receiver": {
"type": "string"
},
"description": {
"type": "string"
},
"subscribedCategories": {
"type": "array",
"items": { "enum": ["SECURITY","HW_HEALTH","SW_HEALTH"] },
"uniqueItems": true
},
"subscribedLabels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"channels": {
"type": "array",
"items": {
"type": "object",
"anyOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","receiver","channels"]
},
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
},
"contentType": {
"type": "string"
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
}
}
}
Example:
[
{
"id": "dd5de4ff-ae3b-44b1-997d-5d410cd22e1c",
"slug": "sys-admin",
"receiver": "System Administrator",
"description": "The system administrator",
"subscribedCategories": [
"SECURITY",
"HW_HEALTH",
"SW_HEALTH"
],
"subscribedLabels": [
"Dell",
"IoT",
"test"
],
"channels": [
{
"type": "REST",
"url": "http://abc.def/alert",
"httpMethod": "POST"
},
{
"type": "EMAIL",
"mailAddresses": [
"cloud@abc.def",
"jack@abc.def"
]
}
],
"created": 1472121841753,
"modified": 1472121841753
},
{
"id": "eb5771d3-93f6-4b14-b285-9ed836ed5e35",
"slug": "sw-admin",
"receiver": "Software Administrator",
"description": "The software administrator",
"subscribedCategories": [
"SW_HEALTH"
],
"subscribedLabels": [
"IoT"
],
"channels": [
{
"type": "EMAIL",
"mailAddresses": [
"david@abc.def"
]
}
],
"created": 1472121850240,
"modified": 1472121850240
}
]
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Subscription by subscribed categories matching any one of them.
get /v1/subscription/categories/{categories}
Query the Subscription by subscribed categories matching any one of them.
URI Parameters
- categories: required (string)
The subscribed categories, accepting multiple categories separated by comma.
Example:
SECURITY,HW-HEALTH,SW-HEALTH
HTTP status code 200
Return a Subscription array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Subscription",
"type": "array",
"items": {
"$ref": "#/definitions/Subscription"
},
"definitions": {
"Subscription":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Subscription Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"receiver": {
"type": "string"
},
"description": {
"type": "string"
},
"subscribedCategories": {
"type": "array",
"items": { "enum": ["SECURITY","HW_HEALTH","SW_HEALTH"] },
"uniqueItems": true
},
"subscribedLabels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"channels": {
"type": "array",
"items": {
"type": "object",
"anyOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","receiver","channels"]
},
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
},
"contentType": {
"type": "string"
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
}
}
}
Example:
[
{
"id": "dd5de4ff-ae3b-44b1-997d-5d410cd22e1c",
"slug": "sys-admin",
"receiver": "System Administrator",
"description": "The system administrator",
"subscribedCategories": [
"SECURITY",
"HW_HEALTH",
"SW_HEALTH"
],
"subscribedLabels": [
"Dell",
"IoT",
"test"
],
"channels": [
{
"type": "REST",
"url": "http://abc.def/alert",
"httpMethod": "POST"
},
{
"type": "EMAIL",
"mailAddresses": [
"cloud@abc.def",
"jack@abc.def"
]
}
],
"created": 1472121841753,
"modified": 1472121841753
},
{
"id": "eb5771d3-93f6-4b14-b285-9ed836ed5e35",
"slug": "sw-admin",
"receiver": "Software Administrator",
"description": "The software administrator",
"subscribedCategories": [
"SW_HEALTH"
],
"subscribedLabels": [
"IoT"
],
"channels": [
{
"type": "EMAIL",
"mailAddresses": [
"david@abc.def"
]
}
],
"created": 1472121850240,
"modified": 1472121850240
}
]
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Subscription by subscribed labels matching any one of them.
get /v1/subscription/labels/{labels}
Query the Subscription by subscribed labels matching any one of them.
URI Parameters
- labels: required (string)
The subscribed labels, accepting multiple labels separated by comma.
Example:
test,Dell,IoT
HTTP status code 200
Return a Subscription array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Subscription",
"type": "array",
"items": {
"$ref": "#/definitions/Subscription"
},
"definitions": {
"Subscription":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Subscription Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"receiver": {
"type": "string"
},
"description": {
"type": "string"
},
"subscribedCategories": {
"type": "array",
"items": { "enum": ["SECURITY","HW_HEALTH","SW_HEALTH"] },
"uniqueItems": true
},
"subscribedLabels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"channels": {
"type": "array",
"items": {
"type": "object",
"anyOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","receiver","channels"]
},
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
},
"contentType": {
"type": "string"
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
}
}
}
Example:
[
{
"id": "dd5de4ff-ae3b-44b1-997d-5d410cd22e1c",
"slug": "sys-admin",
"receiver": "System Administrator",
"description": "The system administrator",
"subscribedCategories": [
"SECURITY",
"HW_HEALTH",
"SW_HEALTH"
],
"subscribedLabels": [
"Dell",
"IoT",
"test"
],
"channels": [
{
"type": "REST",
"url": "http://abc.def/alert",
"httpMethod": "POST"
},
{
"type": "EMAIL",
"mailAddresses": [
"cloud@abc.def",
"jack@abc.def"
]
}
],
"created": 1472121841753,
"modified": 1472121841753
},
{
"id": "eb5771d3-93f6-4b14-b285-9ed836ed5e35",
"slug": "sw-admin",
"receiver": "Software Administrator",
"description": "The software administrator",
"subscribedCategories": [
"SW_HEALTH"
],
"subscribedLabels": [
"IoT"
],
"channels": [
{
"type": "EMAIL",
"mailAddresses": [
"david@abc.def"
]
}
],
"created": 1472121850240,
"modified": 1472121850240
}
]
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Subscriptions by Receiver Name.
get /v1/subscription/receiver/{receiver}
Query the Subscriptions by Receiver Name.
URI Parameters
- receiver: required (string)
The receiver name of the Subscription, which could be partially matched, and is case insensitive for query.
Example:
Administrator
HTTP status code 200
Return a Subscription array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Subscription",
"type": "array",
"items": {
"$ref": "#/definitions/Subscription"
},
"definitions": {
"Subscription":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Subscription Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"receiver": {
"type": "string"
},
"description": {
"type": "string"
},
"subscribedCategories": {
"type": "array",
"items": { "enum": ["SECURITY","HW_HEALTH","SW_HEALTH"] },
"uniqueItems": true
},
"subscribedLabels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"channels": {
"type": "array",
"items": {
"type": "object",
"anyOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","receiver","channels"]
},
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
},
"contentType": {
"type": "string"
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
}
}
}
Example:
[
{
"id": "dd5de4ff-ae3b-44b1-997d-5d410cd22e1c",
"slug": "sys-admin",
"receiver": "System Administrator",
"description": "The system administrator",
"subscribedCategories": [
"SECURITY",
"HW_HEALTH",
"SW_HEALTH"
],
"subscribedLabels": [
"Dell",
"IoT",
"test"
],
"channels": [
{
"type": "REST",
"url": "http://abc.def/alert",
"httpMethod": "POST"
},
{
"type": "EMAIL",
"mailAddresses": [
"cloud@abc.def",
"jack@abc.def"
]
}
],
"created": 1472121841753,
"modified": 1472121841753
},
{
"id": "eb5771d3-93f6-4b14-b285-9ed836ed5e35",
"slug": "sw-admin",
"receiver": "Software Administrator",
"description": "The software administrator",
"subscribedCategories": [
"SW_HEALTH"
],
"subscribedLabels": [
"IoT"
],
"channels": [
{
"type": "EMAIL",
"mailAddresses": [
"david@abc.def"
]
}
],
"created": 1472121850240,
"modified": 1472121850240
}
]
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Transmission
Query the Transmissions associating a specific Notification by the Notification slug.
get /v1/transmission/slug/{slug}/{limit}
Query the Transmissions associating a specific Notification by the Notification slug.
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
- slug: required (string)
This is a Notification slug which is a meaningful identifier provided by client, and it is case insensitive for query.
Example:
notice-test-007
HTTP status code 200
Return a Transmission array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Transmission",
"type": "array",
"items": {
"$ref": "types/Transmission.json"
},
"definitions": {
"Transmission": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transmission Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"notification": {
"$ref": "#/definitions/Notification"
},
"receiver": {
"type": "string"
},
"channel": {
"type": "object",
"oneOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED","ESCALATED"]
},
"resendCount": {
"type": "integer",
"minimum": 0
},
"records": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/TransmissionRecord"
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["notification","receiver","channel","status","resendCount","records"]
},
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
},
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
},
"TransmissionRecord": {
"type": "object",
"properties": {
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED"]
},
"response": {
"type": "string"
},
"sent": {
"description": "The sending timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["status","sent"]
}
}
}
Example:
[
{
"id": "eb5771d3-93f6-4b14-b285-9ed836ed5e35",
"notification": {
"id": "7076339c-77bb-4247-8cd3-d33fec29f296",
"slug": "notice-test-007",
"sender": "Emily",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"description": "New Notification",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"contentType": "text/plain",
"created": 1472439886874,
"modified": 1472439914688
},
"receiver": "Jack",
"channel": {
"type": "REST",
"url": "http://localhost:5566/test",
"httpMethod": "POST"
},
"status": "FAILED",
"resendCount": 0,
"records": [
{
"status": "FAILED",
"response": "I/O error on POST request for \"http://localhost:5566/test\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect",
"sent": 1472439914709
}
],
"created": 1472439915730,
"modified": 1472439915730
},
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"notification": {
"id": "7076339c-77bb-4247-8cd3-d33fec29f296",
"slug": "notice-test-007",
"sender": "Emily",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"description": "New Notification",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"contentType": "text/plain",
"created": 1472439886874,
"modified": 1472439914688
},
"receiver": "Jack",
"channel": {
"type": "EMAIL",
"mailAddresses": [
"jack@abc.com",
"jack@yahoo.com.tw"
]
},
"status": "SENT",
"resendCount": 0,
"records": [
{
"status": "SENT",
"response": "SMTP server received",
"sent": 1472439834192
}
],
"created": 1472439839027,
"modified": 1472439839027
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query limited transmissions with specified slug and created date range
get /v1/transmission/slug/{slug}/start/{start}/end/{end}/{limit}
Query limited transmissions with specified slug and created date range
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
- slug: required (string)
This is a Notification slug which is a meaningful identifier provided by client, and it is case insensitive for query.
Example:
notice-test-007
- start: required (number)
Start date in long form.
Example:
1469175494521
- end: required (number)
End date in long form.
Example:
1472439915731
HTTP status code 200
list of transmissions
Body
Type: application/json
Schema:
transmission
Example:
[ { "created": 1558432657685, "modified": 1558432657685, "id": "ca9bd6ee-330c-4046-bca5-92c238b775bb", "notification": { "id": null, "slug": "notice-025" }, "receiver": "Jack", "channel": { "type": "REST", "url": "http://localhost:5566/test" }, "status": "SENT", "resendcount": 3, "records": [ { "status": "SENT", "response": "true", "sent": 1472439914709 } ] }, { "created": 1558432657687, "modified": 1558432657687, "id": "07a84190-d040-44f2-89ab-b28d843706d5", "notification": { "id": null, "slug": "notice-025" }, "receiver": "Jack", "channel": { "type": "REST", "url": "http://localhost:5566/test" }, "status": "SENT", "resendcount": 3, "records": [ { "status": "SENT", "response": "true", "sent": 1472439914709 } ] } ]
HTTP status code 400
request is invalid or unparseable
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 500
for unknown or unanticipated issues.
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Transmissions by creation timestamp between start date and end date.
get /v1/transmission/start/{start}/end/{end}/{limit}
Query the Transmissions by creation timestamp between start date and end date.
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
- start: required (number)
Start date in long form.
Example:
1469175494521
- end: required (number)
End date in long form.
Example:
1472439915731
HTTP status code 200
Return a Transmission array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Transmission",
"type": "array",
"items": {
"$ref": "types/Transmission.json"
},
"definitions": {
"Transmission": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transmission Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"notification": {
"$ref": "#/definitions/Notification"
},
"receiver": {
"type": "string"
},
"channel": {
"type": "object",
"oneOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED","ESCALATED"]
},
"resendCount": {
"type": "integer",
"minimum": 0
},
"records": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/TransmissionRecord"
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["notification","receiver","channel","status","resendCount","records"]
},
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
},
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
},
"TransmissionRecord": {
"type": "object",
"properties": {
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED"]
},
"response": {
"type": "string"
},
"sent": {
"description": "The sending timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["status","sent"]
}
}
}
Example:
[
{
"id": "eb5771d3-93f6-4b14-b285-9ed836ed5e35",
"notification": {
"id": "7076339c-77bb-4247-8cd3-d33fec29f296",
"slug": "notice-test-007",
"sender": "Emily",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"description": "New Notification",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"contentType": "text/plain",
"created": 1472439886874,
"modified": 1472439914688
},
"receiver": "Jack",
"channel": {
"type": "REST",
"url": "http://localhost:5566/test",
"httpMethod": "POST"
},
"status": "FAILED",
"resendCount": 0,
"records": [
{
"status": "FAILED",
"response": "I/O error on POST request for \"http://localhost:5566/test\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect",
"sent": 1472439914709
}
],
"created": 1472439915730,
"modified": 1472439915730
},
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"notification": {
"id": "7076339c-77bb-4247-8cd3-d33fec29f296",
"slug": "notice-test-007",
"sender": "Emily",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"description": "New Notification",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"contentType": "text/plain",
"created": 1472439886874,
"modified": 1472439914688
},
"receiver": "Jack",
"channel": {
"type": "EMAIL",
"mailAddresses": [
"jack@abc.com",
"jack@yahoo.com.tw"
]
},
"status": "SENT",
"resendCount": 0,
"records": [
{
"status": "SENT",
"response": "SMTP server received",
"sent": 1472439834192
}
],
"created": 1472439839027,
"modified": 1472439839027
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Transmissions by creation timestamp after start date.
get /v1/transmission/start/{start}/{limit}
Query the Transmissions by creation timestamp after start date.
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
- start: required (number)
Start date in long form.
Example:
1469175494521
HTTP status code 200
Return a Transmission array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Transmission",
"type": "array",
"items": {
"$ref": "types/Transmission.json"
},
"definitions": {
"Transmission": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transmission Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"notification": {
"$ref": "#/definitions/Notification"
},
"receiver": {
"type": "string"
},
"channel": {
"type": "object",
"oneOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED","ESCALATED"]
},
"resendCount": {
"type": "integer",
"minimum": 0
},
"records": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/TransmissionRecord"
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["notification","receiver","channel","status","resendCount","records"]
},
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
},
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
},
"TransmissionRecord": {
"type": "object",
"properties": {
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED"]
},
"response": {
"type": "string"
},
"sent": {
"description": "The sending timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["status","sent"]
}
}
}
Example:
[
{
"id": "eb5771d3-93f6-4b14-b285-9ed836ed5e35",
"notification": {
"id": "7076339c-77bb-4247-8cd3-d33fec29f296",
"slug": "notice-test-007",
"sender": "Emily",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"description": "New Notification",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"contentType": "text/plain",
"created": 1472439886874,
"modified": 1472439914688
},
"receiver": "Jack",
"channel": {
"type": "REST",
"url": "http://localhost:5566/test",
"httpMethod": "POST"
},
"status": "FAILED",
"resendCount": 0,
"records": [
{
"status": "FAILED",
"response": "I/O error on POST request for \"http://localhost:5566/test\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect",
"sent": 1472439914709
}
],
"created": 1472439915730,
"modified": 1472439915730
},
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"notification": {
"id": "7076339c-77bb-4247-8cd3-d33fec29f296",
"slug": "notice-test-007",
"sender": "Emily",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"description": "New Notification",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"contentType": "text/plain",
"created": 1472439886874,
"modified": 1472439914688
},
"receiver": "Jack",
"channel": {
"type": "EMAIL",
"mailAddresses": [
"jack@abc.com",
"jack@yahoo.com.tw"
]
},
"status": "SENT",
"resendCount": 0,
"records": [
{
"status": "SENT",
"response": "SMTP server received",
"sent": 1472439834192
}
],
"created": 1472439839027,
"modified": 1472439839027
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the Transmissions by creation timestamp before end date.
get /v1/transmission/end/{end}/{limit}
Query the Transmissions by creation timestamp before end date.
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
- end: required (number)
End date in long form.
Example:
1472439915731
HTTP status code 200
Return a Transmission array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Transmission",
"type": "array",
"items": {
"$ref": "types/Transmission.json"
},
"definitions": {
"Transmission": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transmission Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"notification": {
"$ref": "#/definitions/Notification"
},
"receiver": {
"type": "string"
},
"channel": {
"type": "object",
"oneOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED","ESCALATED"]
},
"resendCount": {
"type": "integer",
"minimum": 0
},
"records": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/TransmissionRecord"
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["notification","receiver","channel","status","resendCount","records"]
},
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
},
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
},
"TransmissionRecord": {
"type": "object",
"properties": {
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED"]
},
"response": {
"type": "string"
},
"sent": {
"description": "The sending timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["status","sent"]
}
}
}
Example:
[
{
"id": "eb5771d3-93f6-4b14-b285-9ed836ed5e35",
"notification": {
"id": "7076339c-77bb-4247-8cd3-d33fec29f296",
"slug": "notice-test-007",
"sender": "Emily",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"description": "New Notification",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"contentType": "text/plain",
"created": 1472439886874,
"modified": 1472439914688
},
"receiver": "Jack",
"channel": {
"type": "REST",
"url": "http://localhost:5566/test",
"httpMethod": "POST"
},
"status": "FAILED",
"resendCount": 0,
"records": [
{
"status": "FAILED",
"response": "I/O error on POST request for \"http://localhost:5566/test\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect",
"sent": 1472439914709
}
],
"created": 1472439915730,
"modified": 1472439915730
},
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"notification": {
"id": "7076339c-77bb-4247-8cd3-d33fec29f296",
"slug": "notice-test-007",
"sender": "Emily",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"description": "New Notification",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"contentType": "text/plain",
"created": 1472439886874,
"modified": 1472439914688
},
"receiver": "Jack",
"channel": {
"type": "EMAIL",
"mailAddresses": [
"jack@abc.com",
"jack@yahoo.com.tw"
]
},
"status": "SENT",
"resendCount": 0,
"records": [
{
"status": "SENT",
"response": "SMTP server received",
"sent": 1472439834192
}
],
"created": 1472439839027,
"modified": 1472439839027
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the escalated Transmissions (status = ESCALATED)
get /v1/transmission/escalated/{limit}
Query the escalated Transmissions (status = ESCALATED)
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
HTTP status code 200
Return a Transmission array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Transmission",
"type": "array",
"items": {
"$ref": "types/Transmission.json"
},
"definitions": {
"Transmission": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transmission Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"notification": {
"$ref": "#/definitions/Notification"
},
"receiver": {
"type": "string"
},
"channel": {
"type": "object",
"oneOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED","ESCALATED"]
},
"resendCount": {
"type": "integer",
"minimum": 0
},
"records": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/TransmissionRecord"
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["notification","receiver","channel","status","resendCount","records"]
},
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
},
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
},
"TransmissionRecord": {
"type": "object",
"properties": {
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED"]
},
"response": {
"type": "string"
},
"sent": {
"description": "The sending timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["status","sent"]
}
}
}
Example:
[
{
"id": "f0cdf789-e40f-4d72-b35b-75528b605ac9",
"notification": {
"id": "00d14a4c-cb4c-4750-a24b-f0f89d27fc82",
"slug": "notice-test-001",
"sender": "Emily",
"category": "SECURITY",
"severity": "CRITICAL",
"content": "Hello, Notification!",
"description": "New Notification",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"contentType": "text/plain",
"created": 1470747875968,
"modified": 1470747875974
},
"receiver": "Jack",
"channel": {
"type": "REST",
"url": "http://localhost:7000/test",
"httpMethod": "POST"
},
"status": "ESCALATED",
"resendCount": 3,
"records": [
{
"status": "FAILED",
"response": "I/O error on POST request for \"http://localhost:7000/test\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect",
"sent": 1470747876034
},
{
"status": "FAILED",
"response": "I/O error on POST request for \"http://localhost:7000/test\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect",
"sent": 1470747887135
},
{
"status": "FAILED",
"response": "I/O error on POST request for \"http://localhost:7000/test\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect",
"sent": 1470747898180
},
{
"status": "FAILED",
"response": "I/O error on POST request for \"http://localhost:7000/test\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect",
"sent": 1470747909193
}
],
"created": 1470747877127,
"modified": 1470747910256
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Query the failed Transmissions (status = FAILED)
get /v1/transmission/failed/{limit}
Query the failed Transmissions (status = FAILED)
URI Parameters
- limit: required (number)
The maximum number of records to fetch.
Example:
10
HTTP status code 200
Return a Transmission array.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "The Array of Transmission",
"type": "array",
"items": {
"$ref": "types/Transmission.json"
},
"definitions": {
"Transmission": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transmission Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"notification": {
"$ref": "#/definitions/Notification"
},
"receiver": {
"type": "string"
},
"channel": {
"type": "object",
"oneOf": [
{ "$ref": "#/definitions/RESTfulChannel" },
{ "$ref": "#/definitions/EMAILChannel" }
]
},
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED","ESCALATED"]
},
"resendCount": {
"type": "integer",
"minimum": 0
},
"records": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/TransmissionRecord"
},
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["notification","receiver","channel","status","resendCount","records"]
},
"Notification":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification Schema",
"type": "object",
"properties": {
"id": {
"description": "generated and used by system, and users can ignore this property",
"type": "string"
},
"slug": {
"description": "A meaningful identifier provided by client",
"type": "string"
},
"sender": {
"type": "string"
},
"category": {
"enum": ["SECURITY","HW_HEALTH","SW_HEALTH"]
},
"severity": {
"enum": ["CRITICAL","NORMAL"]
},
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"enum": ["NEW","PROCESSED","ESCALATED"]
},
"labels": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"created": {
"description": "The creation timestamp",
"type": "integer",
"minimum": 0
},
"modified": {
"description": "The last modification timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["slug","sender","category","severity","content"]
},
"RESTfulChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["REST"]
},
"url": {
"type": "string"
},
"httpMethod": {
"enum": ["POST","PUT"]
}
},
"required": ["type","url"]
},
"EMAILChannel": {
"type": "object",
"properties": {
"type": {
"enum": ["EMAIL"]
},
"mailAddresses": {
"type": "array",
"minItems": 1,
"items": { "type": "string" },
"uniqueItems": true
}
},
"required": ["type","mailAddresses"]
},
"TransmissionRecord": {
"type": "object",
"properties": {
"status": {
"enum": ["FAILED","SENT","ACKNOWLEDGED"]
},
"response": {
"type": "string"
},
"sent": {
"description": "The sending timestamp",
"type": "integer",
"minimum": 0
}
},
"required": ["status","sent"]
}
}
}
Example:
[
{
"id": "eb5771d3-93f6-4b14-b285-9ed836ed5e35",
"notification": {
"id": "7076339c-77bb-4247-8cd3-d33fec29f296",
"slug": "notice-test-007",
"sender": "Emily",
"category": "SECURITY",
"severity": "NORMAL",
"content": "Hello, Notification!",
"description": "New Notification",
"status": "PROCESSED",
"labels": [
"cool",
"test"
],
"contentType": "text/plain",
"created": 1472439886874,
"modified": 1472439914688
},
"receiver": "Jack",
"channel": {
"type": "REST",
"url": "http://localhost:5566/test",
"httpMethod": "POST"
},
"status": "FAILED",
"resendCount": 1,
"records": [
{
"status": "FAILED",
"response": "I/O error on POST request for \"http://localhost:5566/test\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect",
"sent": 1472439914709
},
{
"status": "FAILED",
"response": "I/O error on POST request for \"http://localhost:5566/test\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect",
"sent": 1472443514521
}
],
"created": 1472439915730,
"modified": 1472443515554
}
]
HTTP status code 413
The assigned limit perameter exceeds the current max limit.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Delete all the sent Transmissions (status = SENT) if the current timestamp minus their last modification timestamp is less than the age parameter.
delete /v1/transmission/sent/age/{age}
Delete all the sent Transmissions (status = SENT) if the current timestamp minus their last modification timestamp is less than the age parameter.
URI Parameters
- age: required (number)
Specify the age of Transmission, and the format is in milliseconds.
Example:
2592000000
HTTP status code 200
Return "True" to represent successful.
Body
Type: application/json
Example:
true
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Delete all the escalated Transmissions (status = ESCALATED) if the current timestamp minus their last modification timestamp is less than the age parameter.
delete /v1/transmission/escalated/age/{age}
Delete all the escalated Transmissions (status = ESCALATED) if the current timestamp minus their last modification timestamp is less than the age parameter.
URI Parameters
- age: required (number)
Specify the age of Transmission, and the format is in milliseconds.
Example:
2592000000
HTTP status code 200
Return "True" to represent successful.
Body
Type: application/json
Example:
true
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Delete all the acknowledged Transmissions (status = ACKNOWLEDGED) if the current timestamp minus their last modification timestamp is less than the age parameter.
delete /v1/transmission/acknowledged/age/{age}
Delete all the acknowledged Transmissions (status = ACKNOWLEDGED) if the current timestamp minus their last modification timestamp is less than the age parameter.
URI Parameters
- age: required (number)
Specify the age of Transmission, and the format is in milliseconds.
Example:
2592000000
HTTP status code 200
Return "True" to represent successful.
Body
Type: application/json
Example:
true
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Delete all the failed Transmissions (status = FAILED and resendCount >= resend limit) if the current timestamp minus their last modification timestamp is less than the age parameter.
delete /v1/transmission/failed/age/{age}
Delete all the failed Transmissions (status = FAILED and resendCount >= resend limit) if the current timestamp minus their last modification timestamp is less than the age parameter.
URI Parameters
- age: required (number)
Specify the age of Transmission, and the format is in milliseconds.
Example:
2592000000
HTTP status code 200
Return "True" to represent successful.
Body
Type: application/json
Example:
true
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Cleanup
Delete all the Notifications if the current timestamp minus their last modification timestamp is less than a default age setting, and the corresponding Transmissions will also be deleted.
delete /cleanup
Delete all the Notifications if the current timestamp minus their last modification timestamp is less than a default age setting, and the corresponding Transmissions will also be deleted.
HTTP status code 202
Return 202 Accepted status code without content when receiving the request, because it is an asynchronous operation.
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Delete all the Notifications if the current timestamp minus their last modification timestamp is less than the age parameter, and the corresponding Transmissions will also be deleted.
delete /cleanup/age/{age}
Delete all the Notifications if the current timestamp minus their last modification timestamp is less than the age parameter, and the corresponding Transmissions will also be deleted.
URI Parameters
- age: required (number)
Specify the age of <
>, and the format is in milliseconds.
HTTP status code 202
Return 202 Accepted status code without content when receiving the request, because it is an asynchronous operation.
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Ping
Test service providing an indication that the service is available.
get /v1/ping
Test service providing an indication that the service is available.
HTTP status code 200
Return value of "pong."
Body
Type: text/plain
Example:
pong
HTTP status code 503
For unanticipated or unknown issues encountered.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Schema",
"type": "object",
"properties": {
"timestamp": {
"type": "integer"
},
"status": {
"description": "HTTP status code",
"type": "integer"
},
"error": {
"type": "string"
},
"exception": {
"description": "The exception class in the code",
"type": "string"
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": ["timestamp","status","error"]
}
Edgex API Version
Example - http://localhost:48060/api/version