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

Latest commit

 

History

History
273 lines (189 loc) · 9.65 KB

File metadata and controls

273 lines (189 loc) · 9.65 KB

esp_sdk.ScanIntervalsApi

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

Method HTTP request Description
create POST /api/v2/scan_intervals.json_api Create a(n) Scan Interval
delete DELETE /api/v2/scan_intervals/{id}.json_api Delete a(n) Scan Interval
list_for_external_account GET /api/v2/external_accounts/{external_account_id}/scan_intervals.json_api Get a list of Scan Intervals
show GET /api/v2/scan_intervals/{id}.json_api Show a single Scan Interval
update PATCH /api/v2/scan_intervals/{id}.json_api Update a(n) Scan Interval

create

ScanInterval create(external_account_id, interval, service_id, include=include)

Create a(n) Scan Interval

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.ScanIntervalsApi()
external_account_id = 56 # int | The ID of the external account this scan interval is for
interval = 56 # int | The interval, in minutes, this service will be scanned
service_id = 56 # int | The service ID for the scan interval
include = 'include_example' # str | Related objects that can be included in the response:  external_account, service See Including Objects for more information. (optional)

try: 
    # Create a(n) Scan Interval
    api_response = api_instance.create(external_account_id, interval, service_id, include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScanIntervalsApi->create: %s\n" % e)

Parameters

Name Type Description Notes
external_account_id int The ID of the external account this scan interval is for
interval int The interval, in minutes, this service will be scanned
service_id int The service ID for the scan interval
include str Related objects that can be included in the response: external_account, service See Including Objects for more information. [optional]

Return type

ScanInterval

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) Scan Interval

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.ScanIntervalsApi()
id = 56 # int | Scan Interval ID

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

Parameters

Name Type Description Notes
id int Scan Interval 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_for_external_account

PaginatedCollection list_for_external_account(external_account_id, include=include, page=page)

Get a list of Scan Intervals

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.ScanIntervalsApi()
external_account_id = 56 # int | The ID of the external account to retrieve
include = 'include_example' # str | Related objects that can be included in the response:  external_account, service See Including Objects 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 Scan Intervals
    api_response = api_instance.list_for_external_account(external_account_id, include=include, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScanIntervalsApi->list_for_external_account: %s\n" % e)

Parameters

Name Type Description Notes
external_account_id int The ID of the external account to retrieve
include str Related objects that can be included in the response: external_account, service See Including Objects 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

ScanInterval show(id, include=include)

Show a single Scan Interval

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.ScanIntervalsApi()
id = 56 # int | Scan Interval ID
include = 'include_example' # str | Related objects that can be included in the response:  external_account, service See Including Objects for more information. (optional)

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

Parameters

Name Type Description Notes
id int Scan Interval ID
include str Related objects that can be included in the response: external_account, service See Including Objects for more information. [optional]

Return type

ScanInterval

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

ScanInterval update(id, include=include, external_account_id=external_account_id, interval=interval, service_id=service_id)

Update a(n) Scan Interval

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.ScanIntervalsApi()
id = 56 # int | Scan Interval ID
include = 'include_example' # str | Related objects that can be included in the response:  external_account, service See Including Objects for more information. (optional)
external_account_id = 56 # int | The ID of the external account this scan interval is for (optional)
interval = 56 # int | The interval, in minutes, this service will be scanned (optional)
service_id = 56 # int | The service ID for the scan interval (optional)

try: 
    # Update a(n) Scan Interval
    api_response = api_instance.update(id, include=include, external_account_id=external_account_id, interval=interval, service_id=service_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScanIntervalsApi->update: %s\n" % e)

Parameters

Name Type Description Notes
id int Scan Interval ID
include str Related objects that can be included in the response: external_account, service See Including Objects for more information. [optional]
external_account_id int The ID of the external account this scan interval is for [optional]
interval int The interval, in minutes, this service will be scanned [optional]
service_id int The service ID for the scan interval [optional]

Return type

ScanInterval

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]