> ## Documentation Index
> Fetch the complete documentation index at: https://tyk.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview what a push would change

> List the gateway-visible objects created, updated or deleted in a namespace since its last configuration push. Use "global" (or omit) for the global namespace. Each change names its owning Workspace (none for plugins, model prices, OAuth clients and access tokens), and by_workspace / unattributed_total count every change. With workspace_id, outside_total and stained report the changes a push limited to that Workspace would carry from outside it: changes owned by another Workspace, and plugin and model price changes (OAuth clients and access tokens never count).



## OpenAPI

````yaml /swagger/5.16/ai-studio-swagger.yml get /sync/pending-changes
openapi: 3.0.1
info:
  title: Midsommar API
  description: This is the API for the Midsommar user and group management system.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: //localhost:8080/api/v1
security: []
paths:
  /sync/pending-changes:
    get:
      tags:
        - sync
      summary: Preview what a push would change
      description: >-
        List the gateway-visible objects created, updated or deleted in a
        namespace since its last configuration push. Use "global" (or omit) for
        the global namespace. Each change names its owning Workspace (none for
        plugins, model prices, OAuth clients and access tokens), and
        by_workspace / unattributed_total count every change. With workspace_id,
        outside_total and stained report the changes a push limited to that
        Workspace would carry from outside it: changes owned by another
        Workspace, and plugin and model price changes (OAuth clients and access
        tokens never count).
      parameters:
        - name: namespace
          in: query
          description: 'Namespace (default: global)'
          schema:
            type: string
        - name: workspace_id
          in: query
          description: Workspace to report the stain for
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/services.PendingChanges'
        '422':
          description: 'invalid_workspace: unknown Workspace'
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - BearerAuth: []
components:
  schemas:
    services.PendingChanges:
      type: object
      properties:
        baseline:
          type: string
          description: push | edge_ack | none
        by_workspace:
          type: array
          description: |-
            ByWorkspace counts every pending change (not only the listed ones)
            by owning Workspace; UnattributedTotal counts those with none.
          items:
            $ref: '#/components/schemas/services.PendingWorkspaceTotal'
        changes:
          type: array
          items:
            $ref: '#/components/schemas/services.PendingChange'
        last_push_at:
          type: string
        namespace:
          type: string
          description: Namespace is the canonical spelling (models.CanonicalNamespace).
        outside_total:
          type: integer
        since:
          type: string
          description: >-
            Since is the reference point: the namespace's last push, or -- when

            no push was ever recorded but an edge is in sync with the namespace

            checksum -- that edge's ack. Nil when there is neither, in which
            case

            every object is "created". Baseline says which.
        stained:
          type: boolean
        total:
          type: integer
        unattributed_total:
          type: integer
        workspace_id:
          type: integer
          description: >-
            Set when asked about one Workspace (?workspace_id=): OutsideTotal

            counts the changes foreign to it (PendingChangeIsForeign) and
            Stained

            reports whether there are any, i.e. whether a push limited to that

            Workspace would carry changes from outside it.
    services.PendingWorkspaceTotal:
      type: object
      properties:
        name:
          type: string
        total:
          type: integer
        workspace_id:
          type: integer
    services.PendingChange:
      type: object
      properties:
        at:
          type: string
          description: when that change happened
        change:
          type: string
          description: created | updated | deleted
        hidden:
          type: boolean
          description: |-
            Hidden marks a change whose object the caller cannot see; its type,
            kind, time and Workspace id are still reported.
        id:
          type: integer
          description: >-
            ID and Name are left out (Hidden set) for an object the caller
            cannot

            see: an App or router in a Workspace their read does not cover.
        name:
          type: string
          description: display name at the time of the query
        type:
          type: string
          description: >-
            llm, app, filter, tool, datasource, plugin, model_router,
            semantic_router, model_price, oauth_client, access_token
        workspace_id:
          type: integer
          description: |-
            WorkspaceID is the Workspace that owns the object (a stored 0 reads
            as the Default workspace); nil for types with no owning Workspace
            (plugin, model_price, oauth_client, access_token).
        workspace_name:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````