> For the complete documentation index, see [llms.txt](https://docs.petabencana.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.petabencana.id/authenticated-api/umpan.md).

# Umpan

Petabencana memanfaatkan umpan data dari sejumlah sumber pihak ketiga. Endpoint ini memungkinkan pembuatan data ke dalam sistem untuk pengguna yang berwenang. Catatan: [autentikasi](https://docs.petabencana.id/general/authentication) diperlukan untuk mengirim data melalui endpoint /feeds (/umpan).

## POST /feeds/qlue

Menambahkan laporan ke sistem dari [Qlue](https://www.qlue.co.id/). Atribut-atribut yang didukung untuk laporan Qlue:

| Atribut        | Deskripsi                                                                             | Format                                                                | Wajib |
| -------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ----- |
| post\_id       | Pengenal unik untuk laporan Qlue                                                      | Integer                                                               | Ya    |
| created\_at    | Tanggal dan jam kartu dibuat                                                          | Date ([ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm))  | Ya    |
| title          | Judul laporan yang dimasukkan                                                         | String                                                                | Tidak |
| text           | Deskripsi dari kejadian bencana                                                       | String                                                                | Tidak |
| image\_url     | URL dari gambar terkait                                                               | String                                                                | Tidak |
| qlue\_city     | Dari area mana laporan berasal? (lihat Area Didukung)                                 | String                                                                | Ya    |
| disaster\_type | Jenis bencana apa yang dilaporkan? (Saat ini hanya mendukung bencana `flood /`banjir) | String                                                                | Ya    |
| location       | Lokasi geografis dari kejadian bencana                                                | Lat/Long in [ESPG:4326](http://spatialreference.org/ref/epsg/wgs-84/) | Ya    |

Berikut adalah panggilan sederhana untuk POST laporan baru dari Qlue:

```
curl -X POST -H "X-Api-Key: API_KEY_GOES_HERE" -d '{
    "post_id":1234567802,
    "created_at":"2016-12-09T11:32:52.011Z",
    "image_url":"http://myimg",
    "qlue_city":"jabodetabek",
    "disaster_type":"flood",
    "text":"A big flood",
    "location": {
        "lat": -6.149531,
        "lng": 106.869342
    }
}' "https://data.petabencana.id/feeds/qlue"
```

Laporan telah berhasil dibuat:

```javascript
{
  "post_id": 1234567802,
  "created": true
}
```

Permintaan telah berhasil namun laporannya sudah ada:

```javascript
{
  "post_id": 1234567802,
  "created": false,
  "message": "1234567802 already exists in reports table"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.petabencana.id/authenticated-api/umpan.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
