# setPointIgnition **Endpoint:** `POST https://firesim.cs.gsu.edu/api/setPointIgnition` Set one or more cells to ignite simultaneously at simulation start. `xs` and `ys` are comma-separated strings with no spaces (e.g. "50,100" and "50,100" defines two ignition points at (50,50) and (100,100)). ## Parameters | Name | Type | Required | Default | Description | |------|------|----------|---------|-------------| | `userToken` | string | yes | — | Your simulation token. | | `xs` | string | yes | — | Comma-separated row indices of cells to ignite (e.g. "50,100"). | | `ys` | string | yes | — | Comma-separated column indices of cells to ignite (e.g. "50,100"). | ## Responses ### HTTP 200 Ignition points set successfully. **Example:** ```json "multiple ignition points set" ``` ### HTTP 400 Bad request. Observed when: Invalid: xs malformed. **Example:** ```json "" ``` ### HTTP 500 Internal server error (Spring JSON). Returned when `userToken` is missing or invalid — the server cannot locate the simulation instance for that token. **Example:** ```json { "timestamp": "2026-05-20T16:41:22.728+00:00", "status": 500, "error": "Internal Server Error", "path": "/api/setPointIgnition" } ``` ## Examples ### Python ```python import requests base_url: str = "https://firesim.cs.gsu.edu/api/setPointIgnition/" params: dict[str, str] = { "userToken": "abc123xyz", "xs": "50,100", "ys": "50,100", } response = requests.post(base_url, params=params) print(response.text) ``` ### JavaScript ```javascript /** @type {string} */ const BASE_URL = "https://firesim.cs.gsu.edu/api/setPointIgnition/"; const params = { userToken: "abc123xyz", xs: "50,100", ys: "50,100", }; const url = new URL(BASE_URL); Object.entries(params).forEach(([k, v]) => url.searchParams.set(k, v)); fetch(url.toString(), { method: "POST" }) .then(res => res.text()) .then(console.log); ``` ### cURL ```bash BASE_URL="https://firesim.cs.gsu.edu/api/setPointIgnition/" curl -s -X POST \ -G --data-urlencode "userToken=abc123xyz" \ -G --data-urlencode "xs=50,100" \ -G --data-urlencode "ys=50,100" \ "$BASE_URL" ``` ### Java ```java import java.net.URI; import java.net.http.*; String BASE_URL = "https://firesim.cs.gsu.edu/api/setPointIgnition/"; String queryString = "userToken=abc123xyz" + "&" + "xs=50,100" + "&" + "ys=50,100"; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(BASE_URL + "?" + queryString)) .POST(HttpRequest.BodyPublishers.noBody()) .build(); HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); ``` ### Go ```go import ( "fmt" "io" "net/http" "net/url" ) baseURL := "https://firesim.cs.gsu.edu/api/setPointIgnition/" params := url.Values{} params.Set("userToken", "abc123xyz") params.Set("xs", "50,100") params.Set("ys", "50,100") resp, _ := http.PostForm(baseURL, params) defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) ``` ### Rust ```rust use reqwest::blocking::Client; let base_url = "https://firesim.cs.gsu.edu/api/setPointIgnition/"; let params = vec![ ("userToken", "abc123xyz"), ("xs", "50,100"), ("ys", "50,100"), ]; let client = Client::new(); let response = client.post(base_url).query(¶ms).send().unwrap(); println!("{}", response.text().unwrap()); ```