send¶
Trigger email reports for boot and build tests.
More info about the send schema can be found here.
GET¶
Caution
Not implemented. Will return a status code
of 501
.
Note
For information about the triggered email reports, see the report resource
POST¶
-
POST
/send
¶ Schedule boot and/or build email report.
For more info on all the required JSON request fields, see the schema for POST requests.
Request JSON Object: - job (string) – The name of the job.
- git_branch (string) – The name of the branch.
- kernel (string) – The name of the kernel.
- lab_name (string) – The name of the lab.
- boot_report (boolean) – If the boot report should be created and sent. Default to 0 (false).
- build_report (boolean) – If the build report should be created and sent. Default to 0 (false).
- send_to – A string or an array of strings of email addresses to send the reports.
- send_cc – A string or an array of strings of email addresses to send the reports in carbon-copy.
- send_bcc – A string or an array of strings of email addresses to send the reports in blind carbon-copy.
- boot_send_to – A string or an array of strings of email addresses to send only the boot report.
- boot_send_cc – A string or an array of strings of email addresses to send only the boot report in carbon-copy.
- boot_send_bcc – A string or an array of strings of email addresses to send only the boot report in blind carbon-copy.
- build_send_to – A string or an array of strings of email addresses to send only the build report.
- build_send_cc – A string or an array of strings of email addresses to send only the build report in carbon-copy.
- build_send_bcc – A string or an array of strings of email addresses to send only the build report in blind carbon-copy.
- in_reply_to (string) – The message ID the email report should be a reply to.
- delay (int) – Number of seconds after which the email report will be sent. Default to 60*60 seconds (1 hour) with a maximum value of 60*60*5 (5 hours).
- format (array) – The format of the email to send. Accepted values are txt and html.
- subject (string) – The subject for the email: overrides the default one. If sending both boot and build reports, the same subject will be used for both emails.
Request Headers: - Authorization – The token necessary to authorize the request.
- Content-Type – Content type of the transmitted data, must be
application/json
. - Accept-Encoding – Accept the
gzip
coding.
Response Headers: - Content-Type – Will be
application/json; charset=UTF-8
.
Status Codes: - 202 Accepted – The request has been accepted and will be processed.
- 400 Bad Request – JSON data not valid or other.
- 403 Forbidden – Not authorized to perform the operation.
- 415 Unsupported Media Type – Wrong content type.
- 422 Unprocessable Entity – No real JSON data provided.
Example Requests
POST /send HTTP/1.1 Host: api.kernelci.org Content-Type: application/json Accept: */* Authorization: token { "job": "next", "kernel": "next-20140801", "boot_report": 1, "build_report": 1, "build_send_to": ["another.email@example.net"], "send_to": ["email@example.net"], "delay": 14400 }
POST /send HTTP/1.1 Host: api.kernelci.org Content-Type: application/json Accept: */* Authorization: token { "job": "next", "kernel": "next-20150113", "lab_name": "lab", "boot_report": 1, "send_to": ["email@example.net"], "delay": 30 }
POST /send HTTP/1.1 Host: api.kernelci.org Content-Type: application/json Accept: */* Authorization: token { "job": "next", "kernel": "next-20150330", "lab_name": "lab", "boot_report": 1, "build_report": 1, "send_to": ["email@example.net"], "format": ["txt", "html"], "delay": 30 }
POST /send HTTP/1.1 Host: api.kernelci.org Content-Type: application/json Accept: */* Authorization: token { "job": "next", "kernel": "next-20150330", "lab_name": "lab", "boot_report": 1, "build_report": 1, "send_to": ["email@example.net"], "send_cc": ["anotheremail@example.net"], "build_send_cc": ["yetanotheremail@example.net"], "format": ["txt", "html"], "delay": 30 }
POST /send HTTP/1.1 Host: api.kernelci.org Content-Type: application/json Accept: */* Authorization: token { "job": "next", "kernel": "next-20150603", "boot_report": 1, "send_to": ["mailing-list@example.net"], "format": ["txt", "html"], "in_reply_to": "<emailmessageid>", "delay": 30 }
DELETE¶
Caution
Not implemented. Will return a status code
of 501
.