Skip to content

Latest commit

 

History

History
107 lines (78 loc) · 5.52 KB

SnapshotsAuditsApi.md

File metadata and controls

107 lines (78 loc) · 5.52 KB

pfruck_contabo.SnapshotsAuditsApi

All URIs are relative to https://api.contabo.com

Method HTTP request Description
retrieve_snapshots_audits_list GET /v1/compute/snapshots/audits List history about your snapshots (audit) triggered via the API

retrieve_snapshots_audits_list

ListSnapshotsAuditResponse retrieve_snapshots_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, instance_id=instance_id, snapshot_id=snapshot_id, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date)

List history about your snapshots (audit) triggered via the API

List and filters the history about your snapshots your triggered via the API.

Example

  • Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.list_snapshots_audit_response import ListSnapshotsAuditResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
    host = "https://api.contabo.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): bearer
configuration = pfruck_contabo.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pfruck_contabo.SnapshotsAuditsApi(api_client)
    x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
    x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
    page = 1 # int | Number of page to be fetched. (optional)
    size = 10 # int | Number of elements per page. (optional)
    order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional)
    instance_id = 12345 # int | The identifier of the instance (optional)
    snapshot_id = 'snap1628603855' # str | The identifier of the snapshot (optional)
    request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change (optional)
    changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | changedBy of the user which led to the change (optional)
    start_date = '2021-06-02' # date | Start of search time range. (optional)
    end_date = '2021-06-02' # date | End of search time range. (optional)

    try:
        # List history about your snapshots (audit) triggered via the API
        api_response = api_instance.retrieve_snapshots_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, instance_id=instance_id, snapshot_id=snapshot_id, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date)
        print("The response of SnapshotsAuditsApi->retrieve_snapshots_audits_list:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SnapshotsAuditsApi->retrieve_snapshots_audits_list: %s\n" % e)

Parameters

Name Type Description Notes
x_request_id str Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually.
x_trace_id str Identifier to trace group of requests. [optional]
page int Number of page to be fetched. [optional]
size int Number of elements per page. [optional]
order_by List[str] Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC DESC`.
instance_id int The identifier of the instance [optional]
snapshot_id str The identifier of the snapshot [optional]
request_id str The requestId of the API call which led to the change [optional]
changed_by str changedBy of the user which led to the change [optional]
start_date date Start of search time range. [optional]
end_date date End of search time range. [optional]

Return type

ListSnapshotsAuditResponse

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The response will be a JSON object and contains a paginated list of snapshots audits triggered via the API. -

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