# io.atcr.hold.exportUserData

> Published by [did:web:lexicon.atcr.io](https://lexicon.garden/identity/did:web:lexicon.atcr.io)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:lexicon.atcr.io/io.atcr.hold.exportUserData)
- [Documentation](https://lexicon.garden/lexicon/did:web:lexicon.atcr.io/io.atcr.hold.exportUserData/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:lexicon.atcr.io/io.atcr.hold.exportUserData/examples)

## Definitions

### `io.atcr.hold.exportUserData`

**Type**: `query`

Export all user data from this hold (GDPR compliance). Returns all records stored on this hold's PDS that reference the authenticated user's DID.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `holdDid` | `string` (did) | Yes | DID of this hold service |
| `userDid` | `string` (did) | Yes | DID of the user whose data was exported |
| `isCaptain` | `boolean` | Yes | Whether the user is the captain (owner) of this hold |
| `crewRecord` | `ref` → `#crewExport` | No | User's crew record (if they are a crew member) |
| `exportedAt` | `string` (datetime) | Yes | RFC3339 timestamp of when the export was generated |
| `blueskyPosts` | `array` | Yes | Bluesky posts that mention the user |
| `layerRecords` | `array` | Yes | Layer records uploaded by the user |
| `statsRecords` | `array` | Yes | Repository stats records owned by the user |

#### Errors

- **AuthRequired**

### `io.atcr.hold.exportUserData#crewExport`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `role` | `string` | No |  |
| `tier` | `string` | No |  |
| `addedAt` | `string` (datetime) | No |  |
| `permissions` | `array` | No |  |

### `io.atcr.hold.exportUserData#postExport`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | No |  |
| `text` | `string` | No |  |
| `createdAt` | `string` (datetime) | No |  |

### `io.atcr.hold.exportUserData#layerExport`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `size` | `integer` | No |  |
| `digest` | `string` | No |  |
| `manifest` | `string` (at-uri) | No |  |
| `createdAt` | `string` (datetime) | No |  |
| `mediaType` | `string` | No |  |

### `io.atcr.hold.exportUserData#statsExport`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `lastPull` | `string` (datetime) | No |  |
| `lastPush` | `string` (datetime) | No |  |
| `pullCount` | `integer` | No |  |
| `pushCount` | `integer` | No |  |
| `updatedAt` | `string` (datetime) | No |  |
| `repository` | `string` | No |  |

## Raw Schema

```json
{
  "id": "io.atcr.hold.exportUserData",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AuthRequired"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "exportedAt",
            "holdDid",
            "userDid",
            "isCaptain",
            "layerRecords",
            "statsRecords",
            "blueskyPosts"
          ],
          "properties": {
            "holdDid": {
              "type": "string",
              "format": "did",
              "description": "DID of this hold service"
            },
            "userDid": {
              "type": "string",
              "format": "did",
              "description": "DID of the user whose data was exported"
            },
            "isCaptain": {
              "type": "boolean",
              "description": "Whether the user is the captain (owner) of this hold"
            },
            "crewRecord": {
              "ref": "#crewExport",
              "type": "ref",
              "description": "User's crew record (if they are a crew member)"
            },
            "exportedAt": {
              "type": "string",
              "format": "datetime",
              "description": "RFC3339 timestamp of when the export was generated"
            },
            "blueskyPosts": {
              "type": "array",
              "items": {
                "ref": "#postExport",
                "type": "ref"
              },
              "description": "Bluesky posts that mention the user"
            },
            "layerRecords": {
              "type": "array",
              "items": {
                "ref": "#layerExport",
                "type": "ref"
              },
              "description": "Layer records uploaded by the user"
            },
            "statsRecords": {
              "type": "array",
              "items": {
                "ref": "#statsExport",
                "type": "ref"
              },
              "description": "Repository stats records owned by the user"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {}
      },
      "description": "Export all user data from this hold (GDPR compliance). Returns all records stored on this hold's PDS that reference the authenticated user's DID."
    },
    "crewExport": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "maxLength": 32
        },
        "tier": {
          "type": "string",
          "maxLength": 32
        },
        "addedAt": {
          "type": "string",
          "format": "datetime"
        },
        "permissions": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 64
          }
        }
      }
    },
    "postExport": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "text": {
          "type": "string",
          "maxLength": 30000,
          "maxGraphemes": 3000
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        }
      }
    },
    "layerExport": {
      "type": "object",
      "properties": {
        "size": {
          "type": "integer"
        },
        "digest": {
          "type": "string",
          "maxLength": 128
        },
        "manifest": {
          "type": "string",
          "format": "at-uri"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "mediaType": {
          "type": "string",
          "maxLength": 256
        }
      }
    },
    "statsExport": {
      "type": "object",
      "properties": {
        "lastPull": {
          "type": "string",
          "format": "datetime"
        },
        "lastPush": {
          "type": "string",
          "format": "datetime"
        },
        "pullCount": {
          "type": "integer"
        },
        "pushCount": {
          "type": "integer"
        },
        "updatedAt": {
          "type": "string",
          "format": "datetime"
        },
        "repository": {
          "type": "string",
          "maxLength": 256
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
