Skip to content
This repository was archived by the owner on Jan 12, 2021. It is now read-only.

Latest commit

 

History

History
369 lines (255 loc) · 14.5 KB

File metadata and controls

369 lines (255 loc) · 14.5 KB

esp_sdk.CustomSignatureDefinitionsApi

All URIs are relative to https://api.evident.io

Method HTTP request Description
activate PATCH /api/v2/custom_signature_definitions/{custom_signature_definition_id}/activate.json_api Activate a Custom Signature Definition
archive PATCH /api/v2/custom_signature_definitions/{custom_signature_definition_id}/archive.json_api Archive a Custom Signature Definition
create POST /api/v2/custom_signature_definitions.json_api Create a(n) Custom Signature Definition
delete DELETE /api/v2/custom_signature_definitions/{id}.json_api Delete a(n) Custom Signature Definition
list PUT /api/v2/custom_signature_definitions.json_api Get a list of Custom Signature Definitions
show GET /api/v2/custom_signature_definitions/{id}.json_api Show a single Custom Signature Definition
update PATCH /api/v2/custom_signature_definitions/{id}.json_api Update a(n) Custom Signature Definition

activate

CustomSignatureDefinition activate(custom_signature_definition_id, include=include)

Activate a Custom Signature Definition

A successful call to this API marks the definition for activation. The definition will go into the 'validating' state and will be tested before activating. The definition must have a status of editable to be activated.

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.CustomSignatureDefinitionsApi()
custom_signature_definition_id = 56 # int | ID of Custom Signature Definition
include = 'include_example' # str | Related objects that can be included in the response:  custom_signature, results See Including Objects for more information. (optional)

try: 
    # Activate a Custom Signature Definition
    api_response = api_instance.activate(custom_signature_definition_id, include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomSignatureDefinitionsApi->activate: %s\n" % e)

Parameters

Name Type Description Notes
custom_signature_definition_id int ID of Custom Signature Definition
include str Related objects that can be included in the response: custom_signature, results See Including Objects for more information. [optional]

Return type

CustomSignatureDefinition

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

archive

CustomSignatureDefinition archive(custom_signature_definition_id, include=include)

Archive a Custom Signature Definition

A successful call to this API archives and returns a specific custom signature definition identified by the id parameter. The definition must have a status of active to be archived.

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.CustomSignatureDefinitionsApi()
custom_signature_definition_id = 56 # int | ID of Custom Signature Definition
include = 'include_example' # str | Related objects that can be included in the response:  custom_signature, results See Including Objects for more information. (optional)

try: 
    # Archive a Custom Signature Definition
    api_response = api_instance.archive(custom_signature_definition_id, include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomSignatureDefinitionsApi->archive: %s\n" % e)

Parameters

Name Type Description Notes
custom_signature_definition_id int ID of Custom Signature Definition
include str Related objects that can be included in the response: custom_signature, results See Including Objects for more information. [optional]

Return type

CustomSignatureDefinition

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create

CustomSignatureDefinition create(custom_signature_id, include=include)

Create a(n) Custom Signature Definition

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.CustomSignatureDefinitionsApi()
custom_signature_id = 56 # int | ID of the custom signature this definition belongs to
include = 'include_example' # str | Related objects that can be included in the response:  custom_signature, results See Including Objects for more information. (optional)

try: 
    # Create a(n) Custom Signature Definition
    api_response = api_instance.create(custom_signature_id, include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomSignatureDefinitionsApi->create: %s\n" % e)

Parameters

Name Type Description Notes
custom_signature_id int ID of the custom signature this definition belongs to
include str Related objects that can be included in the response: custom_signature, results See Including Objects for more information. [optional]

Return type

CustomSignatureDefinition

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete

Meta delete(id)

Delete a(n) Custom Signature Definition

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.CustomSignatureDefinitionsApi()
id = 56 # int | Custom Signature Definition ID

try: 
    # Delete a(n) Custom Signature Definition
    api_response = api_instance.delete(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomSignatureDefinitionsApi->delete: %s\n" % e)

Parameters

Name Type Description Notes
id int Custom Signature Definition ID

Return type

Meta

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list

PaginatedCollection list(include=include, filter=filter, page=page)

Get a list of Custom Signature Definitions

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.CustomSignatureDefinitionsApi()
include = 'include_example' # str | Related objects that can be included in the response:  custom_signature, results See Including Objects for more information. (optional)
filter = {'key': 'filter_example'} # dict(str, str) | Filter Params for Searching.  Equality Searchable Attributes: [id, language, status, version_number]    Searchable Association: [custom_signature] See Searching Lists for more information. See the filter parameter of the association's list action to see what attributes are searchable on each association. See Conditions on Relationships in Searching Lists for more information. (optional)
page = '{:number=>1,+:size=>20}' # str | Page Number and Page Size.  Number is the page number of the collection to return, size is the number of items to return per page. (optional) (default to {:number=>1,+:size=>20})

try: 
    # Get a list of Custom Signature Definitions
    api_response = api_instance.list(include=include, filter=filter, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomSignatureDefinitionsApi->list: %s\n" % e)

Parameters

Name Type Description Notes
include str Related objects that can be included in the response: custom_signature, results See Including Objects for more information. [optional]
filter dict(str, str) Filter Params for Searching. Equality Searchable Attributes: [id, language, status, version_number] Searchable Association: [custom_signature] See Searching Lists for more information. See the filter parameter of the association's list action to see what attributes are searchable on each association. See Conditions on Relationships in Searching Lists for more information. [optional]
page str Page Number and Page Size. Number is the page number of the collection to return, size is the number of items to return per page. [optional] [default to {:number=>1,+:size=>20}]

Return type

PaginatedCollection

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

show

CustomSignatureDefinition show(id, include=include)

Show a single Custom Signature Definition

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.CustomSignatureDefinitionsApi()
id = 56 # int | Custom Signature Definition ID
include = 'include_example' # str | Related objects that can be included in the response:  custom_signature, results See Including Objects for more information. (optional)

try: 
    # Show a single Custom Signature Definition
    api_response = api_instance.show(id, include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomSignatureDefinitionsApi->show: %s\n" % e)

Parameters

Name Type Description Notes
id int Custom Signature Definition ID
include str Related objects that can be included in the response: custom_signature, results See Including Objects for more information. [optional]

Return type

CustomSignatureDefinition

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update

CustomSignatureDefinition update(id, include=include, code=code, language=language)

Update a(n) Custom Signature Definition

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.CustomSignatureDefinitionsApi()
id = 56 # int | Custom Signature Definition ID
include = 'include_example' # str | Related objects that can be included in the response:  custom_signature, results See Including Objects for more information. (optional)
code = 'code_example' # str | The code for this definition (optional)
language = 'language_example' # str | The language of the definition. Valid values are ruby, javascript (optional)

try: 
    # Update a(n) Custom Signature Definition
    api_response = api_instance.update(id, include=include, code=code, language=language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomSignatureDefinitionsApi->update: %s\n" % e)

Parameters

Name Type Description Notes
id int Custom Signature Definition ID
include str Related objects that can be included in the response: custom_signature, results See Including Objects for more information. [optional]
code str The code for this definition [optional]
language str The language of the definition. Valid values are ruby, javascript [optional]

Return type

CustomSignatureDefinition

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]