This GraphQL API provides access to alerts data related to Pikud HaOref red alerts history.
You can interact with this API by sending GraphQL queries to the provided endpoint.
Live Query URL: https://pikud-haoref-graphql-api.tuval-simha.workers.dev/graphql
query AllAlertsFromToday {
allAlertsFromToday(orderBy: CREATED_AT_DESC, first: 10) {
edges {
node {
category
date
location
title
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
query AllAlertsFromLastWeek {
allAlertsFromLastWeek(orderBy: CREATED_AT_DESC, first: 10) {
edges {
node {
category
date
location
title
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
query AllAlertsFromLastMonth {
allAlertsFromLastMonth(orderBy: CREATED_AT_DESC, first: 10) {
edges {
node {
category
date
location
title
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
- Make sure to insert the date in the format: DD.MM.YYYY
query AllAlertsByDateRange($fromDateTime: DateTime, $toDateTime: DateTime) {
allAlertsByDateRange(dates: { fromDateTime: $fromDateTime, toDateTime: $toDateTime }, first: 10) {
edges {
node {
category
date
location
title
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
For all queries, pagination is supported using the first
and after
arguments. The first
argument determines the number of items to return per page, and the after
argument is used to paginate through the result set.
first
: Specifies the number of items to return per page.after
: Indicates the cursor to start paginating from.
You can filter alerts based on their type using the typeBy
argument. This allows you to retrieve alerts of specific types only. The available types are:
- MISSILES
- UAV_INTRUSION
- EARTH_QUAKE
- RADIO_LOGICAL_EVENT
- TSUNAMI
- HAZARDOUS_MATERIALS
- TERRORIST_INFILTRATION
- DRILL_MISSILES
- DRILL_GENERAL
- DRILL_EARTH_QUAKE
- DRILL_RADIO_LOGICAL_EVENT
- DRILL_TSUNAMI
- DRILL_UAV_INTRUSION
- DRILL_HAZARDOUS_MATERIALS
- DRILL_TERRORIST_INFILTRATION
Make sure to pass the desired type as an argument when querying for alerts.
This repository is open-source, and contributions are welcome! If you'd like to contribute, please fork the repository, make your changes, and submit a pull request. Appreciate your help in improving this project!
If you find this project helpful and would like to support its development, consider buying me a coffee: