Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Tags API is available since the 2.7.0 Smart Issue Templates version.

Swagger open api macro
displayOperationIdfalse
methodsnone,get,put,post,delete,options,head,patch,trace
validator
defaultModelsExpandDepth1
url
token
defaultModelRenderingexample
filter
password
expandlist
showCommonExtensionsfalse
filename
operations
maxDisplayedTags
attachfalse

...

showExtensionsfalse

...

displayRequestDurationfalse
username
order
openapi: 3.0.3
info:
  title: SITDC REST API
  version: '1.0'
  description: |
    Path structure

    |Path type|Path structure                                       |Description          |
    |---------|-----------------------------------------------------|---------------------|
    |URI      |http://host:port/context/rest/smartissuetemplates/1.0|Root of the SITDC API|
tags:
  - name: Tag
    description: SITDC Tag
    externalDocs:
      description: Find out more about Tags
      url: https://appsdelivered.atlassian.net/wiki/spaces/SIT/pages/932872193/Tags

paths:
  /smartissuetemplates/1.0/tag:
    post:
      tags:
        - Tag
      summary: Add a new Tag
      description:  Creates a Tag
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - text
              properties:
                text:
                  type: string
                  example: 'New Tag'
      responses:
        '201':
          description: Successfull operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: Invalid data supplied
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"

    put:
      tags:
        - Tag
      summary: Update a Tag
      description: Returns an updated Tag
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Tag'
      responses:
        '200':
          description: Successfull operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: Invalid data supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Tag not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
            
  /smartissuetemplates/1.0/tag/{tagId}:
    delete:
      tags:
        - Tag
      summary: Delete a Tag by ID
      description: Deletes a Tag by ID
      parameters:
        - name: tagId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: Successfull operation
        '400':
          description: Tag ID not supplied
        '404':
          description: Tag not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
  
  /smartissuetemplates/1.0/tag/unique:
    post:
      tags:
        - Tag
      summary: Check if a Tag is unique
      description: Checks if a Tag is unique
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Tag'
      responses:
        '200':
          description: Successfull operation
          content:
            application/json:
              schema:
                type: boolean


components:
  schemas:
    Tag:
      required:
        - id
        - text
      type: object
      properties:
        id:
          type: integer
          example: 1
        text:
          type: string
          example: New Tag
        owner:
          $ref: '#/components/schemas/User'
        created:
          type: integer
          example: 1691694943294
        isNew:
          type: boolean
          example: false
        updateAuthor:
          $ref: '#/components/schemas/User'
        updated:
          type: integer
          example: 1691694943294


    User:
      required:
        - username
      type: object
      properties:
        username:
          type: string
          example: testUser
        userKey:
          type: string
          example: JIRAUSER122
        displayName:
          type: string
          example: Test User
        admin:
          type: boolean
          example: false
        userEmail:
          type: string
          example: user@example.com
        avatarUrl:
          type: string
          
    
    ErrorMessage:
      type: string
      description: Error message
      example: "Error message"