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": "<string>",
  "name": "Emails sent",
  "type": "unit",
  "aggregation": "sum",
  "aggregateByField": "value",
  "customFields": {
    "customField1": "value1",
    "customField2": [
      "value2",
      "value3"
    ]
  },
  "filters": [
    {
      "property": "eventName",
      "value": "email_sent"
    }
  ]
}

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

id
string
required

The unique identifier of the resource in our system.

Response

Schema representing a resource.

id
string
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"

customFields
object
required

Custom fields that can be associated with the entity. The fields must be previously created in the system before they can be used.

Example:
{
"customField1": "value1",
"customField2": ["value2", "value3"]
}
filters
object[]
required

The filters used for this resource.

Example:
[
{
"property": "eventName",
"value": "email_sent"
}
]