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
- 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.
- 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:
- 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:
- Returns:
API-Key view.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
SemanticError – Form contains logic errors.
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:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – Resource not found.
- 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.
- 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:
permissions (
Iterable
[ResourcePermissionForm
]) – List of permissions.expires_at (
Optional
[datetime
]) – Expiration date. The API-Key is automatically disabled after the expiration date.request_limits (
Optional
[Iterable
[RequestLimitForm
]]) – List of API-Key request limits.
- 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.
- 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.
- 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.
- 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.
- 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:
resource_id (
int
) – resource identifier.actions (
Iterable
[ResourceAction
]) – permitted actions for resource.
- 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:
- Returns:
Page with resource common views and next page cursor.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
SemanticError – Form contains logic errors.
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.
- class cybsi.cloud.auth.ResourceRefView(data=None)[source]#
Resource reference view.
- property id#
API-Key identifier.
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:
- Returns:
Collection registration view.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
ConflictError – Collection with the specified id (name) already exists.
SemanticError – Form contains logic errors.
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:
- 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:
- 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:
InvalidRequestError – Provided values are invalid (see form value requirements).
ResourceModifiedError – Object schema changed since last request. Update tag and retry.
NotFoundError – Resource not found.
SemanticError – Form contains logic errors.
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:
- 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:
- Returns:
Collection registration view.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
ConflictError – Collection with the specified id (name) already exists.
SemanticError – Form contains logic errors.
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:
- 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:
- 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:
InvalidRequestError – Provided values are invalid (see form value requirements).
ResourceModifiedError – Object schema changed since last request. Update tag and retry.
NotFoundError – Resource not found.
SemanticError – Form contains logic errors.
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:
- Returns:
Page with collection views and next page cursor.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
- class cybsi.cloud.iocean.CollectionCommonView(data=None)[source]#
Collection common view
- property name#
Collection name
- property schema_id#
Schema identifier
- class cybsi.cloud.iocean.CollectionRegistrationView(data=None)[source]#
Collection registration view
- property name#
The name of registered collection
- class cybsi.cloud.iocean.CollectionView(resp)[source]#
Collection view
- property name#
Collection name
- 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:
collection_id (
str
) – Collection identifier.obj_type (
ObjectType
) – Type of the object.keys (
Iterable
[Tuple
[ObjectKeyType
,str
]]) – Keys of the object.context (
Dict
[str
,Any
]) – Additional data describing object.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – Collection not found.
SemanticError – Request contains logic errors.
- Return type:
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:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – Collection not found.
SemanticError – Request contains logic errors.
- Return type:
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:
- 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:
NotFoundError – Collection not found.
InvalidRequestError – Provided values are invalid (see args value requirements).
- changes(*, collection_id, cursor, limit=None)[source]#
Get objects changes from the collection.
Note
Calls GET /iocean/collections/{collection_id}/objects/changes.
- Parameters:
- Return type:
- 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-nonecursor
value in loop, untilNone
cursor is returned.Please wait some time if method returns a page with
None
cursor.- Raises:
NotFoundError – Collection not found.
InvalidRequestError – Provided values are invalid (see args value requirements).
SemanticError – Semantic request error.
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:
collection_id (
str
) – Collection identifier.obj_type (
ObjectType
) – Type of the object.keys (
Iterable
[Tuple
[ObjectKeyType
,str
]]) – Keys of the object.context (
Dict
[str
,Any
]) – Additional data describing object.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – Collection not found.
SemanticError – Request contains logic errors.
- Return type:
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:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – Collection not found.
SemanticError – Request contains logic errors.
- Return type:
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:
- 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:
NotFoundError – Collection not found.
InvalidRequestError – Provided values are invalid (see args value requirements).
- async changes(*, collection_id, cursor, limit=None)[source]#
Get objects changes from the collection.
Note
Calls GET /iocean/collections/{collection_id}/objects/changes.
- Parameters:
- Return type:
- 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-nonecursor
value in loop, untilNone
cursor is returned.Please wait some time if method returns a page with
None
cursor.- Raises:
NotFoundError – Collection not found.
InvalidRequestError – Provided values are invalid (see args value requirements).
SemanticError – Semantic request error.
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.
- class cybsi.cloud.iocean.ObjectView(data=None)[source]#
Object view.
- property type#
Object type.
- property keys#
Object keys.
- property context#
Object context.
- class cybsi.cloud.iocean.ObjectChangeView(data=None)[source]#
Object change view.
- 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:
- Returns:
Schema registration view.
- Raises:
InvalidRequestError – Provided values are invalid (see form value requirements).
ConflictError – Form contains conflict errors.
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. Useview()
to retrieve it.schema (
Dict
[str
,Any
]) – JSON schema of the object. See Object schemas for information about schema structure.
- Raises:
InvalidRequestError – Provided values are invalid (see form value requirements).
SemanticError – Form contains logic errors.
ResourceModifiedError – Object schema changed since last request. Update tag and retry.
NotFoundError – Object schema not found.
- Return type:
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:
- 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:
- 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:
- Returns:
Schema registration view.
- Raises:
InvalidRequestError – Provided values are invalid (see form value requirements).
ConflictError – Form contains conflict errors.
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. Useview()
to retrieve it.schema (
Dict
[str
,Any
]) – JSON schema of the object. See Object schemas for information about schema structure.
- Raises:
InvalidRequestError – Provided values are invalid (see form value requirements).
SemanticError – Form contains logic errors.
ResourceModifiedError – Object schema changed since last request. Update tag and retry.
NotFoundError – Object schema not found.
- Return type:
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:
- 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:
- 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.
- property tag#
Resource tag.
Protects against concurrent object changes. Alternatively, can be used for caching.
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:
- Returns:
Schema registration view.
- Raises:
InvalidRequestError – Provided values are invalid (see form value requirements).
ConflictError – Form contains conflict errors.
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:
schema_id (
str
) – URL friendly string, uniquely identifies json schema.tag (
Tag
) –SchemaView.tag
value. Useview()
to retrieve it.schema (
Dict
[str
,Any
]) – JSON schema of the object. See Enrichment result object schemas for information about schema structure.
- Raises:
InvalidRequestError – Provided values are invalid (see form value requirements).
SemanticError – Form contains logic errors.
ResourceModifiedError – Object schema changed since last request. Update tag and retry.
NotFoundError – Object schema not found.
- Return type:
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:
- 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:
- 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:
- Returns:
Schema registration view.
- Raises:
InvalidRequestError – Provided values are invalid (see form value requirements).
ConflictError – Form contains conflict errors.
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:
schema_id (
str
) – URL friendly string, uniquely identifies json schema.tag (
Tag
) –SchemaView.tag
value. Useview()
to retrieve it.schema (
Dict
[str
,Any
]) – JSON schema of the object. See Enrichment result object schemas for information about schema structure.
- Raises:
InvalidRequestError – Provided values are invalid (see form value requirements).
SemanticError – Form contains logic errors.
ResourceModifiedError – Object schema changed since last request. Update tag and retry.
NotFoundError – Object schema not found.
- Return type:
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:
- 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:
- 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.
- 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.
- class cybsi.cloud.insight.SchemaRegistrationView(data=None)[source]#
Schema registration view
- property schema_id#
URL friendly string, uniquely identifies json schema.
- 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.
- 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:
- Returns:
Task registration view.
- Raises:
InvalidRequestError – Provided values are invalid (see form value requirements).
SemanticError – Form contains logic errors.
TooManyRequestsError – Request limit exceeded.
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:
- 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:
- Returns:
Task registration view.
- Raises:
InvalidRequestError – Provided values are invalid (see form value requirements).
SemanticError – Form contains logic errors.
TooManyRequestsError – Request limit exceeded.
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:
- Returns:
Task view.
- Raises:
NotFoundError – Task not found.
- class cybsi.cloud.insight.TaskErrorView(data=None)[source]#
Task error view.
- property code#
Error code.
- 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.
- class cybsi.cloud.insight.TaskRegistrationView(data=None)[source]#
Task registration view
- property id#
Task identifier.
- 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.
- 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:
- 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:
task_id (
UUID
) – Task identifier.obj_type (
ObjectType
) – Type of the object.keys (
Iterable
[ObjectKeyForm
]) – Keys of the object.context (
Dict
[str
,Any
]) – Additional data describing object.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
SemanticError – Request contains logic errors.
- Return type:
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:
- Return type:
Note
The enrichment error code and message must be specified by external system.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
SemanticError – Request contains logic errors.
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:
- 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:
task_id (
UUID
) – Task identifier.obj_type (
ObjectType
) – Type of the object.keys (
Iterable
[ObjectKeyForm
]) – Keys of the object.context (
Dict
[str
,Any
]) – Additional data describing object.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
SemanticError – Request contains logic errors.
- Return type:
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:
- Return type:
Note
The enrichment error code and message must be specified by external system.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
SemanticError – Request contains logic errors.
Note
- Semantic error codes specific for this method:
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:
- Return type:
- Returns:
The reference to the uploaded file.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
RequestEntityTooLargeError – Provided file data is too large.
- 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:
- Returns:
The file size in bytes.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – File not found.
- 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:
- 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:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – File not found.
RequestEntityTooLargeError – Provided file data is too large.
- 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:
- Returns:
The reference to the uploaded file.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – File not found.
SemanticError – Semantic request error.
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:
- Return type:
- Returns:
The file part content.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – File not found.
RangeNotSatisfiableError – The requested content range could not be satisfied.
- download(file_id)[source]#
Download a file entirely.
Note
Calls GET /filebox/files/{fileID}/content.
- Parameters:
file_id (
UUID
) – The file identifier.- Return type:
- Returns:
The file content.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – File not found.
- 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:
- Return type:
- Returns:
The reference to the uploaded file.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
RequestEntityTooLargeError – Provided file data is too large.
- 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:
- Returns:
The file size in bytes.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – File not found.
- 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:
- Return type:
- Returns:
The file part content.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – File not found.
RangeNotSatisfiableError – The requested content range could not be satisfied.
- 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:
- 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:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – File not found.
RequestEntityTooLargeError – Provided file data is too large.
- 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:
- Returns:
The reference to the uploaded file.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – File not found.
SemanticError – Semantic request error.
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:
- Returns:
The file content.
- Raises:
InvalidRequestError – Provided values are invalid (see args value requirements).
NotFoundError – File not found.
- class cybsi.cloud.files.SessionRefView(data=None)[source]#
Upload session reference view.
- property id#
Session ID.
- class cybsi.cloud.files.AsyncBytesReader(*args, **kwargs)[source]#
Describes asynchronous bytes reader protocol.
- class cybsi.cloud.files.AsyncLimitedReader(source, *, limit)[source]#
Asynchronous limited byte reader.
- class cybsi.cloud.files.BufferedReader(source, *, size)[source]#
Buffered byte reader.
- class cybsi.cloud.files.AsyncBufferedReader(source, *, size)[source]#
Asynchronous buffered byte reader.
Common views and data types#
- cybsi.cloud.Null#
alias of <cybsi.cloud.api.NullType object>
- 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.
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:
- property cursor#
Page cursor. The current position in the collection.
None
means the page is last one.
- property next_link#
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:
- property cursor#
Page cursor. The current position in the collection.
None
means the page is last one.
- property next_link#
Next page link.
- 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.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.