- get - Get sample event data for a Destination within a Pack
- create - Send sample event data to a Destination within a Pack
Get sample event data for the specified Destination to validate the configuration or test connectivity within the specified Pack.
from cribl_control_plane import CriblControlPlane, models
import os
with CriblControlPlane(
"https://api.example.com",
security=models.Security(
bearer_auth=os.getenv("CRIBLCONTROLPLANE_BEARER_AUTH", ""),
),
) as ccp_client:
res = ccp_client.packs.destinations.samples.get(id="<id>", pack="<value>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
id |
str | ✔️ | The id of the Destination to get sample event data for. |
pack |
str | ✔️ | The id of the Pack to get. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.CountedOutputSamplesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.Error | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Send sample event data to the specified Destination to validate the configuration or test connectivity within the specified Pack.
from cribl_control_plane import CriblControlPlane, models
import os
with CriblControlPlane(
"https://api.example.com",
security=models.Security(
bearer_auth=os.getenv("CRIBLCONTROLPLANE_BEARER_AUTH", ""),
),
) as ccp_client:
res = ccp_client.packs.destinations.samples.create(id="<id>", pack="<value>", events=[
{
"_raw": "Test event 1",
"source": "test",
"sourcetype": "manual",
},
{
"_raw": "Test event 2",
"source": "test",
"sourcetype": "manual",
},
])
# Handle response
print(res)from cribl_control_plane import CriblControlPlane, models
import os
with CriblControlPlane(
"https://api.example.com",
security=models.Security(
bearer_auth=os.getenv("CRIBLCONTROLPLANE_BEARER_AUTH", ""),
),
) as ccp_client:
res = ccp_client.packs.destinations.samples.create(id="<id>", pack="<value>", events=[
{
"_raw": "This is a test event",
"source": "test",
"sourcetype": "manual",
},
])
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
id |
str | ✔️ | The id of the Destination to send sample event data to. |
pack |
str | ✔️ | The id of the Pack to create. |
events |
List[Dict[str, Any]] | ✔️ | Array of event objects to send to the Destination for testing. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.CountedOutputTestResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.Error | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |