# pub.chive.governance.getProposal

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.governance.getProposal)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.governance.getProposal/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.governance.getProposal/examples)

## Definitions

### `pub.chive.governance.getProposal`

**Type**: `query`

Get a single governance proposal by ID with full enrichment

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `proposalId` | `string` | Yes | Proposal identifier |

#### Output

**Encoding**: `application/json`

#### Errors

- **NotFound**

### `pub.chive.governance.getProposal#externalId`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (uri) | No | URI in external system |
| `system` | `string` | Yes | External system name |
| `matchType` | `string` | No | Match type |
| `identifier` | `string` | Yes | Identifier in external system |

### `pub.chive.governance.getProposal#voteCounts`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `reject` | `integer` | Yes | Number of reject votes |
| `abstain` | `integer` | Yes | Number of abstain votes |
| `approve` | `integer` | Yes | Number of approve votes |

### `pub.chive.governance.getProposal#proposalView`

**Type**: `object`

View of a governance proposal

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | Proposal identifier |
| `cid` | `string` | Yes | Content identifier |
| `uri` | `string` (at-uri) | Yes | Proposal AT-URI |
| `type` | `string` | Yes | Proposal type |
| `label` | `string` | No | Node label (from target node or proposed changes) |
| `votes` | `ref` → `#voteCounts` | Yes |  |
| `status` | `string` | Yes | Current proposal status |
| `changes` | `ref` → `#proposalChanges` | Yes | Proposed changes |
| `nodeUri` | `string` (at-uri) | No | Target node URI (for update/merge/deprecate) |
| `consensus` | `ref` → `#consensusProgress` | Yes |  |
| `createdAt` | `string` (datetime) | Yes | Creation timestamp |
| `expiresAt` | `string` (datetime) | No | Expiration timestamp |
| `rationale` | `string` | No | Rationale for the proposal |
| `updatedAt` | `string` (datetime) | No | Last update timestamp |
| `proposedBy` | `string` (did) | Yes | DID of the proposer |
| `proposerName` | `string` | No | Display name of the proposer |

### `pub.chive.governance.getProposal#proposalChanges`

**Type**: `object`

Proposed changes to a node

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `kind` | `string` | No | Node kind |
| `label` | `string` | No | Node label |
| `subkind` | `string` | No | Node subkind |
| `metadata` | `unknown` | No | Additional metadata |
| `targetUri` | `string` (at-uri) | No | Target URI for update/deprecate |
| `description` | `string` | No | Node description |
| `externalIds` | `array` | No | External identifiers |
| `mergeIntoUri` | `string` (at-uri) | No | Merge target URI |
| `alternateLabels` | `array` | No | Alternate labels |

### `pub.chive.governance.getProposal#consensusProgress`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `threshold` | `integer` | Yes | Required threshold for approval (0-100) |
| `voterCount` | `integer` | Yes | Number of voters |
| `minimumVotes` | `integer` | Yes | Minimum votes required |
| `consensusReached` | `boolean` | Yes | Whether consensus has been reached |
| `recommendedStatus` | `string` | Yes | Recommended status based on votes |
| `approvalPercentage` | `integer` | Yes | Current approval percentage (0-100) |

## Raw Schema

```json
{
  "id": "pub.chive.governance.getProposal",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "NotFound"
        }
      ],
      "output": {
        "schema": {
          "ref": "#proposalView",
          "type": "ref"
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "proposalId"
        ],
        "properties": {
          "proposalId": {
            "type": "string",
            "description": "Proposal identifier"
          }
        }
      },
      "description": "Get a single governance proposal by ID with full enrichment"
    },
    "externalId": {
      "type": "object",
      "required": [
        "system",
        "identifier"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri",
          "description": "URI in external system"
        },
        "system": {
          "type": "string",
          "description": "External system name"
        },
        "matchType": {
          "type": "string",
          "description": "Match type",
          "knownValues": [
            "exact",
            "close",
            "broader",
            "narrower",
            "related"
          ]
        },
        "identifier": {
          "type": "string",
          "description": "Identifier in external system"
        }
      }
    },
    "voteCounts": {
      "type": "object",
      "required": [
        "approve",
        "reject",
        "abstain"
      ],
      "properties": {
        "reject": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of reject votes"
        },
        "abstain": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of abstain votes"
        },
        "approve": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of approve votes"
        }
      }
    },
    "proposalView": {
      "type": "object",
      "required": [
        "id",
        "uri",
        "cid",
        "type",
        "changes",
        "status",
        "proposedBy",
        "votes",
        "consensus",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Proposal identifier"
        },
        "cid": {
          "type": "string",
          "description": "Content identifier"
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "Proposal AT-URI"
        },
        "type": {
          "type": "string",
          "description": "Proposal type",
          "knownValues": [
            "create",
            "update",
            "merge",
            "deprecate"
          ]
        },
        "label": {
          "type": "string",
          "description": "Node label (from target node or proposed changes)"
        },
        "votes": {
          "ref": "#voteCounts",
          "type": "ref"
        },
        "status": {
          "type": "string",
          "description": "Current proposal status",
          "knownValues": [
            "pending",
            "approved",
            "rejected",
            "expired"
          ]
        },
        "changes": {
          "ref": "#proposalChanges",
          "type": "ref",
          "description": "Proposed changes"
        },
        "nodeUri": {
          "type": "string",
          "format": "at-uri",
          "description": "Target node URI (for update/merge/deprecate)"
        },
        "consensus": {
          "ref": "#consensusProgress",
          "type": "ref"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "Creation timestamp"
        },
        "expiresAt": {
          "type": "string",
          "format": "datetime",
          "description": "Expiration timestamp"
        },
        "rationale": {
          "type": "string",
          "description": "Rationale for the proposal"
        },
        "updatedAt": {
          "type": "string",
          "format": "datetime",
          "description": "Last update timestamp"
        },
        "proposedBy": {
          "type": "string",
          "format": "did",
          "description": "DID of the proposer"
        },
        "proposerName": {
          "type": "string",
          "description": "Display name of the proposer"
        }
      },
      "description": "View of a governance proposal"
    },
    "proposalChanges": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "description": "Node kind",
          "knownValues": [
            "type",
            "object"
          ]
        },
        "label": {
          "type": "string",
          "description": "Node label"
        },
        "subkind": {
          "type": "string",
          "description": "Node subkind"
        },
        "metadata": {
          "type": "unknown",
          "description": "Additional metadata"
        },
        "targetUri": {
          "type": "string",
          "format": "at-uri",
          "description": "Target URI for update/deprecate"
        },
        "description": {
          "type": "string",
          "description": "Node description"
        },
        "externalIds": {
          "type": "array",
          "items": {
            "ref": "#externalId",
            "type": "ref"
          },
          "description": "External identifiers"
        },
        "mergeIntoUri": {
          "type": "string",
          "format": "at-uri",
          "description": "Merge target URI"
        },
        "alternateLabels": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Alternate labels"
        }
      },
      "description": "Proposed changes to a node"
    },
    "consensusProgress": {
      "type": "object",
      "required": [
        "approvalPercentage",
        "threshold",
        "voterCount",
        "minimumVotes",
        "consensusReached",
        "recommendedStatus"
      ],
      "properties": {
        "threshold": {
          "type": "integer",
          "maximum": 100,
          "minimum": 0,
          "description": "Required threshold for approval (0-100)"
        },
        "voterCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of voters"
        },
        "minimumVotes": {
          "type": "integer",
          "minimum": 0,
          "description": "Minimum votes required"
        },
        "consensusReached": {
          "type": "boolean",
          "description": "Whether consensus has been reached"
        },
        "recommendedStatus": {
          "type": "string",
          "description": "Recommended status based on votes",
          "knownValues": [
            "approved",
            "rejected",
            "pending"
          ]
        },
        "approvalPercentage": {
          "type": "integer",
          "maximum": 100,
          "minimum": 0,
          "description": "Current approval percentage (0-100)"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
