cURL
curl --request GET \
--url https://api.tirdad.ai/v1/activity/{id} \
--header 'x-api-key: <api-key>'from tirdad_sdk import Tirdad
with Tirdad(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.activity.get_activity(id="<id>")
# Handle response
print(res)import { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.activity.getActivity("<id>");
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Activity.GetActivity(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.ActivityResponse != nil {
// handle response
}
}{
"action": "<string>",
"actor": {
"id": "<string>",
"label": "<string>",
"type": "<string>"
},
"customer_id": "<string>",
"entity": {
"id": "<string>",
"label": "<string>",
"type": "<string>"
},
"id": "<string>",
"ip": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"request_id": "<string>",
"source": "<string>",
"state": {},
"user_agent": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Activity
Get activity
Use when you need one activity entry with the state of the entity right after the change.
GET
/
activity
/
{id}
cURL
curl --request GET \
--url https://api.tirdad.ai/v1/activity/{id} \
--header 'x-api-key: <api-key>'from tirdad_sdk import Tirdad
with Tirdad(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.activity.get_activity(id="<id>")
# Handle response
print(res)import { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.activity.getActivity("<id>");
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Activity.GetActivity(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.ActivityResponse != nil {
// handle response
}
}{
"action": "<string>",
"actor": {
"id": "<string>",
"label": "<string>",
"type": "<string>"
},
"customer_id": "<string>",
"entity": {
"id": "<string>",
"label": "<string>",
"type": "<string>"
},
"id": "<string>",
"ip": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"request_id": "<string>",
"source": "<string>",
"state": {},
"user_agent": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}