Skip to main content

Message Validation

Overview

Message validation ensures that message transformations include all required information and conform to the expected message structure (for example, ServiceNow Incident) are correctly transformed into standardized formats used by 1Gateway. This normalization supports consistent, one-to-many integrations across systems.

1Gateway comes preconfigured with two schemas that define the NormalizedAlarm, and NormalizedIncident formats. You can also upload your own schemas for custom message structures.


Schema Location

Mapper schemas for message validation are available within the Mapper Configuration panel, under Message Validation. Each schema specifies the required and optional fields for the normalized message types.

Message validation

You can also find all schemas (the defaults and any you upload) in Setup → Schemas.


Validation

When configuring a mapper and transforming messages, validation checks whether each transformed message includes all required fields according to the schema. Meaning, the schema is used for the "To" side of the message test.

We have out-of-the-box validation for:

  • NormalizedAlarm
  • NormalizedIncident

Validation only appears if your mapper is configured to transform messages into one of the formats listed above (unless you have uploaded a custom one) and you have an available test message in that mapper.

To upload your own schema, it is recomended to download an existing schema in Setup → Schemas and adjusting it to reflect your desired format. Please follow these guideliness:

  • The JSON schema filename must match the schema name in the $id field (see example below for the exact $id location).
  • The schema title should be the message type.
  • The schema ID format should be: MessageType.vX.Y.Z.schema.json (for example: InfluxMetric.v1.0.0.schema.json).

Schemas

NormalizedAlarm schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://1gateway.com/schemas/NormalizedAlarm.v1.schema.json",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["NormalizedAlarm"]
},
"ci": {
"type": "object",
"properties": {
"domain": { "type": "string" },
"element": { "type": "string" },
"elementid": { "type": "string" },
"elementtype": { "type": "string" },
"fqdn": { "type": "string" },
"grouping": { "type": "string" },
"id": { "type": "string" },
"ip": { "type": "string" },
"name": { "type": "string" },
"type": { "type": "string" },
"url": { "type": "string" }
},
"required": ["element", "elementtype", "id", "name", "type"]
},
"event": {
"type": "object",
"properties": {
"code": { "type": "string" },
"description": { "type": "string" },
"id": { "type": "string" },
"impact": { "type": "string", "enum": ["0", "1", "2", "3", "4", "5"] },
"severity": { "type": "string", "enum": ["0", "1", "2", "3", "4", "5"] },
"suppressionkey": { "type": "string" },
"text": { "type": "string" },
"timestamp": { "type": "string", "format": "date-time" },
"type": { "type": "string" },
"url": { "type": "string" }
},
"required": ["severity", "suppressionkey", "text", "timestamp", "type"]
}
},
"required": ["type", "ci", "event"]
}
NormalizedIncident schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://1gateway.com/schemas/NormalizedIncident.v1.0.0.schema.json",
"type": "object",
"default": {},
"title": "incident",
"description": "NormalizedIncident",
"definitions": {
"timestamp": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time",
"title": "created",
"examples": [],
"description": "The date and time when the incident was initially created."
},
"updated": {
"type": "string",
"format": "date-time",
"title": "updated",
"examples": [],
"description": "The date and time when the incident was last updated."
},
"seen": {
"type": "string",
"format": "date-time",
"title": "seen",
"examples": [],
"description": "The date and time when the incident was last viewed or acknowledged."
}
}
},
"attachment": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"base64",
"file",
"url"
],
"title": "mode",
"examples": [
"base64"
],
"default": "base64",
"description": "The method of attachment: base64 encoded, file upload, or URL link."
},
"filename": {
"type": "string",
"title": "filename",
"examples": [
"application.log",
"logo.png"
],
"description": "The name of the file, path or URL."
},
"content": {
"type": "string",
"title": "content",
"examples": [],
"description": "The content of the attachment, such as encoded data or URL."
},
"content_type": {
"type": "string",
"title": "content_type",
"examples": [
"image/png",
"image/jpeg",
"application/pdf"
],
"description": "The MIME type of the attachment, e.g., image/png, application/pdf."
},
"id": {
"type": "string",
"title": "id",
"examples": [],
"description": "A unique identifier for the attachment."
},
"createdBy": {
"type": "string",
"title": "createdBy",
"examples": [
"Airon Velasco"
],
"description": "The name or identifier of the person who created the attachment."
},
"timestamp": {
"$ref": "#/definitions/timestamp",
"description": "Timestamps associated with the attachment, referencing the 'timestamp' definition."
}
}
},
"note": {
"type": "object",
"properties": {
"body": {
"type": "string",
"title": "body",
"examples": [
"Ticket set to Pending Customer"
],
"description": "The main content of the note."
},
"createdBy": {
"type": "string",
"title": "createdBy",
"examples": [
"Airon Velasco"
],
"description": "Person or team who created the note."
},
"format": {
"type": "string",
"title": "format",
"examples": [
"text",
"markdown",
"html"
],
"description": "The format of the note's content, e.g., plain text, markdown, HTML."
},
"id": {
"type": "string",
"title": "id",
"examples": [
"9d385017c611228701d22104cc95c371"
],
"description": "A unique identifier for the note."
},
"timestamp": {
"$ref": "#/definitions/timestamp",
"description": "Timestamps associated with the note, referencing the 'timestamp' definition."
},
"type": {
"type": "string",
"enum": [
"comment",
"resolvenote",
"closenote",
"change",
"feedback"
],
"title": "type",
"examples": [
"comment",
"resolvenote",
"closenote",
"change",
"feedback"
],
"default": "comment",
"description": "The type of note, such as comment, resolution note, closure note, change, or feedback."
},
"access": {
"type": "string",
"enum": [
"public",
"private",
"vendor"
],
"title": "access",
"examples": [
"public"
],
"default": "public",
"description": "The access level of the note: public, private, or restricted to specific vendors."
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/definitions/attachment"
},
"description": "A list of attachments associated with the note, using the 'attachment' definition."
}
}
}
},
"required": [
"incident"
],
"properties": {
"incident": {
"type": "object",
"properties": {
"subject": {
"type": "string",
"title": "subject",
"examples": [
"my subject"
],
"description": "The brief summary or title of the incident."
},
"description": {
"type": "string",
"title": "description",
"examples": [
"my desc"
],
"description": "Detailed explanation and information about the incident."
},
"assignedGroup": {
"type": "string",
"title": "assignedgroup",
"examples": [
"Operations L1"
],
"description": "Group or team responsible for handling the incident."
},
"timestamp": {
"allOf": [
{
"$ref": "#/definitions/timestamp",
"description": "Reference to the timestamp details of the incident."
},
{
"type": "object",
"properties": {
"resolved": {
"type": "string",
"format": "date-time",
"title": "resolved",
"examples": []
}
}
}
]
},
"requester": {
"type": "object",
"properties": {
"company": {
"type": "string",
"title": "company",
"examples": [
"Example Company Inc."
],
"description": "The name of the company or organization associated with the requester."
},
"name": {
"type": "string",
"title": "name",
"examples": [
"John Doe"
],
"description": "The full name of the individual requesting the incident."
},
"email": {
"type": "string",
"format": "email",
"title": "email",
"examples": [
"johndoe@example.com"
],
"description": "The email address of the requester for contact purposes."
}
},
"required": [],
"title": "requester",
"description": "Information about the requester"
},
"priority": {
"type": "string",
"enum": [
"low",
"medium",
"high",
"critical"
],
"title": "priority",
"examples": [
"high"
],
"description": "Indicates the level of urgency and importance of the incident."
},
"resolvedBy": {
"type": "string",
"title": "resolvedBy",
"examples": [
"Airon Velasco"
],
"description": "Person or team who resolved the incident."
},
"createdBy": {
"type": "string",
"title": "createdBy",
"examples": [
"Airon Velasco"
],
"description": "Person or team who created the incident."
},
"status": {
"type": "string",
"enum": [
"New",
"Open",
"Assigned",
"InProgress",
"PendingInternal",
"Pending3rdParty",
"PendingCustomer",
"Resolved",
"Closed",
"Canceled"
],
"title": "status",
"examples": [
"Closed"
],
"description": "Current state or phase of the incident."
},
"type": {
"type": "string",
"title": "type",
"examples": [
"incident",
"ticket",
"bug",
"service-request",
"task",
"problem"
],
"description": "Category or classification of the incident."
},
"displayId": {
"type": "string",
"title": "displayId",
"examples": [
"INC0000012"
],
"description": "Unique, user-friendly identifier for the incident."
},
"updatedBy": {
"type": "string",
"title": "updatedby",
"examples": [
"Worker SystemUser"
],
"description": "Last person or system to make changes to the incident record."
},
"impact": {
"type": "string",
"enum": [
"low",
"medium",
"high",
"critical"
],
"title": "impact",
"examples": [
"high"
],
"description": "Extent of effect the incident has on business or operations."
},
"urgency": {
"type": "string",
"enum": [
"low",
"medium",
"high",
"critical"
],
"title": "urgency",
"examples": [
"high"
],
"description": "Rate at which the incident needs to be resolved."
}
},
"required": [
"subject"
]
},
"notes": {
"type": "array",
"items": {
"allOf": [{ "$ref": "#/definitions/note" }]
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/definitions/attachment"
},
"examples": [
{
"mode": "base64",
"filename": "logo.png",
"content": "YXNkZmFzZGY=",
"content_type": "image/png",
"id": "9c573169c611228700193229fff72400",
"createdBy": "Airon Velasco",
"timestamp": {
"created": "2024-01-24T12:11:00.000Z",
"updated": "2024-01-24T12:12:00.000Z",
"seen": "2024-01-24T12:14:00.000Z"
}
}
]
}
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/definitions/attachment"
},
"examples": [
{
"mode": "base64",
"filename": "logo.png",
"content": "YXNkZmFzZGY=",
"content_type": "image/png",
"id": "9c573169c611228700193229fff72400",
"createdBy": "Airon Velasco",
"timestamp": {
"created": "2024-01-24T12:11:00.000Z",
"updated": "2024-01-24T12:12:00.000Z",
"seen": "2024-01-24T12:14:00.000Z"
}
}
]
}
}
}

Validation Results

Message validation provides the following feedback:

  • Errors for Required Fields: Lists required fields missing from the target message.
  • Information on Optional Fields: Displays details about optional fields present or missing.

Click any field in the validation results to create or adjust a mapping for that field.