Zesty Views API

Manage view template files.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

zesty-views-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Zesty Accounts Apps Views API
  description: The Zesty.io Accounts API is used to manage users, roles, instances, teams, tokens, ecosystems, webhooks, and apps. It provides administrative control over the organizational structure of a Zesty.io account. All endpoints require authentication via a session token obtained from the Auth API.
  version: 1.0.0
  contact:
    name: Zesty.io
    url: https://www.zesty.io/
  license:
    name: Proprietary
    url: https://www.zesty.io/
servers:
- url: https://accounts.api.zesty.io/v1
  description: Zesty Accounts API Production Server
tags:
- name: Views
  description: Manage view template files.
paths:
  /web/views:
    get:
      operationId: getViews
      summary: Zesty List all views
      description: Returns a list of all view files (templates) in the instance.
      tags:
      - Views
      security:
      - sessionToken: []
      responses:
        '200':
          description: A list of views.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/View'
        '401':
          description: Unauthorized.
    post:
      operationId: createView
      summary: Zesty Create a view
      description: Creates a new view file in the instance.
      tags:
      - Views
      security:
      - sessionToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - fileName
              - code
              properties:
                fileName:
                  type: string
                  description: The filename for the view.
                code:
                  type: string
                  description: The view template code.
                type:
                  type: string
                  description: The view type (e.g., snippet, ajax-json).
      responses:
        '201':
          description: View created successfully.
        '400':
          description: Invalid request.
        '401':
          description: Unauthorized.
  /web/views/{viewZUID}:
    get:
      operationId: getView
      summary: Zesty Get a view
      description: Returns a specific view file and its code content.
      tags:
      - Views
      security:
      - sessionToken: []
      parameters:
      - name: viewZUID
        in: path
        required: true
        schema:
          type: string
        description: The ZUID of the view.
      responses:
        '200':
          description: View details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    $ref: '#/components/schemas/View'
        '401':
          description: Unauthorized.
        '404':
          description: View not found.
    put:
      operationId: updateView
      summary: Zesty Update a view
      description: Updates the code content of a specific view file.
      tags:
      - Views
      security:
      - sessionToken: []
      parameters:
      - name: viewZUID
        in: path
        required: true
        schema:
          type: string
        description: The ZUID of the view.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: The updated view template code.
      responses:
        '200':
          description: View updated successfully.
        '401':
          description: Unauthorized.
        '404':
          description: View not found.
components:
  schemas:
    View:
      type: object
      properties:
        ZUID:
          type: string
        fileName:
          type: string
        code:
          type: string
        type:
          type: string
        version:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    sessionToken:
      type: apiKey
      in: header
      name: Authorization
      description: A session token obtained from the Auth API login endpoint.
externalDocs:
  description: Zesty Accounts API Documentation
  url: https://docs.zesty.io/docs/accounts