ServiceNow (GraphQL)

Related queries and mutations in Notifications. Each has its own section.

Queries

getServicenowIncidentFields (query)

getServicenowIncidentFields is a query in the Monte Carlo GraphQL API, in Notifications. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get ServiceNow incident fields

Arguments

ArgumentTypeDescription
integrationIdUUID!The integration ID
mandatoryOnlyBooleanIf true, return only mandatory fields

Returns

[ServiceNowFieldOutput!]

Example

query GetServicenowIncidentFields($integrationId: UUID!) {
  getServicenowIncidentFields(integrationId: $integrationId) {
    key
    label
    type
    maxLength
    isMandatory
    defaultValue
    referenceType
  }
}

Types used only by getServicenowIncidentFields

ServiceNowFieldOutput

Object type. A ServiceNow incident field

FieldTypeDescription
keyString!The field key
labelString!The field label
typeString!The field type
maxLengthInt!The field max length
isMandatoryBoolean!If the field is mandatory
defaultValueStringThe field default value
referenceTypeStringThe field reference type
choices[ServiceNowChoiceOutput!]The choices for the field

Related types

ServiceNowChoiceOutput, UUID

getServicenowIntegrations (query)

getServicenowIntegrations is a query in the Monte Carlo GraphQL API, in Notifications. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get the configured ServiceNow integrations

Arguments

ArgumentTypeDescription
integrationIdUUIDFilter by integration ID

Returns

[ServiceNowIntegrationOutput]

Example

query GetServicenowIntegrations {
  getServicenowIntegrations {
    integrationId
    integrationName
    instanceName
    username
    defaultIncidentFields
    defaultAlertFields
    webhookEnabled
    webhookUrl
    createdTime
    updatedTime
  }
}

Related types

ServiceNowIntegrationOutput, UUID

getServicenowReferenceValues (query)

getServicenowReferenceValues is a query in the Monte Carlo GraphQL API, in Notifications. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get possible values for an incident field when the field is a reference type. Pass the field name and an optional query to filter by label.

Arguments

ArgumentTypeDescription
integrationIdUUID!The integration ID
fieldNameString!Incident field name of the reference
queryStringOptional filter for label
limitIntOptional limit (default 100)

Returns

[ServiceNowChoiceOutput]

Example

query GetServicenowReferenceValues($integrationId: UUID!, $fieldName: String!) {
  getServicenowReferenceValues(integrationId: $integrationId, fieldName: $fieldName) {
    value
    label
  }
}

Related types

ServiceNowChoiceOutput, UUID

getServicenowUsers (query)

getServicenowUsers is a query in the Monte Carlo GraphQL API, in Notifications. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get the list of ServiceNow users

Arguments

ArgumentTypeDescription
integrationIdUUID!The integration ID
queryStringA query to filter users by name

Returns

[ServiceNowUserOutput]

Example

query GetServicenowUsers($integrationId: UUID!) {
  getServicenowUsers(integrationId: $integrationId) {
    sysId
    userId
    displayName
    email
  }
}

Related types

ServiceNowUserOutput, UUID

testServicenowCredentials (query)

testServicenowCredentials is a query in the Monte Carlo GraphQL API, in Notifications. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Test the ServiceNow connection credentials

Arguments

ArgumentTypeDescription
instanceNameString!The instance name of the ServiceNow site
usernameStringThe ServiceNow username for basic authentication. DEPRECATED: Use credentials instead.
passwordStringThe user's password for basic authentication. DEPRECATED: Use credentials instead.
credentialsServiceNowCredentialsUnionInputThe ServiceNow credentials
optionsServiceNowIntegrationOptionsInputOptions for ServiceNow integration

Returns

ServiceNowTestCredentialsOutput

Example

query TestServicenowCredentials($instanceName: String!) {
  testServicenowCredentials(instanceName: $instanceName) {
    validCredentials
  }
}

Types used only by testServicenowCredentials

ServiceNowTestCredentialsOutput

Object type. A ServiceNow test credentials result

FieldTypeDescription
validCredentialsBoolean!Returns if the credentials are valid

Related types

ServiceNowCredentialsUnionInput, ServiceNowIntegrationOptionsInput

Mutations

createServicenowIncidentForAlert (mutation)

createServicenowIncidentForAlert is a mutation in the Monte Carlo GraphQL API, in Notifications. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Create a ServiceNow incident for alert

Arguments

ArgumentTypeDescription
alertIdUUID!ID of the alert
descriptionStringDescription of the incident
fieldsJSONString!ServiceNow incident fields
integrationIdUUID!ID of the ServiceNow integration
shortDescriptionString!Summary of the incident

Returns

CreateServiceNowIncidentForAlert

Example

mutation CreateServicenowIncidentForAlert($alertId: UUID!, $fields: JSONString!, $integrationId: UUID!, $shortDescription: String!) {
  createServicenowIncidentForAlert(alertId: $alertId, fields: $fields, integrationId: $integrationId, shortDescription: $shortDescription) {
    servicenowIncident {
      id
      incidentSysId
      incidentId
      integrationId
      notification
      createWarning
      createdAt
      recordType
    }
  }
}

Types used only by createServicenowIncidentForAlert

CreateServiceNowIncidentForAlert

Object type.

FieldTypeDescription
servicenowIncidentServiceNowIncidentOutputThe created ServiceNow incident

Related types

JSONString, ServiceNowIncidentOutput, UUID

createServicenowIntegration (mutation)

createServicenowIntegration is a mutation in the Monte Carlo GraphQL API, in Notifications. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Create a ServiceNow integration

Arguments

ArgumentTypeDescription
credentialsServiceNowCredentialsUnionInputThe ServiceNow credentials
defaultAlertFieldsJSONStringDefault values for alert fields
defaultIncidentFieldsJSONStringDefault values for incident fields. DEPRECATED: Use defaultAlertFields instead
instanceNameString!The instance name of the ServiceNow site
integrationNameString!A short name to identify the integration
optionsServiceNowIntegrationOptionsInputOptions for ServiceNow integration
passwordStringThe user's password for basic authentication; if not provided, the previous value will be used. DEPRECATED: Use credentials instead.
usernameStringThe ServiceNow username for basic authentication; if not provided, the previous value will be used. DEPRECATED: Use credentials instead.
webhookConfigServiceNowWebhookConfigInputWebhook config
webhookEnabledBooleanWhether the ServiceNow webhook is enabled

Returns

CreateServiceNowIntegration

Example

mutation CreateServicenowIntegration($instanceName: String!, $integrationName: String!) {
  createServicenowIntegration(instanceName: $instanceName, integrationName: $integrationName) {
    servicenowIntegration {
      integrationId
      integrationName
      instanceName
      username
      defaultIncidentFields
      defaultAlertFields
      webhookEnabled
      webhookUrl
      createdTime
      updatedTime
    }
  }
}

Types used only by createServicenowIntegration

CreateServiceNowIntegration

Object type.

FieldTypeDescription
servicenowIntegrationServiceNowIntegrationOutputThe integration that was created

Related types

JSONString, ServiceNowCredentialsUnionInput, ServiceNowIntegrationOptionsInput, ServiceNowIntegrationOutput, ServiceNowWebhookConfigInput

deleteServicenowIntegration (mutation)

deleteServicenowIntegration is a mutation in the Monte Carlo GraphQL API, in Notifications. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Delete a ServiceNow integration

Arguments

ArgumentTypeDescription
integrationIdUUID!The integration ID

Returns

DeleteServiceNowIntegration

Example

mutation DeleteServicenowIntegration($integrationId: UUID!) {
  deleteServicenowIntegration(integrationId: $integrationId) {
    deleted
  }
}

Types used only by deleteServicenowIntegration

DeleteServiceNowIntegration

Object type.

FieldTypeDescription
deletedBoolean

Related types

UUID

linkServicenowIncidentForAlert (mutation)

linkServicenowIncidentForAlert is a mutation in the Monte Carlo GraphQL API, in Notifications. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Link ServiceNow Incident for Alert

Arguments

ArgumentTypeDescription
alertIdUUID!ID of the alert
incidentNumberStringUsed when the incident number cannot be fetched from ServiceNow (incident-data access disabled, ACL-restricted fields, or event records).
incidentSysIdString!The incident sys_id for ServiceNow
integrationIdUUID!ID of the integration

Returns

LinkServiceNowIncidentForAlert

Example

mutation LinkServicenowIncidentForAlert($alertId: UUID!, $incidentSysId: String!, $integrationId: UUID!) {
  linkServicenowIncidentForAlert(alertId: $alertId, incidentSysId: $incidentSysId, integrationId: $integrationId) {
    servicenowIncident {
      id
      incidentSysId
      incidentId
      integrationId
      notification
      createWarning
      createdAt
      recordType
    }
  }
}

Types used only by linkServicenowIncidentForAlert

LinkServiceNowIncidentForAlert

Object type.

FieldTypeDescription
servicenowIncidentServiceNowIncidentOutputThe created ServiceNow incident

Related types

ServiceNowIncidentOutput, UUID

unlinkServicenowIncidentForAlert (mutation)

unlinkServicenowIncidentForAlert is a mutation in the Monte Carlo GraphQL API, in Notifications. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Unlink ServiceNow Incident for Alert

Arguments

ArgumentTypeDescription
alertIdUUID!ID of the alert
incidentSysIdString!The incident sys_id for ServiceNow
integrationIdUUID!ID of the integration

Returns

UnlinkServiceNowIncidentForAlert

Example

mutation UnlinkServicenowIncidentForAlert($alertId: UUID!, $incidentSysId: String!, $integrationId: UUID!) {
  unlinkServicenowIncidentForAlert(alertId: $alertId, incidentSysId: $incidentSysId, integrationId: $integrationId) {
    unlinked
  }
}

Types used only by unlinkServicenowIncidentForAlert

UnlinkServiceNowIncidentForAlert

Object type.

FieldTypeDescription
unlinkedBooleanTrue if the incident was unlinked

Related types

UUID

updateServicenowIntegration (mutation)

updateServicenowIntegration is a mutation in the Monte Carlo GraphQL API, in Notifications. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Update a ServiceNow integration

Arguments

ArgumentTypeDescription
credentialsServiceNowCredentialsUnionInputThe ServiceNow credentials
defaultAlertFieldsJSONStringDefault values for alert fields
defaultIncidentFieldsJSONStringDefault values for incident fields. DEPRECATED: Use defaultAlertFields instead
instanceNameString!The instance name of the ServiceNow site
integrationIdUUID!The integration ID
integrationNameString!A short name to identify the integration
optionsServiceNowIntegrationOptionsInputOptions for ServiceNow integration
passwordStringThe user's password for basic authentication; if not provided, the previous value will be used. DEPRECATED: Use credentials instead.
usernameStringThe ServiceNow username for basic authentication; if not provided, the previous value will be used. DEPRECATED: Use credentials instead.
webhookConfigServiceNowWebhookConfigInputWebhook config
webhookEnabledBooleanWhether the ServiceNow webhook is enabled

Returns

UpdateServiceNowIntegration

Example

mutation UpdateServicenowIntegration($instanceName: String!, $integrationId: UUID!, $integrationName: String!) {
  updateServicenowIntegration(instanceName: $instanceName, integrationId: $integrationId, integrationName: $integrationName) {
    servicenowIntegration {
      integrationId
      integrationName
      instanceName
      username
      defaultIncidentFields
      defaultAlertFields
      webhookEnabled
      webhookUrl
      createdTime
      updatedTime
    }
  }
}

Types used only by updateServicenowIntegration

UpdateServiceNowIntegration

Object type.

FieldTypeDescription
servicenowIntegrationServiceNowIntegrationOutputThe integration that was updated

Related types

JSONString, ServiceNowCredentialsUnionInput, ServiceNowIntegrationOptionsInput, ServiceNowIntegrationOutput, ServiceNowWebhookConfigInput, UUID

Source: The GraphQL API reference

This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.