Path parametersAdd the following path parameters as part of the endpoint: Parameter | Type | Definition |
---|
id required
| integer
| ID of the delivery method you want to update. Note |
---|
How can I get the ID of a delivery method? You can use the GET/methods endpoint to get the IDs of the delivery methods defined in your domain. |
|
Request bodyYou must specify the updates you need to apply to the delivery method in the request body: Parameter | Type | Definition |
---|
name required
| string
| Name of the new delivery method. | type required
| string
| Delivery method type. Available values are: email
httpjson
servicedesk
jira
pushover
pagerduty
slack
servicenow
Learn more about the delivery method types in Devo in this section. | status
| boolean
| Include this parameter and set it to true if you want to activate the delivery method upon creation. If you don’t include it, the default value is false . | config
| object
| This JSON object includes the following parameters: timezone - Enter the time zone that will be used to calculate when alerts can be sent.
locale - Specify the language of the alert content. Available values are en , es and ca .
Then, include the following parameters depending of the delivery method type you want to create: Expand |
---|
title | Email delivery method |
---|
| - email required (string ) The email address where the alerts should be sent. - attachEvents (boolean ) Set this to true if you want to attach the events that triggered the alert to the email. Default value is false . - maxEvents (integer ) Set the maximum number of events to be included in the email. You must include the attachEvents parameter to use this one, otherwise you will get an error. |
Expand |
---|
title | HTTP-JSON delivery method |
---|
| - urlDestination required (string ) The URL of the server to which the alerts should be sent. - authMethod required (string ) Choose one of the available authentication options: USERNAME_PASSWORD or BEARER . Depending on the chosen option, you must add the user / password or bearer parameters. - bearer (string ) Use a bearer token to authenticate your user. - user (string ) and password (string ) Add your user and password if you choose this authentication method. - contentType required (string ) An HTTP header that is used to indicate the media type of the resource. Choose the required header: - application/json - This is the default option. - application/x-www-form-urlencoded (legacy) - This is the old header used for requests. - user (string ) and password (string ) Add your user and password if you choose this authentication method. - customerHeaders (array ) You may add specific headers using this parameter. Add a list including the required header names. |
Expand |
---|
title | Jira delivery method |
---|
| - urlDestination required (string ) The URL of the Jira Cloud site to which alerts will be sent, which follows the format <https://<your_JIRA_domain>>.atlassian.net/rest/api/2/issue/ . Be aware that the number 2 corresponds to the Jira API version supported, which is the only supported version currently (prior or later versions are unsupported). - user required (string ) and password required (string ) This is the JIRA server username and password for communication with the server. The username should be the email address associated with the Atlassian account and the Password should be the API token as configured here. - issueType required (string ) Specify the Jira issue type for alerts that use this delivery method (Task, Bug, Story...). Be aware that the issue type must be written exactly as it exists in Jira, otherwise you will get an error message. - projectKey required (string ) Specify the project key under which the alert will be created. The project key is the prefix used for numbering issues in a specific project. Be aware that the project key must be written exactly as it exists in Jira, otherwise you will get an error message. - port (integer ) By default, this value will be automatically set to 80 (if you're using http ) or 443 (if you're using https ). You can indicate a specific different port using this parameter. |
Expand |
---|
title | PagerDuty delivery method |
---|
| - serviceKey required (string ) Enter the service or integration API Key for the Devo service that you set up in PagerDuty. - client (string ) Optionally, enter the name of the resource whose information is triggering this event. - clientUrl (string ) If you specify a client, you may use this field to enter the URL that leads to the resource specified as the client. This URL will then be included in the PagerDuty notifications. |
Expand |
---|
title | Pushover delivery method |
---|
| - appToken required (string ) The API key of your application. To obtain the API key, you need to register your application. For more information, see the Pushover API documentation. - userGroup required (string ) The key that identifies the Pushover user or group. - device (string ) The name of the user's device to which you want to send the notification. If a device name is not specified for a user, notifications are sent to all of the user's active devices. - title (string ) A short title for the alert message. If you do not specify a title, the name of your application will be used as the notification title. - url (string ) This is a supplementary URL that you may want to include with the notification. - urlTitle (string ) This is the text that will link to the supplementary URL. For example, "Forward to tech support". This is only useful if you are specifying a supplementary URL. - sound (string ) Choose a Pushover notification sound to be played when the message is delivered to a device. |
Expand |
---|
title | Service Desk delivery method |
---|
| - urlDestination required (string ) The URL of the ServiceDesk Plus server to which alerts will be sent. The URL usually follows the format: <http://<servername>>:<port number>/sdpapi/request/ (for example, http://localhost:8080/sdpapi/request/ ). - key required (string ) This is the API key for the technician. For instructions on creating a technician API key, see the ServiceDesk Plus documentation. |
Expand |
---|
| - urlDestination required (string ) URL of the ServiceNow instance where you want to send the alerts. Note that the alerts will be always sent to a ServiceNow table called incident. The URL must follow the format below: https://instanceName.service-now.com/api/now/table/incident Choose either user / password or clientId / clientSecret as your authentication option: - user required (string ) and password required (string ) Enter your ServiceNow instance user and password. - clientId required (string ) and clientSecret required (string ) If you want to use this option, you must define this authentication method in your ServiceNow instance and get the required Client ID and Client Secret. - company required (string ) You may specify a Company defined in your ServiceNow instance to be included in the alerts. If you leave this value empty, it will be automatically filled with your Devo domain name. Note that specifying a value that does not exist in your ServiceNow instance will return an empty value in the alert. - assignmentGroup (string ) You may enter an Assignment group defined in ServiceNow to be included in the alerts. In ServiceNow, Assignment groups are used for the purpose of routing and managing incidents and request tickets. In order to do any work, support analysts must be assigned to one or more assignment groups. Note that specifying a value that does not exist in your ServiceNow instance will return an empty value in the alert. |
Expand |
---|
title | Slack delivery method |
---|
| - channel required (string ) Enter the name of the Slack channel set when you created the webhook. - webhook required (string ) The webhook URL you created in your Slack workspace. The webhook will direct alert messages to the Slack channel set when you created the webhook. |
|
ExampleFind below examples to create each of the delivery method types. Learn how to authorize your request in this article. Email delivery method Code Block |
---|
curl --location --request POST 'https://api-us.devo.com/delco/methods' --header 'standAloneToken:YOUR_TOKEN' --header 'Content-Type: application/json' --data '{
"name": "email_test",
"type": "email",
"status": true,
"config": {
"email": "user@devo.com",
"timezone": "Europe/Madrid",
"locale": "en",
"attachEvents": true,
"maxEvents": 4
}
}' |
HTTP-JSON delivery method Code Block |
---|
curl --location --request POST 'https://api-us.devo.com/delco/methods' --header '"standAloneToken:YOUR_TOKEN'$token" --header 'Content-Type: application/json' --data '{
"name": "http_test_api",
"type": "httpjson",
"status": true,
"config": {
"timezone": "Europe/Paris",
"locale": "en",
"contentType":"application/json",
"customerHeaders": {
"header1": "test",
"header2": "test2"
},
} "urlDestination": "https://webhook.site/3a0591c2-7ec6-443b-98fb-203bbee44ca9"
}
}' |
Jira delivery method Code Block |
---|
curl --location --request POST 'https://api-us.devo.com/delco/methods' --header 'standAloneToken:YOUR_TOKEN' --header 'Content-Type: application/json' --data '{
"name": "http_test",
"type": "jira",
"status": true,
"config": {
"issueType": "Test",BpxcAx-KOs=CFAC07B0",
"projectKey": "AT",
"urlDestination":"https://devoinc.atlassian.net/rest/",
"user":"user@devo.com",
"timezone": "Europe/Paris",
"locale": "en",
"port": "443"
}
}' |
Pushover delivery method Code Block |
---|
curl --location --request POST 'https://api-us.devo.com/delco/methods' --header 'standAloneToken:YOUR_TOKEN' --header 'Content-Type: application/json' --data '{
"name": "qa_pushoOverRegressiond011020236",
"type": "servicedesk",
"config": {
"timezone": "Europe/Paris",
"locale": "en",
"appToken": "anitabcdefghijklmjp",
"userGroup": "g482028agajahaka"
}
}' |
Service Desk delivery method Code Block |
---|
curl --location --request POST 'https://api-us.devo.com/delco/methods' --header 'standAloneToken:YOUR_TOKEN' --header 'Content-Type: application/json' --data '{
"name": "qa_pushoOverRegressiond011020236",
"type": "pushover",
"config": {
"timezone": "Europe/Paris",
"locale": "en",
"key": "my_key",
"urlDestination": "http://localhost:8080/sdpapi/request/"
}
}' |
Service Now delivery method Code Block |
---|
curl --location --request POST 'https://api-us.devo.com/delco/methods' --header 'standAloneToken:YOUR_TOKEN' --header 'Content-Type: application/json' --data '{
"name": "service_now",
"type": "servicenow",
"config": {
"timezone": "Europe/Madrid",
"locale": "es",
"clientId": "36165ac0ba92311016e632221f35e45e",
"clientSecret": "^Wj5!id7[i",
"company":"DelcoDevo",
"password":"%RkJxI!6.99tk5",
"user":"admin",
"urlDestination":"https://dev76477.service-now.com/api/now/table/incident",
"assigmentGroup": "QA",
"company": "Devo"
}
}' |
Slack delivery method Code Block |
---|
curl --location --request POST 'https://api-us.devo.com/delco/methods' --header 'standAloneToken:YOUR_TOKEN' --header 'Content-Type: application/json' --data '{
"name": "qa_slackRegresssion01102023",
"type": "slack",
"config": {
"channel": "alert_test",
"webhook": "https://hooks.slack.com/services/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",
"locale": "en",
"timezone": "Europe/Madrid"
}
}' |
Check the list of available responses: Code | Description |
---|
200 | Operation succeeded. Delivery method created. Code Block |
---|
[
{
"id": 0,
"name": "Delivery method name",
"type": "email",
"status": true,
"config": {
"timezone": "Europe/Madrid",
"locale": "en",
"email": "user@email.com",
"attachEvents": "string",
"maxEvents": 0
}
}
] |
| 400 | Request error. Code Block |
---|
{
"code": 0,
"msg": "string",
"cid": "string",
"context": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"messageKey": "string",
"language": "string"
} |
| 403 | Authentication required. Code Block |
---|
{
"code": 0,
"msg": "string",
"cid": "string",
"context": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"messageKey": "string",
"language": "string"
} |
|
|