# Resource Changes

Each resource has changes over time. They are created, updated or deleted. Customers can query these changes. They can use them in saved queries and rules.

{% hint style="info" %}
ie. *github\_repository* resources has changes available at *github\_repository\_changes* key while *jira\_user* resources has changes available at *jira\_user\_changes*.
{% endhint %}

Changes are powerful because they provide context on a resource's life cycle. Some use-cases:

* See who caused the change (available for some resources)

### Resource Change Types

There are three types of changes

* added
* modified
* removed

### Resource Change Fields

Each resource has changes and users can query them by adding "changes" at the end of the resource's name. For example, for github\_repository resource, the changes are kept at github\_repository\_changes.

Resource changes have the following field structure:

```json
_meta: {
  id: String,
  groupKey: String,
  integration: {
    "id": String,
     "name": String,
     "tags": String Array | null,
  },
  type: String -> "github_repo",
  recordId: date,
  recordedAt: date,
},
resourceId: "", -> internally generated id for changes of a resource 
recordedAt: date,
type: String -> "added | modified | removed",
actor: Object | null,
eventType: Sting | null, -> event type like "repository/privatized"
fields: Array | null,
after: { 
     -> resource's content before after it changes
 },
before: { 
     -> resource's content before it changes, null if this is resource's first change
}
}
```

### Resource Change View

You can also visually see changes under /resources directory for each resource.

![](/files/7mDuLhNVfKrNtRQ4KdKe)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://resmocom.gitbook.io/product/resources/resource-changes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
