Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: API documentation renderer #2108

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/deploy-public-website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ jobs:
- name: Make destination directory for compiled CSS
run: mkdir -vp docs/stylesheets/

- name: Compile CSS from SCSS files
uses: gha-utilities/[email protected]
with:
source: src/sekoiaio.scss
destination: docs/stylesheets/sekoiaio.css

- name: Install Poetry
run: |
pip install poetry
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ jobs:
- name: Make destination directory for compiled CSS
run: mkdir -vp docs/stylesheets/

- name: Compile CSS from SCSS files
uses: gha-utilities/[email protected]
with:
source: src/sekoiaio.scss
destination: docs/stylesheets/sekoiaio.css

- name: Install Poetry
run: |
pip install poetry
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.idea
site
docs/stylesheets/sekoiaio.css
docs/stylesheets/openapi.css
venv
*~
redoc.egg-info
Expand Down
4 changes: 0 additions & 4 deletions docs/cti/develop/index.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/cti/develop/rest_api/community.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/cti/develop/rest_api/dashboard.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/cti/develop/rest_api/edl-gateway.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/cti/develop/rest_api/enrichments.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/cti/develop/rest_api/intelligence.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/cti/develop/rest_api/playbooks.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/cti/develop/rest_api/quickstart.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/cti/develop/rest_api/telemetry.md

This file was deleted.

183 changes: 183 additions & 0 deletions docs/developer/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
---
template: overrides/openapi.html
---

# Sekoia.io API documentation

{!docs/developer/quickstart.md!}


<script>
window.onload = ()=> {
OpenAPIViewer.init({
title:"Sekoia.io API Documentation",
regions: [
"FRA1",
// "FRA2",
// "MCO1",
// "UAE1",
],
urls: [
"https://app.sekoia.io/api/v1/dashboard/swagger.json?context=public",
"https://app.sekoia.io/api/v1/telemetry/openapi.json?context=public",
"https://app.sekoia.io/api/v1/events/openapi.json?context=public",
"https://app.sekoia.io/api/v1/notebooks/openapi.json?context=public",
"https://app.sekoia.io/api/v1/sic/conf/swagger.json?context=public",
"https://app.sekoia.io/api/v1/swagger.json?context=public",
"https://app.sekoia.io/api/v1/ingest/swagger.json?context=public",
"https://app.sekoia.io/api/v1/sic/swagger.json?context=public",
"https://app.sekoia.io/api/v1/symphony/swagger.json?context=public",
"https://app.sekoia.io/api/v2/asset-management/openapi.json?context=public",
"https://app.sekoia.io/api/v1/edl-gateway/openapi.json",
"https://app.sekoia.io/api/v2/inthreat/swagger.json?context=public",
],
tag_mappings:{
"mfa": "MFA",
"me": "User profile",
"automations": "Automation",
},
menu:[
{
name: "User",
tags: [
"User Authentication",
"User profile",
"MFA",
"permissions",
],
},
{
name: "Workspace",
tags: [
"customers", // TODO deprecated, get rid of it
"communities",
"api-keys",
"licenses",
"invitations",
"plans",
"sub-communities",
"avatars",
"users", // TODO set this tag on all user administration stuff
"roles",
"counters", // TODO => +Avatars
],
},
{
name: "Configuration",
tags: [
"Entities",
"Enrichers",
"Callbacks",
"Services",
"Intakes",
"Assets",
"Atoms",
"Intakes by status",
"Intakes errors and warnings",
"Intakes lag and processing lag",
"formats",
"Intake Optimization Rules",
]
},
{
name: "Intelligence",
tags: [
"Objects",
"CTI Objects", // TODO fix telemetry => Objects
"Indicators",
"Observables",
"Observable relationships",
"Exports",
"Kill Chains",
"Outgoing Feeds",
"Collections",
"MISP",
"TAXII",
"Bundles",
"Images",
"Labels",
"Graphs",
"Relationships",
"Reports",
"Support",
"Sources",
"Vulnerabilities",
],
},
{
name: "Detection",
tags: [
"Rules",
"compilation-reports", // TODO sicconf => Rules
"rules-catalog-multi-tenant", // TODO sicconf => Rules
"rules-catalog", // TODO sicconf => Rules
"Alerts",
"datasources",
"generation-modes", // TODO sicconf => Generation modes
"Alert filters",
"IOC Collections",
"Alerts",
"Alert", // TODO sicalert => Detection+Alerts
"Alert Entities", // TODO sicalert => Detection+Alerts
"Alert Rules", // TODO sicalert => Detection+Alerts
"Alert Sources and Targets", // TODO sicalert => Detection+Alerts
"Stats", // TODO sicalert => Detection+Alerts+Alert stats
"Alert Status", // TODO sicalert => Detection+Alerts
"Alert Type", // TODO sicalert => Detection+Alerts
"Countermeasures",
"Cyber Kill Chain",
"UEBA",
],
},
{
name: "Investigation",
tags: [
"Cases",
"Case", // TODO => Cases
"Comments", // TODO => + Cases
"Notebooks",
"Events",
"Tasks",
],
},
{
name: "Automation",
tags: [
"Playbooks",
"Playbook actions telemetry",
"modules",
"Playbook runs",
"Playbooks runs", // TODO: Fix symphony => Playbook runs
"Node runs",
"Action Runs",
"Actions",
"Connector Configurations",
"Connectors",
"Module Configurations",
"Modules",
"Runs",
"Trigger Configurations",
"Triggers",
"SSH Keys",
],
},
{
name:"Reporting",
tags: [
"dashboards",
"Intelligence",
"Intelligence statistics", // => Intelligence
"Events",
"Rules",
"Alert filters",
"Assets",
"Playbooks",
"Automation statistics", // => Playbooks
"AI assistant",
"Statistics", // ?
]
}
]
})
};
</script>
21 changes: 21 additions & 0 deletions docs/javascript/openapi-viewer.min.js

Large diffs are not rendered by default.

Loading
Loading