Skip to main content
GET
/
v1
/
resources
/
{id}
Fetch resource
curl --request GET \
  --url https://api.useaira.com/v1/resources/{id} \
  --header 'X-API-KEY: <api-key>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "Emails sent",
  "aggregateByField": "value",
  "itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "filters": [
    {
      "property": "eventName",
      "value": "email_sent"
    }
  ],
  "archivedAt": "2023-11-07T05:31:56Z"
}

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

id
string<uuid>
required

The unique identifier of the resource in our system.

Response

Schema representing a resource.

id
string<uuid>
required

The unique identifier of the resource in our system.

name
string
required

The name of the resource.

Example:

"Emails sent"

type
enum<string>
required

The type of the resource.

Available options:
unit,
currency
aggregation
enum<string>
required

The aggregation method used for this resource.

Available options:
sum,
last_during_period,
unique
aggregateByField
string
required

The aggregateByField property indicates which field will be considered when aggregating events.

Example:

"value"

billingModel
enum<string>
required

The billing model for this resource.

Available options:
in_full,
proration
itemId
string<uuid>
required

The related item identifier for this resource.

filters
object[]
required

The filters used for this resource.

Example:
[
{
"property": "eventName",
"value": "email_sent"
}
]
archivedAt
string<date-time> | null
required

The timestamp when the resource was archived, or null if not archived.