{"type":"api","title":"Retrieve agent notification rule","meta":{"id":"/apps/pubhub/media/000-v7-apis/5b3454a4300b838cc17f7b2cdc0690fdd15058d5/301f59de-3d0d-342e-94f3-1388b071308d","info":{"description":"\n## Overview\nManage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.","title":"Agents API","version":"7.0.34"},"security":[{"BearerAuth":[]}],"tags":[{"name":"Cloud and Enterprise Agents"},{"name":"Enterprise Agent Cluster"},{"name":"Cloud and Enterprise Agent Notification Rules"},{"name":"Agent Proxies"}],"externalDocs":{"description":"Find out more about Agents & Monitors","url":"https://docs.thousandeyes.com/product-documentation/global-vantage-points/working-with-agent-settings"},"openapi":"3.0.1","servers":[{"description":"ThousandEyes API production URL","url":"https://api.thousandeyes.com/v7"}],"securitySchemes":{"BearerAuth":{"description":"Bearer authentication token","scheme":"bearer","type":"http"}}},"spec":{"description":"Returns details of an agent notification rule, including agents it is assigned to.\n","operationId":"getAgentsNotificationRule","parameters":[{"description":"Unique ID for the agent notification rule.","example":"281474976710706","explode":false,"in":"path","name":"notificationRuleId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.","in":"query","name":"aid","required":false,"schema":{"example":"1234","type":"string"}}],"responses":{"200":{"content":{"application/hal+json":{"schema":{"properties":{"ruleId":{"description":"Agent notification rule ID","example":"281474976710706","readOnly":true,"type":"string"},"ruleName":{"description":"Name of the agent notification rule","example":"Default Agent Offline Notification","type":"string"},"expression":{"description":"Expression of agent notification rule","example":"((lastContact \u003e= 30 min))","type":"string"},"notifyOnClear":{"description":"Send notification when notification clears","example":true,"type":"boolean"},"isDefault":{"description":"Agent notification rule will be automatically included on all new Enterprise Agents.","example":false,"type":"boolean"},"notifications":{"description":"Alert notification object.","properties":{"email":{"properties":{"message":{"description":"Message used for email notification.","example":"This test is failing, check as soon as possible.","type":"string"},"recipients":{"description":"List of recipients emails that will be notified.","example":["user1@thousandeyes.com","user2@cisco.com"],"items":{"type":"string"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/AlertEmail"},"thirdParty":{"items":{"properties":{"integrationId":{"description":"Unique ID of the integration.","example":"wb-78","type":"string"},"integrationName":{"description":"Name of the integration.","example":"integrationSlack1","type":"string"},"integrationType":{"description":"Type of the alert integration","enum":["pager-duty","slack"],"example":"slack","type":"string","$$ref":"#/components/schemas/AlertIntegrationType"},"target":{"description":"Target URL of the integration.","example":"https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ","type":"string"},"authMethod":{"description":"(PagerDuty only) Authentication method.","example":"Basic","type":"string"},"authUser":{"description":"(PagerDuty only) Authentication user.","example":"user123","type":"string"},"authToken":{"description":"(PagerDuty only) Authentication token.","example":"0VqDYEpidpHVAK397x8PBsmZ","type":"string"},"channel":{"description":"(Slack only) Slack `#channel` or `@user`.","example":"#slackChannel","type":"string"}},"type":"object","$$ref":"#/components/schemas/AlertIntegrationBase"},"type":"array"},"webhook":{"items":{"properties":{"integrationId":{"description":"Unique ID of the integration.","example":"wb-78","type":"string"},"integrationName":{"description":"Name of the integration.","example":"integrationSlack1","type":"string"},"integrationType":{"description":"Type of the alert integration","enum":["pager-duty","slack"],"example":"slack","type":"string","$$ref":"#/components/schemas/AlertIntegrationType"},"target":{"description":"Target URL of the integration.","example":"https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ","type":"string"},"authMethod":{"description":"(PagerDuty only) Authentication method.","example":"Basic","type":"string"},"authUser":{"description":"(PagerDuty only) Authentication user.","example":"user123","type":"string"},"authToken":{"description":"(PagerDuty only) Authentication token.","example":"0VqDYEpidpHVAK397x8PBsmZ","type":"string"},"channel":{"description":"(Slack only) Slack `#channel` or `@user`.","example":"#slackChannel","type":"string"}},"type":"object","$$ref":"#/components/schemas/AlertIntegrationBase"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/AgentNotification"},"agents":{"items":{"properties":{"agentType":{"description":"Type of the agent.","enum":["cloud","enterprise-cluster","enterprise"],"example":"enterprise-cluster","readOnly":true,"type":"string","$$ref":"#/components/schemas/CloudEnterpriseAgentType"},"ipAddresses":{"description":"Array of private IP addresses.","example":["99.139.65.220","9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce"],"items":{"type":"string"},"readOnly":true,"type":"array"},"publicIpAddresses":{"description":"Array of public IP addresses.","example":["192.168.1.78","f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c"],"items":{"type":"string"},"readOnly":true,"type":"array"},"network":{"description":"Network (including ASN) of agent’s public IP.","example":"AT&T Services, Inc. (AS 7018)","readOnly":true,"type":"string"},"agentId":{"description":"Unique ID of the agent.","example":"281474976710706","readOnly":true,"type":"string"},"agentName":{"description":"Name of the agent.","example":"thousandeyes-stg-va-254","type":"string"},"location":{"description":"Location of the agent.","example":"San Francisco Bay Area","readOnly":true,"type":"string"},"countryId":{"description":"2-digit ISO country code","example":"US","readOnly":true,"type":"string"},"enabled":{"description":"Flag indicating if the agent is enabled.","example":true,"type":"boolean"},"prefix":{"description":"Prefix containing agents public IP address.","example":"99.128.0.0/11","readOnly":true,"type":"string"},"verifySslCertificates":{"description":"Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.","example":true,"readOnly":true,"type":"boolean"}},"required":["agentType"],"type":"object","$$ref":"#/components/schemas/AgentResponse"},"type":"array"},"_links":{"description":"A links object containing the self link.","properties":{"self":{"description":"A hyperlink from the containing resource to a URI.","properties":{"href":{"description":"Its value is either a URI [RFC3986] or a URI template [RFC6570].","example":"https://api.thousandeyes.com/v7/link/to/resource/id","type":"string"},"templated":{"description":"Should be true when the link object's \"href\" property is a URI template.","type":"boolean"},"type":{"description":"Used as a hint to indicate the media type expected when dereferencing the target resource.","type":"string"},"deprecation":{"description":"Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.","type":"string"},"name":{"description":"Its value may be used as a secondary key for selecting link objects that share the same relation type.","type":"string"},"profile":{"description":"A URI that hints about the profile of the target resource.","type":"string"},"title":{"description":"Intended for labelling the link with a human-readable identifier","type":"string"},"hreflang":{"description":"Indicates the language of the target resource","type":"string"}},"required":["href"],"type":"object","$$ref":"#/components/schemas/Link"}},"readOnly":true,"type":"object","$$ref":"#/components/schemas/SelfLinks"}},"type":"object","$$ref":"#/components/schemas/NotificationRuleDetail"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"schema":{"properties":{"error":{"example":"invalid_token","type":"string"},"error_description":{"example":"Invalid access token","type":"string"}},"type":"object","$$ref":"#/components/schemas/UnauthorizedError"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions to query endpoint"},"404":{"content":{"application/problem+json":{"example":{"type":"about:blank","title":"URI Resource Not Found","status":404,"detail":"Details explaining if the 404 error is related to an invalid URI or a wrong ID","instance":"/v7"},"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/problem+json":{"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Exhausted rate limit for the organization"},"500":{"content":{"application/problem+json":{"example":{"type":"about:blank","title":"Internal server error","status":500,"detail":"Optional detail about the internal error message.","instance":"/v7"},"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Internal server error"},"502":{"content":{"application/problem+json":{"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Bad Gateway"},"default":{"description":"An error occurred"}},"summary":"Retrieve agent notification rule","tags":["Cloud and Enterprise Agent Notification Rules"],"__originalOperationId":"getAgentsNotificationRule","security":[{"BearerAuth":[]}],"method":"get","path":"/agents/notification-rules/{notificationRuleId}"}}