DEV Community tags API

The tags API from DEV Community — 4 operation(s) for tags.

OpenAPI Specification

devto-tags-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Forem API V1 agent_sessions tags API
  version: 1.0.0
  description: "Access Forem articles, users and other resources via API.\n        For a real-world example of Forem in action, check out [DEV](https://www.dev.to).\n        All endpoints can be accessed with the 'api-key' header and a accept header, but\n        some of them are accessible publicly without authentication.\n\n        Dates and date times, unless otherwise specified, must be in\n        the [RFC 3339](https://tools.ietf.org/html/rfc3339) format."
servers:
- url: https://dev.to/api
  description: Production server
security:
- api-key: []
tags:
- name: tags
paths:
  /api/follows/tags:
    get:
      summary: Followed Tags
      tags:
      - tags
      description: This endpoint allows the client to retrieve a list of the tags they follow.
      operationId: getFollowedTags
      responses:
        '401':
          description: unauthorized
          content:
            application/json:
              example:
                error: unauthorized
                status: 401
        '200':
          description: A List of followed tags
          content:
            application/json:
              example:
              - id: 2315
                name: tag3
                points: 1.0
              - id: 2316
                name: tag4
                points: 1.0
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FollowedTag'
  /api/tags:
    get:
      summary: Tags
      tags:
      - tags
      security: []
      description: 'This endpoint allows the client to retrieve a list of tags that can be used to tag articles.


        It will return tags ordered by popularity.


        It supports pagination, each page will contain 10 tags by default.'
      operationId: getTags
      parameters:
      - $ref: '#/components/parameters/pageParam'
      - $ref: '#/components/parameters/perPageParam10to1000'
      responses:
        '200':
          description: A List of all tags
          content:
            application/json:
              example:
              - id: 2353
                name: tag5
                bg_color_hex: null
                text_color_hex: null
                short_summary: null
              - id: 2354
                name: tag6
                bg_color_hex: null
                text_color_hex: null
                short_summary: null
              - id: 2355
                name: tag7
                bg_color_hex: null
                text_color_hex: null
                short_summary: null
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tag'
  /follows/tags:
    get:
      summary: Followed Tags
      tags:
      - tags
      description: This endpoint allows the client to retrieve a list of the tags they follow.
      operationId: getFollowedTags
      responses:
        '200':
          description: A List of followed tags
          content:
            application/json:
              example:
              - id: 701
                name: tag3
                points: 1
              - id: 702
                name: tag4
                points: 1
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FollowedTag'
        '401':
          description: unauthorized
          content:
            application/json:
              example:
                error: unauthorized
                status: 401
  /tags:
    get:
      summary: Tags
      tags:
      - tags
      security: []
      description: 'This endpoint allows the client to retrieve a list of tags that can be used to tag articles.


        It will return tags ordered by popularity.


        It supports pagination, each page will contain 10 tags by default.'
      operationId: getTags
      parameters:
      - $ref: '#/components/parameters/pageParam'
      - $ref: '#/components/parameters/perPageParam10to1000'
      responses:
        '200':
          description: A List of all tags
          content:
            application/json:
              example:
              - id: 806
                name: tag5
                bg_color_hex: null
                text_color_hex: null
              - id: 808
                name: tag6
                bg_color_hex: null
                text_color_hex: null
              - id: 809
                name: tag7
                bg_color_hex: null
                text_color_hex: null
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tag'
components:
  parameters:
    pageParam:
      in: query
      name: page
      required: false
      description: Pagination page
      schema:
        type: integer
        format: int32
        minimum: 1
        default: 1
    perPageParam10to1000:
      in: query
      name: per_page
      required: false
      description: Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 1000
        default: 10
  schemas:
    FollowedTag:
      description: Representation of a followed tag
      type: object
      properties:
        id:
          description: Tag id
          type: integer
          format: int64
        name:
          type: string
        points:
          type: number
          format: float
      required:
      - id
      - name
      - points
    Tag:
      description: Representation of a tag
      type: object
      properties:
        id:
          description: Tag id
          type: integer
          format: int64
        name:
          type: string
        bg_color_hex:
          type: string
          nullable: true
        text_color_hex:
          type: string
          nullable: true
  securitySchemes:
    api-key:
      type: apiKey
      name: api-key
      in: header
      description: "API Key authentication.\n\nAuthentication for some endpoints, like write operations on the\nArticles API require a DEV API key.\n\nAll authenticated endpoints are CORS disabled, the API key is intended for non-browser scripts.\n\n### Getting an API key\n\nTo obtain one, please follow these steps:\n\n  - visit https://dev.to/settings/extensions\n  - in the \"DEV API Keys\" section create a new key by adding a\n    description and clicking on \"Generate API Key\"\n\n    ![obtain a DEV API Key](https://user-images.githubusercontent.com/37842/172718105-bd93664e-76e0-477d-99c4-265dda0b06c5.png)\n\n  - You'll see the newly generated key in the same view\n    ![generated DEV API Key](https://user-images.githubusercontent.com/37842/172718151-e7fe26a0-9937-42e8-96c6-333acdab9e49.png)"