Skip to main content

The Alert Logic API definitions.

Project description

Alert Logic APIs definitions

Build Status PyPI version

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

alertlogic-sdk-definitions-0.1.103.tar.gz (900.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alertlogic_sdk_definitions-0.1.103-py3-none-any.whl (885.4 kB view details)

Uploaded Python 3

File details

Details for the file alertlogic-sdk-definitions-0.1.103.tar.gz.

File metadata

File hashes

Hashes for alertlogic-sdk-definitions-0.1.103.tar.gz
Algorithm Hash digest
SHA256 a6e9cf071378a766ed3b2157000d55728d53aa748c13a8a4666d4f3c4b05e4f7
MD5 41bae666db266d51c2bce82d6b6c10e7
BLAKE2b-256 bf4fa1b54f7e999c148f48a3bdcc1d5a2c8ef61f2b79de372066e56c1258c9e7

See more details on using hashes here.

File details

Details for the file alertlogic_sdk_definitions-0.1.103-py3-none-any.whl.

File metadata

File hashes

Hashes for alertlogic_sdk_definitions-0.1.103-py3-none-any.whl
Algorithm Hash digest
SHA256 c14b89b347f1be8399934411408575b0b21a15aa9295fadf5027980f9a9d10c7
MD5 18012857fd190d8195c449a5bcb1a5d2
BLAKE2b-256 81aa1b8e80db63b76a64d6656c265d3f8cd3c03278ab6166a2f318c1fc82d478

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page