Bulk Imports
Create a bulk import
Create a new bulk import for incidents. Requires global API key authentication.
POST
/
v1
/
bulk_imports
Create a bulk import
curl --request POST \
--url https://api.rootly.com/v1/bulk_imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"attributes": {
"entity_type": "Incident",
"file_url": "<string>",
"notification_email": "jsmith@example.com"
}
}
}
'import requests
url = "https://api.rootly.com/v1/bulk_imports"
payload = { "data": { "attributes": {
"entity_type": "Incident",
"file_url": "<string>",
"notification_email": "jsmith@example.com"
} } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
attributes: {
entity_type: 'Incident',
file_url: '<string>',
notification_email: 'jsmith@example.com'
}
}
})
};
fetch('https://api.rootly.com/v1/bulk_imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rootly.com/v1/bulk_imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'attributes' => [
'entity_type' => 'Incident',
'file_url' => '<string>',
'notification_email' => 'jsmith@example.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rootly.com/v1/bulk_imports"
payload := strings.NewReader("{\n \"data\": {\n \"attributes\": {\n \"entity_type\": \"Incident\",\n \"file_url\": \"<string>\",\n \"notification_email\": \"jsmith@example.com\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.rootly.com/v1/bulk_imports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"attributes\": {\n \"entity_type\": \"Incident\",\n \"file_url\": \"<string>\",\n \"notification_email\": \"jsmith@example.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootly.com/v1/bulk_imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"attributes\": {\n \"entity_type\": \"Incident\",\n \"file_url\": \"<string>\",\n \"notification_email\": \"jsmith@example.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyWas this page helpful?
Previous
Get bulk import statusRetrieves the current status of a bulk import job.
**Use this endpoint to:**
- Poll for import progress
- Check validation errors if status is `validation_failed`
- Get final results when status is `completed` or `failed`
Next
⌘I
Create a bulk import
curl --request POST \
--url https://api.rootly.com/v1/bulk_imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"attributes": {
"entity_type": "Incident",
"file_url": "<string>",
"notification_email": "jsmith@example.com"
}
}
}
'import requests
url = "https://api.rootly.com/v1/bulk_imports"
payload = { "data": { "attributes": {
"entity_type": "Incident",
"file_url": "<string>",
"notification_email": "jsmith@example.com"
} } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
attributes: {
entity_type: 'Incident',
file_url: '<string>',
notification_email: 'jsmith@example.com'
}
}
})
};
fetch('https://api.rootly.com/v1/bulk_imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rootly.com/v1/bulk_imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'attributes' => [
'entity_type' => 'Incident',
'file_url' => '<string>',
'notification_email' => 'jsmith@example.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rootly.com/v1/bulk_imports"
payload := strings.NewReader("{\n \"data\": {\n \"attributes\": {\n \"entity_type\": \"Incident\",\n \"file_url\": \"<string>\",\n \"notification_email\": \"jsmith@example.com\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.rootly.com/v1/bulk_imports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"attributes\": {\n \"entity_type\": \"Incident\",\n \"file_url\": \"<string>\",\n \"notification_email\": \"jsmith@example.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootly.com/v1/bulk_imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"attributes\": {\n \"entity_type\": \"Incident\",\n \"file_url\": \"<string>\",\n \"notification_email\": \"jsmith@example.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_body