Skip to main content
Get alert by id
curl --request GET \
  --url https://api.campflare.com/v2/alert/:id
import requests

url = "https://api.campflare.com/v2/alert/:id"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.campflare.com/v2/alert/:id', 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.campflare.com/v2/alert/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.campflare.com/v2/alert/:id"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.campflare.com/v2/alert/:id")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.campflare.com/v2/alert/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "campground_ids": [
    "<string>"
  ],
  "parameters": {
    "date_ranges": [
      {
        "starting_date": "2023-12-25",
        "nights": 123
      }
    ],
    "status": [],
    "campsite_kinds": [],
    "min_rv_length": 123,
    "min_trailer_length": 123
  },
  "created_at": "2023-11-07T05:31:56Z",
  "notifications": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "sent_at": "2023-11-07T05:31:56Z",
      "campground_id": "<string>",
      "campsite_id": "<string>",
      "date_range": {
        "starting_date": "2023-12-25",
        "nights": 123
      },
      "webhook_http_response_code": "<string>"
    }
  ],
  "canceled_at": "2023-11-07T05:31:56Z",
  "metadata": {},
  "webhook_override_url": "<string>"
}
{
"error": {
"message": "<string>",
"kind": "<string>"
}
}
This endpoint simply retuens the properties of an Alert, along with the notifications the alert has triggered.

Response

Response

id
string<uuid>
required

Unique identifier for the alert

status
enum<string>
required

Status of the alert

Available options:
active,
canceled,
expired
campground_ids
string[]
required
parameters
object
required
created_at
string<date-time>
required

Timestamp of the alert creation

notifications
object[]
required
canceled_at
string<date-time>

Timestamp of the last update (when/if canceled)

metadata
object

The additional metadata associated with the alert when created

webhook_override_url
string

The webhook URL override for this alert, if one was set at creation time.