Logo van Crowdsec Service Api

Crowdsec Service Api

Organisatie
crowdsecurity
crowdsec-service-api

Use when the user wants to drive the CrowdSec Console **Service API (SAPI)** — the premium cloud REST API at admin.api.crowdsec.net — to programmatically manage blocklists (add/remove/bulk IPs, share, subscribe engines), allowlists, firewall/appliance integrations (Palo Alto, Fortinet, Cisco, F5, Sophos, pfSense/OPNsense…), remediation ROI metrics, and org-level decisions. Acts on the user's behalf with their API key. This is the cloud/API skill — for the local engine, cscli, and bouncers use the `crowdsec` skill.

Overzicht

Uitgevercrowdsecurity
Repositorycrowdsec-skill
Skillnaamcrowdsec-service-api
Sterren
29
Forks
2
Meegeleverde bestanden
6
LicentieMIT
Links
  • Instructies in Markdown

    Een SKILL.md-bestand dat het model laadt wanneer nodig, zodat het alleen tokens kost als een verzoek er daadwerkelijk bij past.

  • Werkt met elk LLM

    AI-skills zijn gewone Markdown, geen aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • 6 meegeleverde bestanden

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. Bestanden zijn alleen-lezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door crowdsecurity op GitHub. Lees de broninhoud voordat je de skill installeert.

Installatie

Installeer de AI-skill Crowdsec Service Api in TypingMind om deze met elke LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map — het leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/crowdsecurity/crowdsec-skill/tree/main/skills/crowdsec-service-api
  4. Schakel de skill in elke chat in waarin je deze beschikbaar wilt hebben.
Plug-ins → Skills → Nieuwe skill → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/crowdsecurity/crowdsec-skill.git /tmp/crowdsec-skill
mkdir -p .claude/skills
cp -r /tmp/crowdsec-skill/skills/crowdsec-service-api .claude/skills/crowdsec-service-api
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Crowdsec Service Api in een willekeurige chat in TypingMind in en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek erbij past, laadt het model zelf de volledige instructies — je hoeft de skill nooit handmatig aan te roepen en deze kost pas tokens wanneer je de skill daadwerkelijk gebruikt.

Het model laadt Crowdsec Service Api automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Crowdsec Service Api niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

CrowdSec Service API (SAPI) — cloud blocklist / allowlist / integration automation

SAPI is the premium REST API behind the CrowdSec Console. It manages cloud-side objects (private blocklists, allowlists, decisions, firewall integrations) that then push down to enrolled engines and bouncers. It is not the local engine API — there is no cscli here, only HTTPS.

Boundary — this skill vs the crowdsec skill

You want to…Use
Create/manage a private blocklist in the cloud, push IPs to it via APIthis skill
Wire a firewall/appliance (Palo Alto, Fortinet…) to a cloud integrationthis skill
Manage cloud allowlists, subscribe engines/tags/orgs to liststhis skill
Create/manage org-level decisions (targeted or ad-hoc bans, non-IP scopes, per tag/entity)this skill
Pull remediation ROI metricsthis skill
Install / run / debug the local engine, cscli, bouncers, WAFthe crowdsec skill
Enroll an engine into the Console (cscli console enroll)the crowdsec skill → references/install/console.md
Configure a local allowlist/whitelist on one enginethe crowdsec skill → references/configure/allowlists.md

Cloud allowlists/blocklists here only take effect on an engine once that engine is enrolled and subscribed to the list. The enrollment half lives in the crowdsec skill.

Operating contract

Every call here hits production and can change what subscribed engines enforce.

1 — Resolve the key. Never echo it, never write it anywhere but the file below:

bash
KEY="${CROWDSEC_SAPI_KEY:-$(cat ~/.config/crowdsec/sapi_key 2>/dev/null)}"
[ -n "$KEY" ] || echo "No key: export CROWDSEC_SAPI_KEY or store it in ~/.config/crowdsec/sapi_key (chmod 0600)"

2 — Validate before acting — one read call confirms the key and shows which tenant is about to change:

bash
curl -s -H "x-api-key: $KEY" https://admin.api.crowdsec.net/v1/info
# → {"organization_id":"…","subscription_type":"…","api_key_name":"…"}

3 — Classify read vs mutate. GET / download / POST …/search are safe — run them directly. Every POST / PATCH / DELETE that changes state requires explicit confirmation first: present the exact URL and JSON body, then wait for a yes.

4 — Extra-danger operations — spell out the consequence in plain words before the confirm, because subscribed engines enforce these lists, so a change can block or unblock real traffic and is hard to undo:

OperationWhy it's dangerous
POST …/ips/bulk_overwriteReplaces the entire blocklist content.
DELETE /blocklists/{id} · /allowlists/{id} · /integrations/{id}Removes the object and everyone's subscription/feed to it.
POST …/ips/deleteUn-blocks IPs fleet-wide.
POST /decisions with target.type: orgBans fleet-wide across every enrolled engine in the org.
…/shares / unshareGrants/revokes another organization access.
any …/subscribers changeChanges which engines/bouncers enforce the list.

5 — Clean up any object created only to test a recipe. A key that was exposed anywhere in transit must be rotated.

Step — Detect the intent

Cue from userGo to
"test my key", "what org / plan am I on"references/authentication.md
"create a blocklist", "push IPs from my SIEM/SOAR", "expire IPs", "share a blocklist with another org", "subscribe my engine to a list"references/blocklists.md
"cloud allowlist via API", "allow my office/CDN across the fleet"references/allowlists.md
"connect Palo Alto / Fortinet / Cisco / F5 / Sophos / pfSense / OPNsense", "firewall integration", "pull IP list in vendor format", "paginate the feed"references/integrations.md
"remediation metrics", "how much did CrowdSec save / block", "ROI dashboard"references/metrics.md
"org-level decisions via API", "aggregated decisions"references/decisions.md

Step — curl cheat sheet

All assume KEY is set (see operating contract). jq optional for readability.

PurposeCommand
Who am I / validate keycurl -s -H "x-api-key: $KEY" $B/info
List blocklistscurl -s -H "x-api-key: $KEY" "$B/blocklists"
List allowlistscurl -s -H "x-api-key: $KEY" "$B/allowlists"
List integrationscurl -s -H "x-api-key: $KEY" "$B/integrations"
List / find decisionscurl -s -H "x-api-key: $KEY" "$B/decisions" · …?ips=1.2.3.4
Remediation metricscurl -s -H "x-api-key: $KEY" "$B/metrics/remediation?start_date=$FROM&end_date=$TO"
Add IPs to a blocklist (mutating — confirm)curl -s -H "x-api-key: $KEY" -H 'Content-Type: application/json' -X POST "$B/blocklists/$ID/ips" -d '{"ips":["1.2.3.4"]}'
Create a decision (mutating — confirm)curl -s -H "x-api-key: $KEY" -H 'Content-Type: application/json' -X POST "$B/decisions" -d '{"duration":"4h","origin":"cscli","scenario":"manual","scope":"Ip","type":"ban","value":"1.2.3.4","target":{"type":"org","value":"<org>"}}'

where B=https://admin.api.crowdsec.net/v1.

Hard don'ts

  • Don't send a mutating call before the URL + body have been shown and approved (see operating contract §3–4).
  • Don't use …/ips/bulk_overwrite when the user means "add a few IPs" — that's …/ips. bulk_overwrite wipes the list first.
  • Don't print, log, or persist the API key anywhere but ~/.config/crowdsec/sapi_key. Resolve it from there or from the env var only.
  • Don't assume a cloud allowlist/blocklist is enforced just because the API call succeeded — the engine must be enrolled and subscribed, and it pulls on a poll cycle (verify locally via the crowdsec skill).

Docs

Canonical: https://docs.crowdsec.net/u/console/service_api/getting_started. Each references/ file cites the specific upstream page and the live OpenAPI operation it derives from.

Meegeleverde bestanden

Het model leest deze bestanden wanneer nodig terwijl de skill geladen is. Ze worden beschikbaar gesteld als leesbare bestanden en worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Crowdsec Service Api?

Use when the user wants to drive the CrowdSec Console **Service API (SAPI)** — the premium cloud REST API at admin.api.crowdsec.net — to programmatically manage blocklists (add/remove/bulk IPs, share, subscribe engines), allowlists, firewall/appliance integrations (Palo Alto, Fortinet, Cisco, F5, Sophos, pfSense/OPNsense…), remediation ROI metrics, and org-level decisions. Acts on the user's behalf with their API key. This is the cloud/API skill — for the local engine, cscli, and bouncers use the `crowdsec` skill.

Waarom Crowdsec Service Api gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Crowdsec Service Api bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model, en je kunt midden in een chat van model wisselen zonder dat de skill niet meer werkt. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Crowdsec Service Api in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/crowdsecurity/crowdsec-skill/tree/main/skills/crowdsec-service-api. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Crowdsec Service Api gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Crowdsec Service Api gebruiken?

Zoveel als je wilt. Zolang een model skills ondersteunt, kun je Crowdsec Service Api ermee gebruiken: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama en meer. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Crowdsec Service Api gratis?

Ja. Deze skill is door crowdsecurity op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. Deze volgt het open Agent Skills-formaat: een bestand met de naam SKILL.md met een naam en beschrijving, plus eventuele scripts, sjablonen of referentiebestanden die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇