forked from DataDog/datadogpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogs.py
More file actions
22 lines (17 loc) · 727 Bytes
/
Copy pathlogs.py
File metadata and controls
22 lines (17 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2015-Present Datadog, Inc
from datadog.api.resources import CreateableAPIResource
from datadog.api.api_client import APIClient
class Logs(CreateableAPIResource):
"""
A wrapper around Log HTTP API.
"""
_resource_name = "logs-queries"
@classmethod
def list(cls, data):
path = "{resource_name}/list".format(
resource_name=cls._resource_name,
)
api_version = getattr(cls, "_api_version", None)
return APIClient.submit("POST", path, api_version, data)