> For the complete documentation index, see [llms.txt](https://docs.ok-sky.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ok-sky.com/resources-api/resources-object/userevent-object.md).

# UserEvent object

## Fields

| Field             | Type    | Description | Editable |
| ----------------- | ------- | ----------- | -------- |
| resource\_type    | string  |             |          |
| kind              | string  |             |          |
| resource\_id      | integer |             |          |
| created\_at\_unix | integer |             |          |

## Filters

| Field | Description |
| ----- | ----------- |
| id    | ID          |

[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/20b7f3930eb31c9ebf89)

## find user event

<mark style="color:blue;">`GET`</mark> `https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/{:id}`

#### Headers

| Name           | Type   | Description              |
| -------------- | ------ | ------------------------ |
| X-Access-Token | string | set you access token     |
| Content-Type   | string | application/vnd.api+json |
| Accept         | string | application/vnd.api+json |

{% tabs %}
{% tab title="200 " %}

```
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "1",
    "type": "user_events",
    "links": {
      "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/1"
    },
    "attributes": {
      "resource_type": null,
      "kind": "signin",
      "resource_id": null,
      "created_at_unix": 1542602792
    },
    "relationships": {
      "user": {
        "links": {
          "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/1/relationships/user",
          "related": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/1/user"
        },
        "data": {
          "type": "users",
          "id": "1"
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

## search user events

<mark style="color:blue;">`GET`</mark> `https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events`

#### Headers

| Name           | Type   | Description              |
| -------------- | ------ | ------------------------ |
| X-Access-Token | string | set you access token     |
| Content-Type   | string | application/vnd.api+json |
| Accept         | string | application/vnd.api+json |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": [
    {
      "id": "1",
      "type": "user_events",
      "links": {
        "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/1"
      },
      "attributes": {
        "resource_type": null,
        "kind": "signin",
        "resource_id": null,
        "created_at_unix": 1542602792
      },
      "relationships": {
        "user": {
          "links": {
            "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/1/relationships/user",
            "related": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/1/user"
          },
          "data": {
            "type": "users",
            "id": "1"
          }
        }
      }
    },
    {
      "id": "2",
      "type": "user_events",
      "links": {
        "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/2"
      },
      "attributes": {
        "resource_type": null,
        "kind": "signin",
        "resource_id": null,
        "created_at_unix": 1542602846
      },
      "relationships": {
        "user": {
          "links": {
            "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/2/relationships/user",
            "related": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/2/user"
          },
          "data": {
            "type": "users",
            "id": "2"
          }
        }
      }
    },
    {
      "id": "3",
      "type": "user_events",
      "links": {
        "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/3"
      },
      "attributes": {
        "resource_type": "Room",
        "kind": "obj_create",
        "resource_id": 1,
        "created_at_unix": 1542602860
      },
      "relationships": {
        "user": {
          "links": {
            "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/3/relationships/user",
            "related": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events/3/user"
          },
          "data": {
            "type": "users",
            "id": "2"
          }
        }
      }
    }
  ],
  "meta": {
    "record_count": 3
  },
  "links": {
    "first": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events?page%5Bnumber%5D=1&page%5Bsize%5D=25",
    "last": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/user_events?page%5Bnumber%5D=1&page%5Bsize%5D=25"
  }
}
```

{% endtab %}
{% endtabs %}
