Thinkific Chapters API

Chapters operations

OpenAPI Specification

thinkific-chapters-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Thinkific Admin Bundles Chapters API
  description: Thinkific's public API can be used to integrate your application with your Thinkific site.
  termsOfService: https://www.thinkific.com/legal/
  contact:
    email: developers@thinkific.com
  version: v1
servers:
- url: https://api.thinkific.com/api/public/v1
security:
- OAuthAccessToken: []
- ApiKey: []
  ApiKeySubdomain: []
tags:
- name: Chapters
  description: Chapters operations
paths:
  /chapters/{id}:
    get:
      tags:
      - Chapters
      summary: Get Chapters
      description: Returns a chapter
      operationId: getChapterByID
      parameters:
      - name: id
        in: path
        description: ID of the Chapter in the form of an integer.
        required: true
        schema:
          type: number
      responses:
        200:
          description: Chapters response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChapterResponse'
        403:
          $ref: '#/components/responses/ErrorForbiddenAppsNotAvailableResponse'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorNotFound'
  /chapters/{id}/contents:
    get:
      tags:
      - Chapters
      summary: Get Contents by Chapter id
      description: Retrieves the Contents within the Chapter identified by the provided id
      operationId: getContentsByID
      parameters:
      - name: id
        in: path
        description: ID of the Chapter in the form of an integer
        required: true
        schema:
          type: number
      - name: page
        in: query
        description: The page within the collection to fetch.
        schema:
          type: number
          default: 1.0
      - name: limit
        in: query
        description: The number of items to be returned.
        schema:
          type: number
          default: 25.0
      responses:
        200:
          description: Chapters response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetContentsResponse'
        403:
          $ref: '#/components/responses/ErrorForbiddenAppsNotAvailableResponse'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorNotFound'
components:
  responses:
    ErrorForbiddenAppsNotAvailableResponse:
      description: Access Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorForbiddenAppsNotAvailable'
  schemas:
    Meta:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
    GetContentsResponse:
      required:
      - items
      - meta
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ContentResponse'
        meta:
          $ref: '#/components/schemas/Meta'
    ContentResponse:
      required:
      - chapter_id
      - contentable_type
      - free
      - id
      - name
      - position
      - take_url
      type: object
      properties:
        id:
          type: number
          description: The ID of the Content as an integer
          example: 1.0
        name:
          type: string
          description: The name of the Content
          example: Video Lesson
        position:
          type: number
          description: The position of the Content within a Chapter.
          example: 1.0
        chapter_id:
          type: number
          description: The ID of the Chapter that the Content is in as an integer
          example: 1.0
        contentable_type:
          type: string
          enum:
          - Assignment
          - Audio
          - Download
          - BrilliumExam
          - Disqus
          - HtmlItem
          - Iframe
          - LiveLesson
          - Lesson
          - Pdf
          - Presentation
          - Quiz
          - Survey
          description: The type of the Content
          example: Lesson
        free:
          type: boolean
          description: A boolean indicating whether the Content is free
          example: false
        take_url:
          type: string
          description: The url of the Content in the Course Player
          example: http://somesite.thinkific.com/courses/take/xxx/yyy
    ErrorForbiddenAppsNotAvailable:
      type: object
      properties:
        error:
          type: string
          description: access forbidden
      example:
        error: Access to Apps is not available on your plan. Upgrade to gain access
    ErrorNotFound:
      type: object
      properties:
        error:
          type: string
          description: item not found error
      example:
        error: Record not found.
    ChapterResponse:
      required:
      - content_ids
      - id
      - name
      - position
      type: object
      properties:
        id:
          type: number
          description: The ID of the Chapter as an integer
          example: 1.0
        name:
          type: string
          description: The name of the Chapter
          example: Chapter 1
        position:
          type: number
          description: The position of the Chapter within the Course
          example: 1.0
        description:
          type: string
          description: The description of the Chapter
          example: The first Chapter
        duration_in_seconds:
          type: number
          description: The duration of the Chapter in seconds. This is the sum of the length of the video lessons in the Chapter
          example: 60.0
        content_ids:
          type: array
          example:
          - 1
          - 2
          - 3
          items:
            type: number
            description: The IDs of the Contents within the Chapter
    Pagination:
      type: object
      properties:
        current_page:
          type: number
          description: Current page number
          example: 1.0
        next_page:
          type: number
          description: Next page number
          example: 2.0
        prev_page:
          type: number
          description: Previous page number
        total_pages:
          type: number
          description: Number of total pages
          example: 10.0
        total_items:
          type: number
          description: Number of total items
          example: 250.0
        entries_info:
          type: string
          description: Entries info
          example: 1-10 of 10
      description: Pagination metadata
  securitySchemes:
    OAuthAccessToken:
      type: http
      scheme: bearer
    ApiKey:
      type: apiKey
      in: header
      name: X-Auth-API-Key
      description: Used together with ApiKeySubdomain
    ApiKeySubdomain:
      type: apiKey
      in: header
      name: X-Auth-Subdomain
      description: Used together with ApiKey
externalDocs:
  description: Find out more about Thinkifc's API
  url: http://developers.thinkific.com/api/api-documentation/