# fyi.opensocial.getSubjectHistory

> Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getSubjectHistory)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getSubjectHistory/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getSubjectHistory/examples)

## Definitions

### `fyi.opensocial.getSubjectHistory`

**Type**: `query`

Every event on one subject. Requires mod.read.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `group` | `string` (did) | Yes | The group DID. Every method is served by the group's host and authorized against that group's roles. |
| `subject` | `string` (uri) | Yes | A record's at-uri, or an account's DID. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `events` | `array` | Yes |  |
| `subject` | `ref` → `fyi.opensocial.defs#subjectView` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Every event on one subject. Requires mod.read.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "events": {
              "items": {
                "ref": "fyi.opensocial.defs#eventView",
                "type": "ref"
              },
              "type": "array"
            },
            "subject": {
              "ref": "fyi.opensocial.defs#subjectView",
              "type": "ref"
            }
          },
          "required": [
            "subject",
            "events"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "group": {
            "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.",
            "format": "did",
            "type": "string"
          },
          "subject": {
            "description": "A record's at-uri, or an account's DID.",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "group",
          "subject"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "fyi.opensocial.getSubjectHistory",
  "lexicon": 1
}
```
