NextGen Catalog API — Accounts

NextGen Catalog API — Accounts. 4 operations. Lead operation: Get public account data directly from the database. Self-contained Naftiko capability covering one National Archives And Records Administration Nara business surface.

Run with Naftiko National Archives And Records Administration NaraAccounts

What You Can Do

GET
Get — Get public account data directly from the database
/v1/users
PUT
Put — Update the timestamp of the last time the user viewed their notifications.
/v1/users/lastviewednotificationsat/userid
GET
Get — Get public account data by account id directly from the database.
/v1/users/userid/{userid}
GET
Get — Get public account data by account id directly from the database.
/v1/users/username/{username}

MCP Tools

get-public-account-data-directly

Get public account data directly from the database

read-only idempotent
update-timestamp-last-time-user

Update the timestamp of the last time the user viewed their notifications.

idempotent
get-public-account-data-account

Get public account data by account id directly from the database.

read-only idempotent
get-public-account-data-account-2

Get public account data by account id directly from the database.

read-only idempotent

Capability Spec

national-archives-and-records-administration-nara--accounts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: NextGen Catalog API — Accounts
  description: 'NextGen Catalog API — Accounts. 4 operations. Lead operation: Get public account data directly from the database.
    Self-contained Naftiko capability covering one National Archives And Records Administration Nara business surface.'
  tags:
  - National Archives And Records Administration Nara
  - Accounts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    NATIONAL_ARCHIVES_AND_RECORDS_ADMINISTRATION_NARA_API_KEY: NATIONAL_ARCHIVES_AND_RECORDS_ADMINISTRATION_NARA_API_KEY
capability:
  consumes:
  - type: http
    namespace: national-archives-and-records-administration-nara--accounts
    baseUri: https://catalog.archives.gov/api/v2
    description: NextGen Catalog API — Accounts business capability. Self-contained, no shared references.
    resources:
    - name: users
      path: /users
      operations:
      - name: get
        method: GET
        description: Get public account data directly from the database
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: userId
          in: query
          type: string
          description: User id of the user account.
        - name: email
          in: query
          type: string
          description: Email address of the user account.
        - name: userName
          in: query
          type: string
          description: Username of the user account.
        - name: fullName
          in: query
          type: string
          description: Full name of the user account.
        - name: role
          in: query
          type: string
          description: Role of the user account.
        - name: status
          in: query
          type: string
          description: Status of the user account.
        - name: limit
          in: query
          type: integer
          description: Number of records to be returned on a page. Defaults to 5.
        - name: page
          in: query
          type: integer
          description: Page number of records to display. Defaults to 1.
        - name: sortCol
          in: query
          type: string
          description: Column name to sort the results by. Optional.
        - name: sortOrder
          in: query
          type: string
          description: Sort order, ascending or descending. Defaults to "asc" if not specified.
    - name: users-lastViewedNotificationsAt-:userId
      path: /users/lastViewedNotificationsAt/:userId
      operations:
      - name: put
        method: PUT
        description: Update the timestamp of the last time the user viewed their notifications.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: userId
          in: path
          type: string
          description: userId of the user who's lastViewedNotificationsAt is being updated.
          required: true
        - name: lastViewedNotificationsAt
          in: body
          type: string
          description: Optional timestamp to update lastViewedNotificationsAt with.
    - name: users-userId-userId
      path: /users/userId/{userId}
      operations:
      - name: get
        method: GET
        description: Get public account data by account id directly from the database.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: users-userName-userName
      path: /users/userName/{userName}
      operations:
      - name: get
        method: GET
        description: Get public account data by account id directly from the database.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    namespace: national-archives-and-records-administration-nara--accounts-rest
    port: 8080
    description: REST adapter for NextGen Catalog API — Accounts. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/users
      name: users
      description: REST surface for users.
      operations:
      - method: GET
        name: get
        description: Get public account data directly from the database
        call: national-archives-and-records-administration-nara--accounts.get
        with:
          userId: rest.userId
          email: rest.email
          userName: rest.userName
          fullName: rest.fullName
          role: rest.role
          status: rest.status
          limit: rest.limit
          page: rest.page
          sortCol: rest.sortCol
          sortOrder: rest.sortOrder
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/users/lastviewednotificationsat/userid
      name: users-lastviewednotificationsat-userid
      description: REST surface for users-lastViewedNotificationsAt-:userId.
      operations:
      - method: PUT
        name: put
        description: Update the timestamp of the last time the user viewed their notifications.
        call: national-archives-and-records-administration-nara--accounts.put
        with:
          userId: rest.userId
          lastViewedNotificationsAt: rest.lastViewedNotificationsAt
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/users/userid/{userid}
      name: users-userid-userid
      description: REST surface for users-userId-userId.
      operations:
      - method: GET
        name: get
        description: Get public account data by account id directly from the database.
        call: national-archives-and-records-administration-nara--accounts.get
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/users/username/{username}
      name: users-username-username
      description: REST surface for users-userName-userName.
      operations:
      - method: GET
        name: get
        description: Get public account data by account id directly from the database.
        call: national-archives-and-records-administration-nara--accounts.get
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: national-archives-and-records-administration-nara--accounts-mcp
    port: 9090
    transport: http
    description: MCP adapter for NextGen Catalog API — Accounts. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-public-account-data-directly
      description: Get public account data directly from the database
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: national-archives-and-records-administration-nara--accounts.get
      with:
        userId: tools.userId
        email: tools.email
        userName: tools.userName
        fullName: tools.fullName
        role: tools.role
        status: tools.status
        limit: tools.limit
        page: tools.page
        sortCol: tools.sortCol
        sortOrder: tools.sortOrder
      outputParameters:
      - type: object
        mapping: $.
    - name: update-timestamp-last-time-user
      description: Update the timestamp of the last time the user viewed their notifications.
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: national-archives-and-records-administration-nara--accounts.put
      with:
        userId: tools.userId
        lastViewedNotificationsAt: tools.lastViewedNotificationsAt
      outputParameters:
      - type: object
        mapping: $.
    - name: get-public-account-data-account
      description: Get public account data by account id directly from the database.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: national-archives-and-records-administration-nara--accounts.get
      outputParameters:
      - type: object
        mapping: $.
    - name: get-public-account-data-account-2
      description: Get public account data by account id directly from the database.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: national-archives-and-records-administration-nara--accounts.get
      outputParameters:
      - type: object
        mapping: $.