Query Public GraphQL Schema

schema {
  query: Query
  mutation: Mutation
}

"Lookups for cema"
interface Lookup @source(name: "Lookup", schema: "legacy") @source(name: "Lookup", schema: "lookups") {
  id: String
  displayName: String
  lookupType: String
  organization: String
}

interface SummaryValueType @source(name: "SummaryValueType", schema: "summaries") {
  type: String!
}

"The intersection of a risk-event with assets."
type Alert @source(name: "Alert", schema: "legacy") {
  alertId: String
  organization: String
  expiresAt: DateTime
  status: String
  alertEvents: [AlertEvent]
  lastEvent: AlertEvent
  snoozedUntil: DateTime
  isActive: Boolean!
  alertActions: [AlertAction] @delegate(path: "actions(alertId: $fields:alertId)", schema: "actions")
  created: DateTime @delegate(path: "created(alertId: $fields:alertId)", schema: "actions")
  updated: DateTime @delegate(path: "updated(alertId: $fields:alertId)", schema: "actions")
  affectedAssets(detailed: Boolean contactsOnly: Boolean!): [Asset!]! @delegate(path: "affectedAssets(alertId: $fields:alertId, detailed: $arguments:detailed, contactsOnly: $arguments:contactsOnly, take: 100)", schema: "assets")
  summaries(filter: SummaryFilter): [Summary] @delegate(path: "summaries(id: $fields:alertId, filter: $arguments:filter)", schema: "summaries") @authorize
}

type AlertAction @source(name: "AlertAction", schema: "actions") {
  actionTime: DateTime!
  actionType: ActionType!
  alertId: String
  extendedAttributes: [KeyValuePairOfStringAndString!]
  user: String
  userInfo: User
}

"An event which triggered alert processing, along with relevant, pertinent information"
type AlertEvent @source(name: "AlertEvent", schema: "legacy") {
  created: DateTime!
  updated: DateTime!
  alertEventId: String
  title: String
  riskEventId: String
  categories: [String]
  subCategories: [String]
  onset: DateTime
  source: String
  severity: String
  correlations: [Correlation]
  reiUpdateId: String
  alertId: String @deprecated(reason: "Must appear in a hierarchy with an alert")
  summaries: [Summary] @delegate(path: "summaries(id: $fields:alertEventId, filter:{idType:ALERT_EVENT_ID})", schema: "summaries") @authorize
}

type Artifact implements Lookup @source(name: "Artifact", schema: "legacy") @source(name: "Artifact", schema: "lookups") {
  id: String
  organization: String
  displayName: String
  lookupType: String
}

type Asset @source(name: "Asset", schema: "assets") {
  assetId: String!
  extendedData: ExtendedData
}

type AssetCount @source(name: "AssetCount", schema: "summaries") {
  assetTypeId: String
  count: Int
}

type AssetData @source(name: "AssetData", schema: "assets") {
  nearestDistanceKm: Float
}

type AssetDistance @source(name: "AssetDistance", schema: "summaries") {
  assetId: String
  distance: Float
  unit: String
}

type Category @source(name: "Category", schema: "summaries") {
  categories: [String]
}

type CloseReason implements Lookup @source(name: "CloseReason", schema: "legacy") @source(name: "CloseReason", schema: "lookups") {
  id: String
  displayName: String
  lookupType: String
  organization: String
}

type ClosestAsset @source(name: "ClosestAsset", schema: "summaries") {
  assetDistances: [AssetDistance]
}

type ClosestAssetsOnly @source(name: "ClosestAssetsOnly", schema: "summaries") {
  assetDistances: [AssetDistance]
}

type ClosestContactsOnly @source(name: "ClosestContactsOnly", schema: "summaries") {
  assetDistances: [AssetDistance]
}

type ContactCount @source(name: "ContactCount", schema: "summaries") {
  contactTypeId: String
  count: Int
}

type ContactData @source(name: "ContactData", schema: "assets") {
  nearestDistanceKm: Float
  affectedContactLocationIds: [String]
}

type Coordinates @source(name: "Coordinates", schema: "summaries") {
  latLon: String
}

type Correlation @source(name: "Correlation", schema: "legacy") {
  "impactGeometry2: PrimeType @deprecated(reason: \"Use impactGeometry instead to avoid having to deal with an interface\")"
  impactGeometry: Geometry
  correlationId: ID
  geometryLink: String
  alertId: String @deprecated(reason: "Must appear in a hierarchy with an alert")
  alertEventId: String @deprecated(reason: "Must appear in a hierarchy with an alert event")
}

type CountAssetType @source(name: "CountAssetType", schema: "summaries") {
  assetTypes: [AssetCount]
}

type CountContactType @source(name: "CountContactType", schema: "summaries") {
  contactTypes: [ContactCount]
}

type CountDomesticIntlStatusType @source(name: "CountDomesticIntlStatusType", schema: "summaries") {
  domesticIntlStatusTypes: [TypeCount]
}

type CountExpectedLocationSegmentType @source(name: "CountExpectedLocationSegmentType", schema: "summaries") {
  expectedLocationSegmentTypes: [TypeCount]
}

type CountLocalTravelStatusType @source(name: "CountLocalTravelStatusType", schema: "summaries") {
  localTravelStatusTypes: [TypeCount]
}

type CountLocationType @source(name: "CountLocationType", schema: "summaries") {
  locationTypes: [TypeCount]
}

type CountTravelType @source(name: "CountTravelType", schema: "summaries") {
  travelTypes: [TypeCount]
}

type CountTraveler @source(name: "CountTraveler", schema: "summaries") {
  count: Int
}

type KeyValuePairOfStringAndString @source(name: "KeyValuePairOfStringAndString", schema: "actions") {
  key: String!
  value: String!
}

type LinkEntity implements Lookup @source(name: "LinkEntity", schema: "legacy") @source(name: "LinkEntity", schema: "lookups") {
  id: String
  organization: String
  displayName: String
  url: String
  lookupType: String
}

type LocationType @source(name: "LocationType", schema: "summaries") {
  names: [String]
}

type Mutation {
  "Add a user note to an alert"
  addNote(request: NoteInput): Boolean @delegate(schema: "actions")
  "Closes an alert for further processing. The alert may be reopened if an update is received from the original source, or it is reinstated in the UI."
  closeAlert(request: CloseInput): Boolean @delegate(schema: "actions")
  "Link an external entity to an alert"
  linkEntity(request: LinkInput): Boolean @delegate(schema: "actions")
  "Reopen a closed alert"
  reinstateAlert(request: ReinstateInput): Boolean @delegate(schema: "actions")
  "Snooze an alert to suppress it temporarily. The alert will awaken if an update is received."
  snoozeAlert(request: SnoozeInput): Boolean @delegate(schema: "actions")
  "Execute a webhook for an alert"
  webhook(request: WebhookInput): Boolean @delegate(schema: "actions")
}

"Provides a pageable reference descriptor for alerts"
type PaginatedResultsOfAlert @source(name: "PaginatedResultsOfAlert", schema: "legacy") {
  "Returned results"
  results: [Alert]
  "Used to return the next page"
  token: String
  "Used to return back errors or other useful messages"
  message: String
  totalHits: Long!
}

type Query {
  "Retrieve alerts by link entity"
  alertsByLinkEntity(linkEntityId: String!): [Alert] @delegate(schema: "legacy")
  "Retrieve a single alert"
  alert(id: String!): Alert! @delegate(schema: "legacy")
  "Alerts query"
  alerts(filter: AlertsFilter! take: Int! = 200 token: String!): PaginatedResultsOfAlert! @delegate(schema: "legacy")
  "Retrieve assets from an alert"
  affectedAssets(alertId: String! detailed: Boolean contactsOnly: Boolean! take: Int!): [Asset!]! @delegate(schema: "assets")
  "Search alerts using a text-based algorithm"
  findAlert(contains: String): [Alert!]! @delegate(schema: "legacy")
  "Returns available lookups"
  lookups(lookupType: String!): [Lookup!]! @delegate(schema: "lookups")
  "Retrieves an action by it's id"
  action(actionId: String!): AlertAction @delegate(schema: "actions")
  "Retrieves all actions for an alert"
  actions(alertId: String): [AlertAction] @delegate(schema: "actions")
  "Returns available webhooks for use in the webhook(request: WebhookInput) mutation"
  webhooks: [Webhook!]! @delegate(schema: "webhooks")
}

type SubCategory @source(name: "SubCategory", schema: "summaries") {
  subCategories: [String]
}

type Summary @source(name: "Summary", schema: "summaries") {
  summaryId: String!
  alertId: String!
  alertEvent: String!
  summaryName: String!
  value: SummaryValue
}

type TypeCount implements SummaryValueType @source(name: "TypeCount", schema: "summaries") {
  type: String!
  count: Int!
}

type User @source(name: "User", schema: "actions") @source(name: "User", schema: "legacy") {
  id: String!
  lastName: String
  email: String
  userName: String
  userStatus: String
  firstName: String
}

type Webhook @source(name: "Webhook", schema: "webhooks") {
  webhookId: String!
  webhookType: String!
  webhookName: String!
}

union ExtendedData @source(name: "ExtendedData", schema: "assets") = ContactData | AssetData

union SummaryValue @source(name: "SummaryValue", schema: "summaries") = CountAssetType | CountContactType | ClosestAsset | LocationType | Category | SubCategory | CountLocationType | CountExpectedLocationSegmentType | CountTravelType | CountDomesticIntlStatusType | CountLocalTravelStatusType | ClosestAssetsOnly | ClosestContactsOnly | CountTraveler | Coordinates

input AcknowledgedAlertsFilterInput @source(name: "AcknowledgedAlertsFilterInput", schema: "legacy") {
  start: String
  end: String
  categories: [String]
  boundingBox: [[Float!]]
  snoozed: Boolean
  searchGeometry: Geometry
}

input AlertsFilter @source(name: "AlertsFilter", schema: "legacy") {
  start: String
  end: String
  categories: [String]
  boundingBox: [[Float!]]
  snoozed: Boolean
  searchGeometry: Geometry
  active: Boolean
  searchText: String
}

input BulkCloseInput @source(name: "BulkCloseInput", schema: "actions") {
  before: DateTime!
}

input CloseInput @source(name: "CloseInput", schema: "actions") {
  alertId: String!
  note: String
  closeReason: String!
}

input KeyValuePairOfStringAndStringInput @source(name: "KeyValuePairOfStringAndStringInput", schema: "actions") {
  key: String!
  value: String!
}

input LinkInput @source(name: "LinkInput", schema: "actions") {
  "The id of the alert"
  alertId: String!
  "The type of entity, from CEMA registered entity types"
  entityType: String
  "The id of the entity, according to its source system, Must be in the form '{entity}:\/\/{id}' example: 'IC:\/\/1234'"
  entityId: String
  "The name of the submitting system"
  createdSystem: String
  "Additional attributes obout the link, will be displayed as meta-{key}"
  metaData: [KeyValuePairOfStringAndStringInput!]
}

input NoteInput @source(name: "NoteInput", schema: "actions") {
  alertId: String!
  note: String
}

input OwnershipInput @source(name: "OwnershipInput", schema: "actions") {
  alertId: String!
  ownerId: String!
}

input ReinstateInput @source(name: "ReinstateInput", schema: "actions") {
  alertId: String!
  note: String
}

input SnoozeInput @source(name: "SnoozeInput", schema: "actions") {
  alertId: String!
  minutes: UnsignedShort!
  note: String
}

input SummaryFilter @source(name: "SummaryFilter", schema: "summaries") {
  summaryKinds: [SummaryKind]
  idType: IdType
}

input WebhookInput @source(name: "WebhookInput", schema: "actions") {
  alertId: String!
  webhookId: String!
  webhookType: String!
}

enum ActionType @source(name: "ActionType", schema: "actions") {
  OTHER
  NEW
  CLOSED
  UPDATED
  SNOOZED
  REACTIVATED
  SYSTEM_LINK
  NOTE
  ARTIFACT
  WEBHOOK
  OWN
  DISOWN
}

enum ApplyPolicy @source(name: "ApplyPolicy", schema: "actions") @source(name: "ApplyPolicy", schema: "legacy") @source(name: "ApplyPolicy", schema: "assets") @source(name: "ApplyPolicy", schema: "lookups") @source(name: "ApplyPolicy", schema: "webhooks") @source(name: "ApplyPolicy", schema: "summaries") {
  BEFORE_RESOLVER
  AFTER_RESOLVER
}

enum IdType @source(name: "IdType", schema: "summaries") {
  ALERT_ID
  ALERT_EVENT_ID
}

enum SummaryKind @source(name: "SummaryKind", schema: "summaries") {
  COUNT_ASSET_TYPE
  COUNT_CONTACT_TYPE
  CLOSEST_ASSET
  CLOSEST_ASSETS_ONLY
  CLOSEST_CONTACTS_ONLY
  LOCATION_TYPE
  CATEGORY
  SUB_CATEGORY
  COUNT_LOCATION_TYPE
  COUNT_EXPECTED_LOCATION_SEGMENT_TYPE
  COUNT_TRAVEL_TYPE
  COUNT_DOMESTIC_INTL_STATUS_TYPE
  COUNT_LOCAL_TRAVEL_STATUS_TYPE
  COUNT_TRAVELER
  COORDINATES
}

directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the resolver shall be executed.By default the resolver is executed after the policy has determined that the current user is allowed to access the field." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on SCHEMA | OBJECT | FIELD_DEFINITION

"Delegates a resolver to a remote schema."
directive @delegate("The path to the field on the remote schema." path: String "The name of the schema to which this field shall be delegated to." schema: String!) on FIELD_DEFINITION

"Annotates the original name of a type."
directive @source("The original name of the annotated type." name: String! "The name of the schema to which this type belongs to." schema: String!) repeatable on OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION

"The `DateTime` scalar represents an ISO-8601 compliant date time type."
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")

scalar Geometry

"The `Long` scalar type represents non-fractional signed whole 64-bit numeric values. Long can represent values between -(2^63) and 2^63 - 1."
scalar Long

scalar UnsignedShort