Zesty Stylesheets API

Manage CSS stylesheet files.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

zesty-stylesheets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Zesty Accounts Apps Stylesheets 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: Stylesheets
  description: Manage CSS stylesheet files.
paths:
  /web/stylesheets:
    get:
      operationId: getStylesheets
      summary: Zesty List all stylesheets
      description: Returns a list of all stylesheet files in the instance.
      tags:
      - Stylesheets
      security:
      - sessionToken: []
      responses:
        '200':
          description: A list of stylesheets.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Stylesheet'
        '401':
          description: Unauthorized.
    post:
      operationId: createStylesheet
      summary: Zesty Create a stylesheet
      description: Creates a new stylesheet file in the instance.
      tags:
      - Stylesheets
      security:
      - sessionToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - fileName
              - code
              properties:
                fileName:
                  type: string
                code:
                  type: string
                type:
                  type: string
      responses:
        '201':
          description: Stylesheet created successfully.
        '400':
          description: Invalid request.
        '401':
          description: Unauthorized.
  /web/stylesheets/{stylesheetZUID}:
    get:
      operationId: getStylesheet
      summary: Zesty Get a stylesheet
      description: Returns a specific stylesheet and its code content.
      tags:
      - Stylesheets
      security:
      - sessionToken: []
      parameters:
      - name: stylesheetZUID
        in: path
        required: true
        schema:
          type: string
        description: The ZUID of the stylesheet.
      responses:
        '200':
          description: Stylesheet details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    $ref: '#/components/schemas/Stylesheet'
        '401':
          description: Unauthorized.
        '404':
          description: Stylesheet not found.
    put:
      operationId: updateStylesheet
      summary: Zesty Update a stylesheet
      description: Updates the code content of a specific stylesheet.
      tags:
      - Stylesheets
      security:
      - sessionToken: []
      parameters:
      - name: stylesheetZUID
        in: path
        required: true
        schema:
          type: string
        description: The ZUID of the stylesheet.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
      responses:
        '200':
          description: Stylesheet updated successfully.
        '401':
          description: Unauthorized.
        '404':
          description: Stylesheet not found.
components:
  schemas:
    Stylesheet:
      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