The Alert Logic API definitions.
Project description
Alert Logic APIs definitions
Repository contains static definitions of Alert Logic APIs, used for documentation generation, SDK and CLI.
Usage
Install
pip install alertlogic-sdk-definitions
For the one who doesn't require python code, GitHub releases are produced containing an archive with OpenAPI definitions only, see here
Test
python -m unittest
Use
List available service definitions:
>>> import alsdkdefs
>>> alsdkdefs.list_services()
OrderedDict([('aecontent', ServiceDefinition(aecontent)), ('aefr', ServiceDefinition(aefr)), ('aepublish', ServiceDefinition(aepublish)), ('aerta', ServiceDefinition(aerta)), ('aetag', ServiceDefinition(aetag)), ('aetuner', ServiceDefinition(aetuner)), ('aims', ServiceDefinition(aims)), ('assets_query', ServiceDefinition(assets_query)), ('assets_write', ServiceDefinition(assets_write)), ('connectors', ServiceDefinition(connectors)), ('credentials', ServiceDefinition(credentials)), ('deployments', ServiceDefinition(deployments)), ('herald', ServiceDefinition(herald)), ('ingest', ServiceDefinition(ingest)), ('iris', ServiceDefinition(iris)), ('kalm', ServiceDefinition(kalm)), ('notify', ServiceDefinition(notify)), ('otis', ServiceDefinition(otis)), ('policies', ServiceDefinition(policies)), ('remediations', ServiceDefinition(remediations)), ('responder', ServiceDefinition(responder)), ('search', ServiceDefinition(search)), ('subscriptions', ServiceDefinition(subscriptions)), ('themis', ServiceDefinition(themis))])
Get path to a service definitions paths:
>>> import alsdkdefs
>>> alsdkdefs.get_service_defs("aerta")
['/usr/local/lib/python3.8/site-packages/alsdkdefs/apis/aerta/aerta.v1.yaml']
Get normalised service spec of a service(all refs resolved, path parameters moved to the methods, allOfs are merged if possible):
>>> import alsdkdefs
>>> alsdkdefs.load_service_spec("aerta")
Validate service spec:
>>> import alsdkdefs
>>> service_spec = alsdkdefs.load_service_spec("aerta")
>>> alsdkdefs.validate(service_spec)
Quick validation of a definition
While YAML definition is developed apart from the current package and current repo,
it is required to validate it prior to push, please add this to your Makefile
in order to achieve quick validation:
curl -s https://raw.githubusercontent.com/alertlogic/alertlogic-sdk-definitions/master/scripts/validate_my_definition.sh | bash -s <path/to/definitions/directory>
If no directory is specified, by default doc/openapi/ directory will be used, if such behaviour is desired, use following line instead:
curl -s https://raw.githubusercontent.com/alertlogic/alertlogic-sdk-definitions/master/scripts/validate_my_definition.sh | bash
It is recommended to invoke it via curl, since validation of the definitions might be extended with time.
Script requires python3 to be available in the system.
Validation checks:
- YAML of a definition is valid
- Definition passes OpenAPI 3 schema validation
Development
Please submit a PR. Please note that API definitions are updated automatically and any changes to it will be overwritten, see: automatic update process
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alertlogic_sdk_definitions-0.1.167.tar.gz.
File metadata
- Download URL: alertlogic_sdk_definitions-0.1.167.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07c2cd3d55b9fcee83f87514bc81e726e6e740b2a30bea9488db388d0409340a
|
|
| MD5 |
27bf37712a7fe5ac27f5019457f8858f
|
|
| BLAKE2b-256 |
5c2010344112930ae8f9e6b2b10de7fa0fe5378b8d7b9fa3acb3ebd6a82f815e
|
File details
Details for the file alertlogic_sdk_definitions-0.1.167-py3-none-any.whl.
File metadata
- Download URL: alertlogic_sdk_definitions-0.1.167-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
011298ede3db19c39255dd9800dc39640fc575df0cec98bf7e0abae71f6e5440
|
|
| MD5 |
08a455cc427efff9afa01148e92c7bab
|
|
| BLAKE2b-256 |
c680ab1c33212bf363195d5d4326c7cece9d5ed7d0f5d638be16312626b1165f
|