Developer Interface#

This part of the documentation covers all the public interfaces of Cybsi Cloud SDK.

Low-level client#

Client interface#

class cybsi.cloud.Client(config)[source]#

The main entry point for all actions with Cybsi Cloud REST API.

As the client is low-level, it is structured around Cybsi Cloud REST API routes. Use properties of the client to retrieve handles of API sections.

The client also follows Cybsi Cloud REST API input-output formats, providing little to no abstration from JSONs API uses. It’s relatively easy to construct an invalid request, so use client’s functions wisely.

Hint

Use Client properties to construct needed API handles. Don’t construct sub-APIs manually.

Do this:
>>> from cybsi.cloud import Client
>>> client = Client(config)
>>> res = client.iocean.collections.filter()
Not this:
>>> from cybsi.cloud.iocean import IOCeanAPI
>>> IOceanAPI(connector).collections
Parameters:

config (Config) – Client config.

Usage:
>>> from cybsi.cloud import Config, Client
>>> api_key = "8Nqjk6V4Q_et_Rf5EPu4SeWy4nKbVPKPzKJESYdRd7E"
>>> config = Config(api_key)
>>> client = Client(config)
>>>
>>> collections = client.iocean.collections.filter()
>>> print(collections.data())
>>> client.close()  # "with" syntax is also supported for Client
close()[source]#

Close client and release connections.

Return type:

None

property auth#

Auth API handle.

property iocean#

IOCean API handle.

property insight#

Insight API handle.

property files#

Files API handle.

class cybsi.cloud.AsyncClient(config)[source]#

The asynchronous analog of Client.

As you can see, the asynchronous client has fewer features than synchronous one. This is because we don’t simply copy-paste features, but provide them only when they’re actually useful in asynchronous applications.

Parameters:

config (Config) – Client config.

async aclose()[source]#

Close client and release connections.

Return type:

None

property iocean#

IOCean asynchronous API handle.

property insight#

Insight asynchronous API handle.

property files#

Files API handle.

Client configuration#

class cybsi.cloud.Config(*, api_key, api_url='https://cybsi.cloud', ssl_verify=True, timeouts=<cybsi.cloud.client_config.Timeouts object>, limits=<cybsi.cloud.client_config.Limits object>, retry=3)[source]#

Client config.

Parameters:
  • api_key (str) – Cybsi Cloud API key.

  • api_url (str) – Base API URL.

  • ssl_verify (bool) – Enable SSL certificate verification.

  • timeouts (Timeouts) – Timeout configuration. Default configuration is 60 sec on all operations.

  • limits (Limits) – Configuration for limits to various client behaviors. Default configuration is max_connections=100, max_keepalive_connections=20.

  • retry (int) – The count of sending request attempts if a connection or transport error occurred.

class cybsi.cloud.Limits(*, max_connections=None, max_keepalive_connections=None, keepalive_expiry=5.0)[source]#

Configuration for limits to various client behaviors.

Parameters:
  • max_connections (Optional[int]) – The maximum number of concurrent connections that may be established.

  • max_keepalive_connections (Optional[int]) – Allow the connection pool to maintain keep-alive connections below this point. Should be less than or equal to max_connections.

  • keepalive_expiry (Optional[float]) – The maximum time (in second) to allow before closing a keep-alive connection.

class cybsi.cloud.Timeouts(*, default=<cybsi.cloud.api.NullType object>, connect=<cybsi.cloud.api.NullType object>, read=<cybsi.cloud.api.NullType object>, write=<cybsi.cloud.api.NullType object>)[source]#

Timeout configuration.

Note

Default parameters value is Null, it means “use default timeout”. None value means “infinite timeout”.

Please note those timeouts don’t restrict total execution time of SDK methods (like register, view and so on). Wrap calls to SDK methods with asyncio.wait_for or similar functions if you want to control total execution time.

Parameters:
  • default (Union[float, None, Timeouts, NullType]) – Timeout (in seconds) on all operations listed below.

  • connect (Union[float, None, NullType]) – The maximum amount of time (in seconds) to wait for a connection attempt to a server to succeed.

  • read (Union[float, None, NullType]) – The maximum amount of time (in seconds) to wait between consecutive read operations for a response from the server.

  • write (Union[float, None, NullType]) – The maximum amount of time (in seconds) to wait between consecutive write operations (send request) to the server.

Raises:

ValueError – Timeout must either default settings for all operations or set all three parameters explicitly.

Usage:
>>> # No timeouts.
>>> Timeouts(default=None)
>>> # 5s timeout on all operations.
>>> Timeouts(default=5.0)
>>> # 5s timeout on connect, no other timeouts.
>>> Timeouts(default=None, connect=5.0)
>>> # 10s timeout on connect. 5s timeout elsewhere.
>>> Timeouts(default=5.0, connect=10.0)

Auth#

Use this section of API operate auth information.

class cybsi.cloud.auth.AuthAPI(connector)[source]#

Auth API.

property api_keys#

API-Keys API handle.

property resources#

Resources API handle.

class cybsi.cloud.auth.APIKeysAPI(connector)[source]#

API-Keys API.

filter(*, revoked=None, description=None, cursor=None, limit=None)[source]#

Get API keys.

Note

Calls GET /auth/keys.

Parameters:
Return type:

Page[APIKeyView]

Returns:

Page with API-Key common views and next page cursor.

Raises:

InvalidRequestError – Provided values are invalid (see args value requirements).

generate(api_key)[source]#

Generate new API-Key.

Note

Calls POST /auth/keys.

Parameters:

api_key (APIKeyForm) – API-Key.

Return type:

APIKeyRegistrationView

Returns:

API-Key view.

Raises:

Note

Semantic error codes specific for this method:
revoke(api_key_id)[source]#

Revoke API-Key.

Warning

Key revocation is an irreversible operation.

Note

Calls POST /auth/keys/{api_key_id}/revoked.

Parameters:

api_key_id (int) – API-Key identifier.

Raises:
class cybsi.cloud.auth.APIKeyRegistrationView(data=None)[source]#

API-Key view.

property id#

API-Key identifier.

property key#

API-Key value.

Warning

Do not forget to save this value. It is not recoverable if lost.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.auth.APIKeyForm(permissions, *, request_limits=None, expires_at=None, description=None)[source]#

API-Key form.

This is the form you need to fill to generate API-Key.

Parameters:
class cybsi.cloud.auth.APIKeyView(data=None)[source]#

API-Key view.

property id#

API-Key identifier.

property created_at#

Creation date.

property expires_at#

Expiration date. The API-Key is automatically disabled after the expiration date.

property description#

API-Key description.

property last_used_at#

Last usage date.

property revoked#

API-Key revoked flag.

property permissions#

List of permissions.

property request_limits#

List of request limits.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.auth.RequestLimitForm(*, resource_id, action, limit_period, limit)[source]#

Request limit form.

Parameters:
  • resource_id (int) – resource identifier.

  • action (ResourceAction) – limited action.

  • limit_period (LimitPeriod) – time window for limit.

  • limit (int) – maximum requests count within time window.

class cybsi.cloud.auth.RequestLimitTargetView(data=None)[source]#

Request limit target.

property resource#

Resource.

property action#

Limited action.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.auth.RequestLimitView(data=None)[source]#

Request limit.

property target#

Limit target.

property limit#

Maximum requests count within time window.

property period#

Time window for limit.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

enum cybsi.cloud.auth.LimitPeriod(value)[source]#

Limit time window.

Valid values are as follows:

Day = <LimitPeriod.Day: 'Day'>#
enum cybsi.cloud.auth.ResourceAction(value)[source]#

Resource action.

Valid values are as follows:

Read = <ResourceAction.Read: 'Read'>#
Write = <ResourceAction.Write: 'Write'>#
ReadChildren = <ResourceAction.ReadChildren: 'ReadChildren'>#
WriteChildren = <ResourceAction.WriteChildren: 'WriteChildren'>#
class cybsi.cloud.auth.ResourcePermissionView(data=None)[source]#

Resource permission.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

property resource#

Resource.

property actions#

List of permitted actions.

class cybsi.cloud.auth.ResourcePermissionForm(*, resource_id, actions)[source]#

Resource permissions form.

This is the form for resource permissions you have to fill to generate API-Key.

Parameters:
class cybsi.cloud.auth.ResourcesAPI(connector)[source]#

Resources API.

filter(*, parent_id=None, cursor=None, limit=None)[source]#

Get resources.

Note

Calls GET /auth/resources.

Parameters:
Return type:

Page[ResourceView]

Returns:

Page with resource common views and next page cursor.

Raises:

Note

Semantic error codes specific for this method: * ResourceNotFound

class cybsi.cloud.auth.ResourceView(data=None)[source]#

Resource view.

property id#

Resource identifier.

property name#

Resource name.

property parent#

Parent resource.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.auth.ResourceRefView(data=None)[source]#

Resource reference view.

property id#

API-Key identifier.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

enum cybsi.cloud.auth.TokenType(value)[source]#

Token type.

Valid values are as follows:

Bearer = <TokenType.Bearer: 'Bearer'>#
class cybsi.cloud.auth.TokenView(data=None)[source]#

Authorization token view.

property access_token#

Access token. A cryptic string.

property type#

Token type.

property expires_in#

Token lifetime until expiration.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

IOCean#

Use this section of API to access IOCean objects, collections and schemas.

class cybsi.cloud.iocean.IOCeanAPI(connector)[source]#

IOCean API.

property collections#

Get IOCean collections handle.

property schemas#

Get IOCean schemas handle.

property objects#

Objects API handle.

class cybsi.cloud.iocean.IOCeanAsyncAPI(connector)[source]#

IOCean asynchronous API.

property collections#

Collections asynchronous API handle.

property schemas#

Schemas asynchronous API handle.

property objects#

Objects asynchronous API handle.

class cybsi.cloud.iocean.CollectionAPI(connector)[source]#

Collection API

register(collection)[source]#

Register collection.

Note

Calls POST /iocean/collections.

Parameters:

collection (CollectionForm) – collection form.

Return type:

CollectionRegistrationView

Returns:

Collection registration view.

Raises:

Note

Conflict error codes specific for this method: * DuplicateCollection Semantic error codes specific for this method: * SchemaNotFound

view(collection_id)[source]#

Get collection.

Note

Calls GET /iocean/collections/{collectionName}.

Parameters:

collection_id (str) – collection’s id.

Return type:

CollectionView

Returns:

Collection view.

Raises:

NotFoundError – Resource not found.

view_schema(collection_id)[source]#

Get collection schema.

Note

Calls GET /iocean/collections/{collectionName}/schema.

Parameters:

collection_id (str) – collection’s id.

Return type:

SchemaView

Returns:

Schema view.

Raises:

NotFoundError – Resource not found.

update(collection_id, tag, *, schema_id)[source]#

Update collection

Note

Calls PATCH /iocean/collections/{collectionName}.

Parameters:
Raises:

Note

Semantic error codes specific for this method: * SchemaNotFound

filter(*, cursor=None, limit=None)[source]#

Get collections.

Note

Calls GET /iocean/collections.

Parameters:
Return type:

Page[CollectionCommonView]

Returns:

Page with collection views and next page cursor.

Raises:

InvalidRequestError – Provided values are invalid (see args value requirements).

class cybsi.cloud.iocean.CollectionAsyncAPI(connector)[source]#

Collection asynchronous API

async register(collection)[source]#

Register collection.

Note

Calls POST /iocean/collections.

Parameters:

collection (CollectionForm) – collection form.

Return type:

CollectionRegistrationView

Returns:

Collection registration view.

Raises:

Note

Conflict error codes specific for this method: * DuplicateCollection Semantic error codes specific for this method: * SchemaNotFound

async view(collection_id)[source]#

Get collection.

Note

Calls GET /iocean/collections/{collectionName}.

Parameters:

collection_id (str) – collection’s id.

Return type:

CollectionView

Returns:

Collection view.

Raises:

NotFoundError – Resource not found.

async view_schema(collection_id)[source]#

Get collection schema.

Note

Calls GET /iocean/collections/{collectionName}/schema.

Parameters:

collection_id (str) – collection’s id.

Return type:

SchemaView

Returns:

Schema view.

Raises:

NotFoundError – Resource not found.

async update(collection_id, tag, *, schema_id)[source]#

Update collection

Note

Calls PATCH /iocean/collections/{collectionName}.

Parameters:
Raises:

Note

Semantic error codes specific for this method: * SchemaNotFound

async filter(*, cursor=None, limit=None)[source]#

Get collections.

Note

Calls GET /iocean/collections.

Parameters:
Return type:

AsyncPage[CollectionCommonView]

Returns:

Page with collection views and next page cursor.

Raises:

InvalidRequestError – Provided values are invalid (see args value requirements).

class cybsi.cloud.iocean.CollectionForm(name, schema_id)[source]#

Collection form

class cybsi.cloud.iocean.CollectionCommonView(data=None)[source]#

Collection common view

property name#

Collection name

property schema_id#

Schema identifier

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.iocean.CollectionRegistrationView(data=None)[source]#

Collection registration view

property name#

The name of registered collection

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.iocean.CollectionView(resp)[source]#

Collection view

property name#

Collection name

raw()#

Returns raw object view

Return type:

Dict[str, Any]

property schema_id#

Schema identifier

property tag#

Resource tag.

Protects against concurrent object changes. Alternatively, can be used for caching.

class cybsi.cloud.iocean.ObjectAPI(connector)[source]#

Object API.

add(*, collection_id, obj_type, keys, context={})[source]#

Add object to collection.

If there is registered object with corresponding keys and there are no keys conflicts, this method: - rewrites object context with new one; - extends key set of the registered object.

Note

Calls POST /iocean/collections/{collection_id}/objects.

Parameters:
Raises:
Return type:

None

Note

Semantic error codes specific for this method:
delete(*, collection_id, key_type, key_value)[source]#

Delete object from collection.

Note

Calls DELETE /iocean/collections/{collection_id}/objects.

Parameters:
  • collection_id (str) – Collection identifier.

  • key_type (ObjectKeyType) – Key type of object to be removed.

  • key_value (str) – Key value of object to be removed.

Raises:
Return type:

None

Note

Semantic error codes specific for this method:
filter(*, collection_id, cursor=None, limit=None)[source]#

Get objects from the collection.

Note

Calls GET /iocean/collections/{collection_id}/objects.

Parameters:
Return type:

Tuple[Page[ObjectView], Optional[Cursor]]

Returns:

Page with object views. The page contains next page cursor. Changes cursor. The cursor can be used to call changes().

Note

Changes cursor is returned only on the first page.

Raises:
changes(*, collection_id, cursor, limit=None)[source]#

Get objects changes from the collection.

Note

Calls GET /iocean/collections/{collection_id}/objects/changes.

Parameters:
  • collection_id (str) – Collection identifier.

  • cursor (Cursor) – Page cursor. On the first request you should pass the cursor value obtained when requesting objects filter(). Subsequent calls should use cursor property of the page returned by changes().

  • limit (Optional[int]) – Page limit.

Return type:

Page[ObjectChangeView]

Returns:

Page with changes.

Warning

Cursor behaviour differs from other API methods.

Do not save returned page cursor if it is None. None means that all changes for this moment are received. More changes can arrive later. Pass your previous non-none cursor value in loop, until None cursor is returned.

Please wait some time if method returns a page with None cursor.

Raises:

Note

Semantic error codes specific for this method:
class cybsi.cloud.iocean.ObjectsAsyncAPI(connector)[source]#

Object asynchronous API.

async add(*, collection_id, obj_type, keys, context={})[source]#

Add object to collection.

If there is registered object with corresponding keys and there are no keys conflicts, this method: - rewrites object context with new one; - extends key set of the registered object.

Note

Calls POST /iocean/collections/{collection_id}/objects.

Parameters:
Raises:
Return type:

None

Note

Semantic error codes specific for this method:
async delete(*, collection_id, key_type, key_value)[source]#

Delete object from collection.

Note

Calls DELETE /iocean/collections/{collection_id}/objects.

Parameters:
  • collection_id (str) – Collection identifier.

  • key_type (ObjectKeyType) – Key type of object to be removed.

  • key_value (str) – Key value of object to be removed.

Raises:
Return type:

None

Note

Semantic error codes specific for this method:
async filter(*, collection_id, cursor=None, limit=None)[source]#

Get objects from the collection.

Note

Calls GET /iocean/collections/{collection_id}/objects.

Parameters:
Return type:

Tuple[AsyncPage[ObjectView], Optional[Cursor]]

Returns:

Page with object views. The page contains next page cursor. Changes cursor. The cursor can be used to call changes().

Note

Changes cursor is returned only on the first page.

Raises:
async changes(*, collection_id, cursor, limit=None)[source]#

Get objects changes from the collection.

Note

Calls GET /iocean/collections/{collection_id}/objects/changes.

Parameters:
  • collection_id (str) – Collection identifier.

  • cursor (Cursor) – Page cursor. On the first request you should pass the cursor value obtained when requesting objects filter(). Subsequent calls should use cursor property of the page returned by changes().

  • limit (Optional[int]) – Page limit.

Return type:

AsyncPage[ObjectChangeView]

Returns:

Page with changes.

Warning

Cursor behaviour differs from other API methods.

Do not save returned page cursor if it is None. None means that all changes for this moment are received. More changes can arrive later. Pass your previous non-none cursor value in loop, until None cursor is returned.

Please wait some time if method returns a page with None cursor.

Raises:

Note

Semantic error codes specific for this method:
class cybsi.cloud.iocean.ObjectKeyView(data=None)[source]#

Object key view

property type#

Object key type

property value#

Key value.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.iocean.ObjectView(data=None)[source]#

Object view.

property type#

Object type.

property keys#

Object keys.

property context#

Object context.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.iocean.ObjectChangeView(data=None)[source]#

Object change view.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

property operation#

Object operation.

property obj#

Object.

enum cybsi.cloud.iocean.ObjectKeyType(value)[source]#

Object key type.

Valid values are as follows:

MD5Hash = <ObjectKeyType.MD5Hash: 'MD5Hash'>#
SHA1Hash = <ObjectKeyType.SHA1Hash: 'SHA1Hash'>#
SHA256Hash = <ObjectKeyType.SHA256Hash: 'SHA256Hash'>#
SHA512Hash = <ObjectKeyType.SHA512Hash: 'SHA512Hash'>#
DomainName = <ObjectKeyType.DomainName: 'DomainName'>#
URL = <ObjectKeyType.URL: 'URL'>#
IPAddress = <ObjectKeyType.IPAddress: 'IPAddress'>#
IPNetwork = <ObjectKeyType.IPNetwork: 'IPNetwork'>#
enum cybsi.cloud.iocean.ObjectType(value)[source]#

Object type.

Valid values are as follows:

File = <ObjectType.File: 'File'>#
DomainName = <ObjectType.DomainName: 'DomainName'>#
URL = <ObjectType.URL: 'URL'>#
IPAddress = <ObjectType.IPAddress: 'IPAddress'>#
IPNetwork = <ObjectType.IPNetwork: 'IPNetwork'>#
enum cybsi.cloud.iocean.ObjectOperation(value)[source]#

Object change operation.

Valid values are as follows:

Add = <ObjectOperation.Add: 'Add'>#
Remove = <ObjectOperation.Remove: 'Remove'>#
Update = <ObjectOperation.Update: 'Update'>#
class cybsi.cloud.iocean.SchemaAPI(connector)[source]#

Schema API.

register(schema)[source]#

Register an object schema.

Note

Calls POST /iocean/schemas.

Parameters:

schema (Dict[str, Any]) – JSON schema of the object. See Object schemas for information about schema structure.

Return type:

SchemaRegistrationView

Returns:

Schema registration view.

Raises:

Note

Conflict error codes specific for this method:
update(*, schema_id, tag, schema)[source]#

Update the object schema.

Note

Calls PUT /iocean/schemas/{schema_id}.

Parameters:
  • schema_id (str) – URL friendly string, uniquely identifies json schema.

  • tag (Tag) – SchemaView.tag value. Use view() to retrieve it.

  • schema (Dict[str, Any]) – JSON schema of the object. See Object schemas for information about schema structure.

Raises:
Return type:

None

Note

Semantic error codes specific for this method:
view(schema_id)[source]#

Get the object schema view.

Note

Calls GET /iocean/schemas/{schema_id}.

Parameters:

schema_id (str) – URL friendly string, uniquely identifies json schema.

Return type:

SchemaView

Returns:

Schema view.

Raises:

NotFoundError – Object schema not found.

filter(*, cursor=None, limit=None)[source]#

Get an object schemas filtration list.

Note

Calls GET /iocean/schemas.

Parameters:
Return type:

Page[SchemaCommonView]

Returns:

Page with schema common views and next page cursor.

Raises:

InvalidRequestError – Provided values are invalid (see form value requirements).

class cybsi.cloud.iocean.SchemaAsyncAPI(connector)[source]#

Schema asynchronous API.

async register(schema)[source]#

Register an object schema.

Note

Calls POST /iocean/schemas.

Parameters:

schema (Dict[str, Any]) – JSON schema of the object. See Object schemas for information about schema structure.

Return type:

SchemaRegistrationView

Returns:

Schema registration view.

Raises:

Note

Conflict error codes specific for this method:
async update(*, schema_id, tag, schema)[source]#

Update the object schema.

Note

Calls PUT /iocean/schemas/{schema_id}.

Parameters:
  • schema_id (str) – URL friendly string, uniquely identifies json schema.

  • tag (Tag) – SchemaView.tag value. Use view() to retrieve it.

  • schema (Dict[str, Any]) – JSON schema of the object. See Object schemas for information about schema structure.

Raises:
Return type:

None

Note

Semantic error codes specific for this method:
async view(schema_id)[source]#

Get the object schema view.

Note

Calls GET /iocean/schemas/{schema_id}.

Parameters:

schema_id (str) – URL friendly string, uniquely identifies json schema.

Return type:

SchemaView

Returns:

Schema view.

Raises:

NotFoundError – Object schema not found.

async filter(*, cursor=None, limit=None)[source]#

Get an object schemas filtration list.

Note

Calls GET /iocean/schemas.

Parameters:
Return type:

AsyncPage[SchemaCommonView]

Returns:

Page with schema common views and next page cursor.

Raises:

InvalidRequestError – Provided values are invalid (see form value requirements).

class cybsi.cloud.iocean.SchemaView(resp)[source]#

Schema view

property schema_id#

URL friendly string, uniquely identifies json schema.

property schema#

JSON schema of the object

See Object schemas for information about schema structure.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

property tag#

Resource tag.

Protects against concurrent object changes. Alternatively, can be used for caching.

class cybsi.cloud.iocean.SchemaCommonView(data=None)[source]#

Schema common view

property schema_id#

URL friendly string, uniquely identifies json schema.

property title#

The human-readable name of the json schema.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.iocean.SchemaRegistrationView(data=None)[source]#

Schema registration view

property schema_id#

URL friendly string, uniquely identifies json schema.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

Insight#

Use this section of API to access Insight schemas.

class cybsi.cloud.insight.InsightAPI(connector)[source]#

Insight API.

property schemas#

Get Insight schemas handle.

property tasks#

Get Insight task handle.

property task_queue#

Get Insight task queue handle.

class cybsi.cloud.insight.InsightAsyncAPI(connector)[source]#

Insight asynchronous API.

property schemas#

Schemas asynchronous API handle.

property tasks#

Tasks asynchronous API handle.

property task_queue#

Task queue asynchronous API handle.

class cybsi.cloud.insight.SchemaAPI(connector)[source]#

Schema API.

register(schema)[source]#

Register an enrichment task result object schema.

Note

Calls POST /insight/schemas.

Parameters:

schema (Dict[str, Any]) – JSON schema of the enrichment task result object. See Enrichment result object schemas for information about schema structure.

Return type:

SchemaRegistrationView

Returns:

Schema registration view.

Raises:

Note

Conflict error codes specific for this method:
update(*, schema_id, tag, schema)[source]#

Update the enrichment task result object schema.

Note

Calls PUT /insight/schemas/{schema_id}.

Parameters:
Raises:
Return type:

None

Note

Semantic error codes specific for this method:
view(schema_id)[source]#

Get the enrichment task result object schema view.

Note

Calls GET /insight/schemas/{schema_id}.

Parameters:

schema_id (str) – URL friendly string, uniquely identifies json schema.

Return type:

SchemaView

Returns:

Schema view.

Raises:

NotFoundError – Object schema not found.

filter(*, cursor=None, limit=None)[source]#

Get an enrichment task result object schemas filtration list.

Note

Calls GET /insight/schemas.

Parameters:
Return type:

Page[SchemaCommonView]

Returns:

Page with schema common views and next page cursor.

Raises:

InvalidRequestError – Provided values are invalid (see form value requirements).

class cybsi.cloud.insight.SchemaAsyncAPI(connector)[source]#

Schema asynchronous API.

async register(schema)[source]#

Register an enrichment task result object schema.

Note

Calls POST /insight/schemas.

Parameters:

schema (Dict[str, Any]) – JSON schema of the object. See Enrichment result object schemas for information about schema structure.

Return type:

SchemaRegistrationView

Returns:

Schema registration view.

Raises:

Note

Conflict error codes specific for this method:
async update(*, schema_id, tag, schema)[source]#

Update the enrichment task result object schema.

Note

Calls PUT /insight/schemas/{schema_id}.

Parameters:
Raises:
Return type:

None

Note

Semantic error codes specific for this method:
async view(schema_id)[source]#

Get the enrichment task result object schema view.

Note

Calls GET /insight/schemas/{schema_id}.

Parameters:

schema_id (str) – URL friendly string, uniquely identifies json schema.

Return type:

SchemaView

Returns:

Schema view.

Raises:

NotFoundError – Object schema not found.

async filter(*, cursor=None, limit=None)[source]#

Get an enrichment task result object schemas filtration list.

Note

Calls GET /insight/schemas.

Parameters:
Return type:

AsyncPage[SchemaCommonView]

Returns:

Page with schema common views and next page cursor.

Raises:

InvalidRequestError – Provided values are invalid (see form value requirements).

class cybsi.cloud.insight.SchemaView(resp)[source]#

Schema view

property schema_id#

URL friendly string, uniquely identifies json schema.

property schema#

JSON schema of the enrichment task result object

See Enrichment result object schemas for information about schema structure.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

property tag#

Resource tag.

Protects against concurrent object changes. Alternatively, can be used for caching.

class cybsi.cloud.insight.SchemaCommonView(data=None)[source]#

Schema common view

property schema_id#

URL friendly string, uniquely identifies json schema.

property title#

The human-readable name of the json schema.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.insight.SchemaRegistrationView(data=None)[source]#

Schema registration view

property schema_id#

URL friendly string, uniquely identifies json schema.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.insight.ObjectKeyForm(key_type, value)[source]#

Object key form.

enum cybsi.cloud.insight.ObjectKeyType(value)[source]#

Object key type.

Valid values are as follows:

MD5Hash = <ObjectKeyType.MD5Hash: 'MD5Hash'>#
SHA1Hash = <ObjectKeyType.SHA1Hash: 'SHA1Hash'>#
SHA256Hash = <ObjectKeyType.SHA256Hash: 'SHA256Hash'>#
SHA512Hash = <ObjectKeyType.SHA512Hash: 'SHA512Hash'>#
DomainName = <ObjectKeyType.DomainName: 'DomainName'>#
URL = <ObjectKeyType.URL: 'URL'>#
IPAddress = <ObjectKeyType.IPAddress: 'IPAddress'>#
enum cybsi.cloud.insight.ObjectType(value)[source]#

Object type.

Valid values are as follows:

File = <ObjectType.File: 'File'>#
DomainName = <ObjectType.DomainName: 'DomainName'>#
URL = <ObjectType.URL: 'URL'>#
IPAddress = <ObjectType.IPAddress: 'IPAddress'>#
class cybsi.cloud.insight.ObjectKeyView(data=None)[source]#

Object key view

property type#

Object key type

property value#

Key value.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.insight.TaskAPI(connector)[source]#

Task API.

register(task)[source]#

Register new enrichment task.

Note

Calls POST /insight/tasks.

Parameters:

task (TaskForm) – Task registration form.

Return type:

TaskRegistrationView

Returns:

Task registration view.

Raises:

Note

Semantic error codes specific for this method:
Too many requests error codes specific for this method:
view(task_id)[source]#

Get the enrichment task view.

Note

Calls GET /insight/tasks/{task_id}.

Parameters:

task_id (UUID) – Task identifier.

Return type:

TaskView

Returns:

Task view.

Raises:

NotFoundError – Task not found.

class cybsi.cloud.insight.TaskAsyncAPI(connector)[source]#

Tasks asynchronous API.

async register(task)[source]#

Register new enrichment task.

Note

Calls POST /insight/tasks.

Parameters:

task (TaskForm) – Task registration form.

Return type:

TaskRegistrationView

Returns:

Task registration view.

Raises:

Note

Semantic error codes specific for this method:
Too many requests error codes specific for this method:
async view(task_id)[source]#

Get the enrichment task view.

Note

Calls GET /insight/tasks/{task_id}.

Parameters:

task_id (UUID) – Task identifier.

Return type:

TaskView

Returns:

Task view.

Raises:

NotFoundError – Task not found.

class cybsi.cloud.insight.TaskErrorView(data=None)[source]#

Task error view.

property code#

Error code.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.insight.TaskForm(schema_id, object_keys=None, file_id=None)[source]#

Task form

class cybsi.cloud.insight.TaskParamsView(data=None)[source]#

Task params view.

property schema_id#

URL friendly string, uniquely identifies json schema.

property object_keys#

List of object keys.

property file_id#

File identifier. Use filebox to upload file. See Cloud File Storage for information about filebox.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.insight.TaskRegistrationView(data=None)[source]#

Task registration view

property id#

Task identifier.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

enum cybsi.cloud.insight.TaskState(value)[source]#

Object key type.

Valid values are as follows:

Pending = <TaskState.Pending: 'Pending'>#
Completed = <TaskState.Completed: 'Completed'>#
Failed = <TaskState.Failed: 'Failed'>#
class cybsi.cloud.insight.TaskView(data=None)[source]#

Task view

property id#

Task identifier.

property params#

Task params.

property state#

Task state.

property result#

Task result.

Note

This value is present if task state is Completed

property error#

Task error.

Note

This value is present if task state is Failed

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.insight.TaskQueueAPI(connector)[source]#

Task queue API.

pop_tasks(*, limit)[source]#

Take the list of enrichment tasks to execution.

Note

Calls POST /insight/task-queue/executing-tasks.

Parameters:

limit (int) – The maximum number of tasks to execution.

Return type:

List[TaskQueueItemView]

Returns:

Limited list of task queue item views.

Raises:

InvalidRequestError – Provided values are invalid (see args value requirements).

complete_task(*, task_id, obj_type, keys, context={})[source]#

Register the successful enrichment result.

Note

Calls POST /insight/task-queue/completed-tasks.

Parameters:
Raises:
Return type:

None

Note

Semantic error codes specific for this method:

Object keys is validated according to the schema specified in the TaskForm.

fail_task(*, task_id, code, message)[source]#

Register the enrichment error.

Note

Calls POST /insight/task-queue/failed-tasks.

Parameters:
  • task_id (UUID) – Task identifier.

  • code (str) – Enrichment error code.

  • message (str) – Enrichment error message.

Return type:

None

Note

The enrichment error code and message must be specified by external system.

Raises:

Note

Semantic error codes specific for this method:
class cybsi.cloud.insight.TaskQueueAsyncAPI(connector)[source]#

Task queue asynchronous API.

async pop_tasks(*, limit)[source]#

Take the list of enrichment tasks to execution.

Note

Calls POST /insight/task-queue/executing-tasks.

Parameters:

limit (int) – The maximum number of tasks to execution.

Return type:

List[TaskQueueItemView]

Returns:

Limited list of task queue item views.

Raises:

InvalidRequestError – Provided values are invalid (see args value requirements).

async complete_task(*, task_id, obj_type, keys, context={})[source]#

Register the successful enrichment result.

Note

Calls POST /insight/task-queue/completed-tasks.

Parameters:
Raises:
Return type:

None

Note

Semantic error codes specific for this method:

Object keys is validated according to the schema specified in the TaskForm.

async fail_task(*, task_id, code, message)[source]#

Register the enrichment error.

Note

Calls POST /insight/task-queue/failed-tasks.

Parameters:
  • task_id (UUID) – Task identifier.

  • code (str) – Enrichment error code.

  • message (str) – Enrichment error message.

Return type:

None

Note

The enrichment error code and message must be specified by external system.

Raises:

Note

Semantic error codes specific for this method:
class cybsi.cloud.insight.TaskQueueItemView(data=None)[source]#

Task queue item view.

property id#

Task identifier.

property created_at#

Task created at

property params#

Task params.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

Files#

Use this section of API to with files.

class cybsi.cloud.files.FilesAPI(connector)[source]#

Files API.

upload(data, *, name, size=-1)[source]#

Upload a file.

The maximum file size is 1GiB.

Note

Calls PUT /filebox/files.

Parameters:
  • data (bytes) – The data of the file.

  • name (str) – The name of the file.

  • size (int) – The size of the file.

Return type:

FileRefView

Returns:

The reference to the uploaded file.

Raises:
get_file_size(file_id)[source]#

Get a file size.

Note

Calls HEAD /filebox/files/{fileID}/content.

Parameters:

file_id (UUID) – The file identifier.

Return type:

int

Returns:

The file size in bytes.

Raises:
create_session(part_size)[source]#

Create an upload session.

Note

Calls POST /filebox/sessions.

Parameters:

part_size (int) – The size of file parts.

Return type:

SessionRefView

Returns:

The reference to the created session.

Raises:

InvalidRequestError – Provided values are invalid (see args value requirements).

upload_session_part(part, *, session_id, part_number, size)[source]#

Upload the file part.

Note

Calls POST /filebox/sessions/{sessionID}/parts.

Parameters:
  • part (BytesReader) – The file part data.

  • session_id (UUID) – The identifier of the upload session.

  • part_number – The part number.

  • size (int) – The part size.

Raises:
complete_session(session_id)[source]#

Complete the session.

Note

Calls POST /filebox/sessions/{sessionID}/completed.

Parameters:

session_id (UUID) – The identifier of the upload session.

Return type:

FileRefView

Returns:

The reference to the uploaded file.

Raises:

Note

Semantic error codes specific for this method:
download_part(file_id, *, start, end)[source]#

Download a file part.

The byte numeration start with 0. The maximum part size (end-start) is 50 MiB.

Note

Calls GET /filebox/files/{fileID}/content.

Parameters:
  • file_id (UUID) – The file identifier.

  • start (int) – The part start byte number.

  • end (int) – The part end byte number.

Return type:

FileContent

Returns:

The file part content.

Raises:
download(file_id)[source]#

Download a file entirely.

Note

Calls GET /filebox/files/{fileID}/content.

Parameters:

file_id (UUID) – The file identifier.

Return type:

FileContent

Returns:

The file content.

Raises:
class cybsi.cloud.files.FilesAsyncAPI(connector)[source]#

Files asynchronous API

async upload(data, *, name, size=-1)[source]#

Upload a file.

The maximum file size is 1GiB.

Note

Calls PUT /filebox/files.

Parameters:
  • data (bytes) – The data of the file.

  • name (str) – The name of the file.

  • size (int) – The size of the file.

Return type:

FileRefView

Returns:

The reference to the uploaded file.

Raises:
async get_file_size(file_id)[source]#

Get a file size.

Note

Calls HEAD /filebox/files/{fileID}/content.

Parameters:

file_id (UUID) – The file identifier.

Return type:

int

Returns:

The file size in bytes.

Raises:
async download_part(file_id, *, start, end)[source]#

Download a file part.

The byte numeration start with 0. The maximum part size (end-start) is 50 MiB.

Note

Calls GET /filebox/files/{fileID}/content.

Parameters:
  • file_id (UUID) – The file identifier.

  • start (int) – The part start byte number.

  • end (int) – The part end byte number.

Return type:

FileAsyncContent

Returns:

The file part content.

Raises:
async create_session(part_size)[source]#

Create an upload session.

Note

Calls POST /filebox/sessions.

Parameters:

part_size (int) – The size of file parts.

Return type:

SessionRefView

Returns:

The reference to the created session.

Raises:

InvalidRequestError – Provided values are invalid (see args value requirements).

async upload_session_part(part, *, session_id, part_number, size)[source]#

Upload the file part.

Note

Calls POST /filebox/sessions/{sessionID}/parts.

Parameters:
  • part (AsyncBytesReader) – The file part data.

  • session_id (UUID) – The identifier of the upload session.

  • part_number – The part number.

  • size (int) – The part size.

Raises:
async complete_session(session_id)[source]#

Complete the session.

Note

Calls POST /filebox/sessions/{sessionID}/completed.

Parameters:

session_id (UUID) – The identifier of the upload session.

Return type:

FileRefView

Returns:

The reference to the uploaded file.

Raises:

Note

Semantic error codes specific for this method:
async download(file_id)[source]#

Download a file entirely.

Note

Calls GET /filebox/files/{fileID}/content.

Parameters:

file_id (UUID) – The file identifier.

Return type:

FileAsyncContent

Returns:

The file content.

Raises:
class cybsi.cloud.files.FileContent(parts)[source]#

File content.

read(n=0)[source]#

Read at most n bytes of the content.

Return a bytestring containing the bytes read.

If the end of the content is reached, an empty bytes object is returned. If n <= 0 it returns the whole content.

Return type:

bytes

class cybsi.cloud.files.FileAsyncContent(parts)[source]#

File asynchronous content.

async read(n=0)[source]#

Read at most n bytes of the content.

Return a bytestring containing the bytes read. If the end of the content is reached, an empty bytes object is returned. If n <= 0 it returns the whole content.

Return type:

bytes

class cybsi.cloud.files.FileRefView(data=None)[source]#

File reference view.

property id#

File ID.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.files.SessionRefView(data=None)[source]#

Upload session reference view.

property id#

Session ID.

raw()#

Returns raw object view

Return type:

Dict[str, Any]

class cybsi.cloud.files.BytesReader(*args, **kwargs)[source]#

Describes bytes reader protocol.

read(*args, **kwargs)[source]#

Read bytes.

Return type:

bytes

class cybsi.cloud.files.AsyncBytesReader(*args, **kwargs)[source]#

Describes asynchronous bytes reader protocol.

async read(*args, **kwargs)[source]#

Read bytes.

Return type:

bytes

class cybsi.cloud.files.LimitedReader(source, *, limit)[source]#

Limited byte reader.

read(n=-1)[source]#

Read at most n bytes from the source.

Return a bytestring containing the bytes read.

If the end of the data is reached, an empty bytes object is returned. If n <= 0 it returns the whole data.

Return type:

bytes

class cybsi.cloud.files.AsyncLimitedReader(source, *, limit)[source]#

Asynchronous limited byte reader.

async read(n=-1)[source]#

Read at most n bytes from the source.

Return a bytestring containing the bytes read.

If the end of the data is reached, an empty bytes object is returned. If n <= 0 it returns the whole data.

Return type:

bytes

class cybsi.cloud.files.BufferedReader(source, *, size)[source]#

Buffered byte reader.

read(n=-1)[source]#

Read at most n bytes from the source.

Return a bytestring containing the bytes read.

If the end of the data is reached, an empty bytes object is returned. If n <= 0 it returns the whole data.

Return type:

bytes

peek(n)[source]#

Peeks the next n bytes without advancing the reader.

Returns a bytestring containing the bytes peeked.

If n <= 0 it returns the empty bytestring. If n is greater than the buffer size it returns the buffered bytes.

Return type:

bytes

class cybsi.cloud.files.AsyncBufferedReader(source, *, size)[source]#

Asynchronous buffered byte reader.

async read(n=-1)[source]#

Read at most n bytes from the source.

Return a bytestring containing the bytes read.

If the end of the data is reached, an empty bytes object is returned. If n <= 0 it returns the whole data.

Return type:

bytes

async peek(n)[source]#

Peeks the next n bytes without advancing the reader.

Returns a bytestring containing the bytes peeked.

If n <= 0 it returns the empty bytestring. If n is greater than the buffer size it returns the buffered bytes.

Return type:

bytes

Common views and data types#

cybsi.cloud.Null#

alias of <cybsi.cloud.api.NullType object>

cybsi.cloud.Nullable#

alias of Union[T, None, NullType]

class cybsi.cloud.NullType[source]#

Depicts explicit null values in API.

The only instance of this type is Null.

class cybsi.cloud.Tag[source]#

Identifier of a specific version of a resource.

Prevents mid-air-collisions. Required for edit() functions on Cybsi Cloud API resources.

class cybsi.cloud.CybsiAPIEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

CybsiAPIEnum is a base class for all Cybsi Cloud API enumerations.

classmethod from_string(cls, value, ignore_case=False)[source]#

Convert a string value to enumeration value.

Parameters:
  • value (str) – value to convert.

  • ignore_case – ignore enumeration values case.

Returns:

Enumeration value.

Pagination#

Pagination API.

See also

See Pagination for complete examples of pagination usage.

class cybsi.cloud.pagination.Cursor[source]#

Page cursor value.

If None cursor value is passed to SDK (as a parameter to filter-like functions), SDK retrieves the first page.

Typically, SDK does not return cursors as function return values. SDK returns Page, and cursor is a property of the page.

None cursor value of a page means last page.

class cybsi.cloud.pagination.Page(api_call, resp, view)[source]#
Page returned by Cybsi Cloud API.

Should not be constructed manually, use filter-like methods provided by SDK.

Parameters:
  • api_call (Callable[..., Response]) – Callable object for getting next page

  • resp (Response) – Response which represents a start page

  • view (Callable[..., TypeVar(T)]) – View class for page elements

next_page()[source]#

Get next page. If there is no link to the next page it return None.

Return type:

Optional[Page[TypeVar(T)]]

property cursor#

Page cursor. The current position in the collection.

None means the page is last one.

data()#

Get page data as a list of items.

Return type:

List[TypeVar(T)]

Next page link.

class cybsi.cloud.pagination.AsyncPage(api_call, resp, view)[source]#
Page returned by Cybsi API.

Should not be constructed manually, use filter-like methods provided by SDK.

Parameters:
  • api_call (Callable[..., Coroutine]) – Callable object for getting next page

  • resp (Response) – Response which represents a start page

  • view (Callable[..., TypeVar(T)]) – View class for page elements

async next_page()[source]#

Get next page. If there is no link to the next page it return None.

Return type:

Optional[AsyncPage[TypeVar(T)]]

property cursor#

Page cursor. The current position in the collection.

None means the page is last one.

data()#

Get page data as a list of items.

Return type:

List[TypeVar(T)]

Next page link.

cybsi.cloud.pagination.chain_pages(start_page)[source]#

Get chain of collection objects.

Return type:

Iterator[TypeVar(T)]

async cybsi.cloud.pagination.chain_pages_async(start_page)[source]#

Get chain of collection objects asynchronously.

Return type:

AsyncIterator[TypeVar(T)]

Exceptions#

This section documents exceptions SDK can raise.

Those are exceptions SDK client can expect if SDK is used in correct way. If your Python code didn’t respect the expected model, there’s no guarantees. For example, if function argument types are ignored, SDK can raise exceptions not listed here.

Each exception type is annotated if it makes sense to retry.

Some exceptions have code property. It allows to determine the concrete error.

exception cybsi.cloud.error.CybsiError(message, ex=None)[source]#

Bases: Exception

Base exception used by SDK. Sometimes can be retried.

If it’s not of one of subclasses (see below), means unexpected error.

CybsiError covers those cases:

  • Unexpected API response status code. See APIError for specific errors.

  • Unexpected API response content.

  • Connection error.

exception cybsi.cloud.error.APIError(status, content, header=None, suffix=None)[source]#

Bases: CybsiError

Base exception for HTTP 4xx API responses.

exception cybsi.cloud.error.InvalidRequestError(resp)[source]#

Bases: APIError

Invalid request error. Retry will never work.

Ideally, should not be raised by SDK. If it’s raised, it means one of two things:

  • SDK was used incorrectly. For example, values of invalid type were passed to SDK functions.

  • There’s a bug in request serialization in SDK. Please report the bug.

exception cybsi.cloud.error.UnauthorizedError(resp)[source]#

Bases: APIError

Client lacks valid authentication credentials. Retry will never work.

exception cybsi.cloud.error.ForbiddenError(resp)[source]#

Bases: APIError

Operation was forbidden. Retry will not work unless system is reconfigured.

property code#

Error code.

exception cybsi.cloud.error.NotFoundError(resp)[source]#

Bases: APIError

Requested resource not found. Retry will never work.

exception cybsi.cloud.error.ConflictError(resp)[source]#

Bases: APIError

Resource already exists. Retry will never work.

property code#

Error code.

exception cybsi.cloud.error.ResourceModifiedError(resp)[source]#

Bases: APIError

Resource was modified since last read. Retry is a must.

Read the updated resource from API, and apply your modifications again.

exception cybsi.cloud.error.RequestEntityTooLargeError(resp)[source]#

Bases: APIError

Request content is too large.

exception cybsi.cloud.error.RangeNotSatisfiableError(content)[source]#

Bases: APIError

exception cybsi.cloud.error.SemanticError(resp)[source]#

Bases: APIError

Semantic error. Retry will not work (almost always).

Request syntax was valid, but system business rules forbid the request.

For example, we’re trying to unpack an artifact, but the artifact is not an archive.

property code#

Error code.

exception cybsi.cloud.error.TooManyRequestsError(resp)[source]#

Bases: APIError

Too many requests error.

Retry request after some time.

property code#

Error code.

property retry_after#

Period in seconds after which request could be repeated.

enum cybsi.cloud.error.ForbiddenErrorCodes(value)[source]#

Bases: CybsiAPIEnum

Possible error codes of ForbiddenError.

Valid values are as follows:

MissingPermissions = <ForbiddenErrorCodes.MissingPermissions: 'MissingPermissions'>#
Forbidden = <ForbiddenErrorCodes.Forbidden: 'Forbidden'>#
enum cybsi.cloud.error.ConflictErrorCodes(value)[source]#

Bases: CybsiAPIEnum

Conflict error codes.

Valid values are as follows:

DuplicateSchema = <ConflictErrorCodes.DuplicateSchema: 'DuplicateSchema'>#
DuplicateCollection = <ConflictErrorCodes.DuplicateCollection: 'DuplicateCollection'>#
enum cybsi.cloud.error.SemanticErrorCodes(value)[source]#

Bases: CybsiAPIEnum

Semantic error codes.

Valid values are as follows:

ResourceNotFound = <SemanticErrorCodes.ResourceNotFound: 'ResourceNotFound'>#
InvalidSchemaID = <SemanticErrorCodes.InvalidSchemaID: 'InvalidSchemaID'>#
SchemaNotFound = <SemanticErrorCodes.SchemaNotFound: 'SchemaNotFound'>#
InvalidRequestLimit = <SemanticErrorCodes.InvalidRequestLimit: 'InvalidRequestLimit'>#
LimitSetConflict = <SemanticErrorCodes.LimitSetConflict: 'LimitSetConflict'>#
InvalidKeyFormat = <SemanticErrorCodes.InvalidKeyFormat: 'InvalidKeyFormat'>#
InvalidKeySet = <SemanticErrorCodes.InvalidKeySet: 'InvalidKeySet'>#
KeySetConflict = <SemanticErrorCodes.KeySetConflict: 'KeySetConflict'>#
SchemaCheckFail = <SemanticErrorCodes.SchemaCheckFail: 'SchemaCheckFail'>#
CursorOutOfRange = <SemanticErrorCodes.CursorOutOfRange: 'CursorOutOfRange'>#
InvalidFilePart = <SemanticErrorCodes.InvalidFilePart: 'InvalidFilePart'>#
MissingFilePart = <SemanticErrorCodes.MissingFilePart: 'MissingFilePart'>#
FileNotFound = <SemanticErrorCodes.FileNotFound: 'FileNotFound'>#
TaskNotFound = <SemanticErrorCodes.TaskNotFound: 'TaskNotFound'>#
InvalidState = <SemanticErrorCodes.InvalidState: 'InvalidState'>#
enum cybsi.cloud.error.TooManyRequestsErrorCodes(value)[source]#

Bases: CybsiAPIEnum

Too many requests error codes.

Valid values are as follows:

LimitExceeded = <TooManyRequestsErrorCodes.LimitExceeded: 'LimitExceeded'>#
class cybsi.cloud.error.ErrorView[source]#

Bases: dict

Error returned by Cybsi Cloud API.

property code#

Error code.

property message#

Error message.

property details#

Error details.

class cybsi.cloud.error.SchemaCheckErrorDetails[source]#

Bases: dict

Details for schema check error.

property absolute_keyword_location#

Absolute validation path of validating schema.

property instance_location#

Location of the json value within the instance being validated.

property message#

Error description.

API Changes#

Breaking API changes are documented here. There’s no such changes yet.