Alert Object
An Alert object represents a single event captured by Craft for a particular company.
Field
Type
Description
id
ID
UUID to identify this Alert document
dataset
String!
Dataset represents the type of source data used to generate this alert
class
Class of the Alert. Contains machine-friendly
"code" as well as human-readable "label" fields.
title
String!
Summary describing the Alert contents
text
String!
Full text of the Alert
source
String
Represents news source URL for Alerts from the "news" dataset
value
Float
Stores the value of the dataset at the point when Alert was created
variable
String!
Describes the variable from the dataset which was used to create the Alert
polarity
Int!
Represents the polarity (sentiment) of the signal. Typical values are: -1 - negative polarity 0 - neutral 1 - positive polarity
company
Holds additional data about the Company, Alert belongs to. May be "null" in case Alert is related to multiple companies at the same time, when none of them is specifically an Alert target.
For example, a change of the aluminum price may affect many dependent manufacturers, but being a result of overall market movement, rather than an Alert for a specific company.
relatedCompanies
[AlertCompany!]
Contains all the companies related to the parent Alert.
For example, a change of the steel price may affect multiple manufacturers.
When filtering by where.company.id
, this list will still contain a full set of companies related to the Alert, not just those with matching IDs (but at least one of the Companies will have a desired ID)
payload
JSON!
Holds additional metadata related to the specific Alert.
Please, note that the metadata structure varies depending on the Alert's dataset, variable and class.
You may find examples of payload
Object here.
resource
Resource that is affected by the given Alert, such as steel, coal, oil, etc. May be missing for Alerts from the datasets that are describing other type of events.
period
String!
Defines the time window over which the change of variable was detected
publishedAt
String!
ISO 8601 timestamp when Alert was published by Craft
occuredAt
String!
ISO 8601 timestamp of change in the tracked value causing this Alert to be created.
AlertClass
Represents the category of changes that are described by an Alert.
Field
Type
Description
code
String!
URL-friendly class code
label
String!
A human-readable version of the Alert's class
AlertCompany
Stores a portion of the data from Basic Company Information for the Company this Alert belongs to.
Field
Type
Description
id
ID!
Company ID which can be used to query additional Company data from the company
node in the Company Data API
displayName
String!
A human-readable company name. Same as Company.displayName
homepage
String!
Company's homepage URL. Same as Company.homepage
AlertResource
A Resource that is affected by the given Alert, such as steel
, coal
, oil
, etc. May be missing for Alerts from the datasets that are describing other types of events.
Field
Type
Description
id
String!
Resource ID, such as:
"oil"
"natural_gas"
"steel"
type
String!
General category of the resource, for example:
"commodity"
Last updated