magicsword-io / sigconverter.io

An opensource sigma conversion tool built using pysigma
https://sigconverter.io/
Apache License 2.0
95 stars 21 forks source link

Add More API Endpoints #24

Open nasbench opened 11 months ago

nasbench commented 11 months ago

This PR adds a couple of API endpoints to make it easy to integrate sigconverter into projects.

FYI: These will be used by the sigma vscode extensions

M3NIX commented 11 months ago

@nasbench If we intend to introduce API Endpoints I think we should keep it more REST like.

These would be my suggestions for changes:

Here some examples of how I imagine it:

URL Response
/api/v1/backends List of all backend with identifier and description (same information like in sigma list targets)
/api/v1/formats?backend=splunk Return all formats for the splunk backend with name and description (same information like in sigma list formats splunk)
/api/v1/formats Return all formats for the backends with name and description (same information like in sigma list formats <backendname>) + the backend name for the specific format
/api/v1/pipelines List of all available pipelines (same information like in sigma list pipelines)
/api/v1/pipelines?backend=splunk only return pipelines which have all or splunk in the allowed backends list

Let me know what you think

nasbench commented 11 months ago

You went for the more official route :) My idea was just to do a quick API endpoints to get the data.

But no worries, I'll make the changes to make REST like a little bit. Thanks for the suggestion.