Google Analytics · Capability

Google Analytics Admin API — accounts

Google Analytics Admin API — accounts. 3 operations. Lead operation: accounts. Self-contained Naftiko capability covering one Google Analytics business surface.

Run with Naftiko Google Analyticsaccounts

What You Can Do

GET
Analyticsadminaccountslist — Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.
/v1/v1beta/accounts
POST
Analyticsadminaccountsprovisionaccountticket — Requests a ticket for creating an account.
/v1/v1beta/accounts-provisionaccountticket
POST
Analyticsadminaccountssearchchangehistoryevents — Searches through all changes to an account or its children given the specified set of filters.
/v1/v1beta/account-searchchangehistoryevents

MCP Tools

returns-all-accounts-accessible-caller

Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.

read-only idempotent
requests-ticket-creating-account

Requests a ticket for creating an account.

searches-through-all-changes-account

Searches through all changes to an account or its children given the specified set of filters.

read-only

Capability Spec

admin-accounts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Google Analytics Admin API — accounts
  description: 'Google Analytics Admin API — accounts. 3 operations. Lead operation: accounts. Self-contained Naftiko capability
    covering one Google Analytics business surface.'
  tags:
  - Google Analytics
  - accounts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GOOGLE_ANALYTICS_API_KEY: GOOGLE_ANALYTICS_API_KEY
capability:
  consumes:
  - type: http
    namespace: admin-accounts
    baseUri: https://analyticsadmin.googleapis.com
    description: Google Analytics Admin API — accounts business capability. Self-contained, no shared references.
    resources:
    - name: v1beta-accounts
      path: /v1beta/accounts
      operations:
      - name: analyticsadminaccountslist
        method: GET
        description: 'Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4
          properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant
          accounts are found.'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: pageSize
          in: query
          type: integer
          description: The maximum number of resources to return. The service may return fewer than this value, even if there
            are additional pages. If unspecified, at most 50 resource
        - name: pageToken
          in: query
          type: string
          description: A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent
            page. When paginating, all other parameters provided to `Lis
        - name: showDeleted
          in: query
          type: boolean
          description: 'Whether to include soft-deleted (ie: "trashed") Accounts in the results. Accounts can be inspected
            to determine whether they are deleted or not.'
    - name: v1beta-accounts:provisionAccountTicket
      path: /v1beta/accounts:provisionAccountTicket
      operations:
      - name: analyticsadminaccountsprovisionaccountticket
        method: POST
        description: Requests a ticket for creating an account.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v1beta-account}:searchChangeHistoryEvents
      path: /v1beta/{account}:searchChangeHistoryEvents
      operations:
      - name: analyticsadminaccountssearchchangehistoryevents
        method: POST
        description: Searches through all changes to an account or its children given the specified set of filters.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account
          in: path
          type: string
          description: 'Required. The account resource for which to return change history resources. Format: accounts/{account}
            Example: "accounts/100"'
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: bearer
      token: '{{env.GOOGLE_ANALYTICS_API_KEY}}'
  exposes:
  - type: rest
    namespace: admin-accounts-rest
    port: 8080
    description: REST adapter for Google Analytics Admin API — accounts. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v1beta/accounts
      name: v1beta-accounts
      description: REST surface for v1beta-accounts.
      operations:
      - method: GET
        name: analyticsadminaccountslist
        description: 'Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4
          properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant
          accounts are found.'
        call: admin-accounts.analyticsadminaccountslist
        with:
          pageSize: rest.pageSize
          pageToken: rest.pageToken
          showDeleted: rest.showDeleted
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1beta/accounts-provisionaccountticket
      name: v1beta-accounts-provisionaccountticket
      description: REST surface for v1beta-accounts:provisionAccountTicket.
      operations:
      - method: POST
        name: analyticsadminaccountsprovisionaccountticket
        description: Requests a ticket for creating an account.
        call: admin-accounts.analyticsadminaccountsprovisionaccountticket
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1beta/account-searchchangehistoryevents
      name: v1beta-account-searchchangehistoryevents
      description: REST surface for v1beta-account}:searchChangeHistoryEvents.
      operations:
      - method: POST
        name: analyticsadminaccountssearchchangehistoryevents
        description: Searches through all changes to an account or its children given the specified set of filters.
        call: admin-accounts.analyticsadminaccountssearchchangehistoryevents
        with:
          account: rest.account
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: admin-accounts-mcp
    port: 9090
    transport: http
    description: MCP adapter for Google Analytics Admin API — accounts. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: returns-all-accounts-accessible-caller
      description: 'Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties.
        Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.'
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-accounts.analyticsadminaccountslist
      with:
        pageSize: tools.pageSize
        pageToken: tools.pageToken
        showDeleted: tools.showDeleted
      outputParameters:
      - type: object
        mapping: $.
    - name: requests-ticket-creating-account
      description: Requests a ticket for creating an account.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: admin-accounts.analyticsadminaccountsprovisionaccountticket
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: searches-through-all-changes-account
      description: Searches through all changes to an account or its children given the specified set of filters.
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: admin-accounts.analyticsadminaccountssearchchangehistoryevents
      with:
        account: tools.account
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.