Templafy Libraries API

The Libraries API from Templafy — 2 operation(s) for libraries.

OpenAPI Specification

templafy-libraries-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  contact:
    url: https://support.templafy.com/hc/en-us/requests/new
    name: Submit support ticket
  description: Please refer to our [documentation](https://support.templafy.com/hc/en-us/articles/4411351240081-Public-API-Hive-) for guidelines and examples.
  title: Templafy Public DataSourceFields Libraries API
  version: v3
  termsOfService: https://www.templafy.com/templafy-saas-agreement/
servers:
- variables:
    tenantId:
      default: ''
      description: Your Templafy subdomain, i.e., https://{TenantId}.api.templafy.com
  url: https://{tenantId}.api.templafy.com/v3
tags:
- name: Libraries
paths:
  /libraries:
    get:
      tags:
      - Libraries
      summary: Lists all libraries from all spaces.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Library'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - bearerAuth:
        - library.read
        - library.readwrite
  /libraries/{spaceId}/{libraryType}:
    get:
      tags:
      - Libraries
      summary: Returns the library by the space identifier and library type.
      description: The response has a root folder unique identifier that can be used to request the content of the library.
      parameters:
      - name: spaceId
        in: path
        description: The identifier of the space
        required: true
        schema:
          type: integer
          format: int64
      - name: libraryType
        in: path
        description: Type of the library to return
        required: true
        schema:
          $ref: '#/components/schemas/LibraryType'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LibraryDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundProblemDetails'
      security:
      - bearerAuth:
        - library.read
        - library.readwrite
components:
  schemas:
    LibraryType:
      enum:
      - documents
      - presentations
      - spreadsheets
      - slides
      - slide-elements
      - text-elements
      - images
      - pdfs
      - links
      - email-elements
      type: string
      description: Type of the assets that can be stored in the library
    Library:
      required:
      - id
      - libraryType
      - name
      - rootFolderId
      - spaceId
      type: object
      properties:
        id:
          type: integer
          description: Unique library identifier
          format: int64
        name:
          maxLength: 25
          minLength: 1
          type: string
          description: Display name of the library
        libraryType:
          $ref: '#/components/schemas/LibraryType'
        spaceId:
          type: integer
          description: Unique identifier of the space to which the library belongs
          format: int64
        rootFolderId:
          type: integer
          description: Unique identifier of the root folder of the library
          format: int64
      additionalProperties: false
    NotFoundProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        traceId:
          type: string
          nullable: true
      additionalProperties: false
      example:
        title: NotFound
        detail: The server can not find the requested resource.
        status: 404
        traceId: d61f7ce-cccb-4e5b-8727-3b68a61a0559
    LibraryDetails:
      required:
      - id
      - libraryType
      - name
      - rootFolderId
      - spaceId
      type: object
      properties:
        id:
          type: integer
          description: Unique library identifier
          format: int64
        name:
          maxLength: 25
          minLength: 1
          type: string
          description: Display name of the library
        libraryType:
          $ref: '#/components/schemas/LibraryType'
        spaceId:
          type: integer
          description: Unique identifier of the space to which the library belongs
          format: int64
        rootFolderId:
          type: integer
          description: Unique identifier of the root folder of the library
          format: int64
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key