#
# Copyright (C) 2019-2020 SailPoint Technologies, Inc.  All rights reserved.
#
get:
  tags:
    - Task Management
  summary: Retrieves a task definition summary
  description: Get a specified TaskDefinitionSummary.
  operationId: getTaskDefinitionSummary
  parameters:
    - name: id
      in: path
      description: ID of the TaskDefinition to get a summary for
      required: true
      style: simple
      explode: false
      schema:
        type: string
        example: taskDefId
  responses:
    "200":
      description: TaskDefinitionSummary with the given task definition ID
      content:
        application/json:
          schema:
            $ref: '../schemas/TaskDefinitionSummary.yaml'
    "400":
      $ref: '../../v3/responses/400.yaml'
    "401":
      $ref: '../../v3/responses/401.yaml'
    "403":
      $ref: '../../v3/responses/403.yaml'
    "404":
      $ref: '../../v3/responses/404.yaml'
    "429":
      $ref: '../../v3/responses/429.yaml'
    "500":
      $ref: '../../v3/responses/500.yaml'
  security:
    - oauth2: [idn:task-definition:read, idn:task-definition:manage]
patch:
  tags:
    - Task Management
  summary: Patch a specified TaskDefinition.
  description: Update an existing TaskDefinition using PATCH.
  operationId: patchTaskDefinition
  parameters:
    - name: id
      in: path
      description: ID of the TaskDefinition to patch
      required: true
      style: simple
      explode: false
      schema:
        type: string
        example: taskDefId
  requestBody:
    content:
      application/json-patch+json:
        schema:
          $ref: '../schemas/JsonPatch.yaml'
    required: true
  responses:
    "200":
      description: Responds with the TaskDefinition as updated.
      content:
        application/json:
          schema:
            $ref: '../schemas/TaskDefinitionSummary.yaml'
    "400":
      $ref: '../../v3/responses/400.yaml'
    "401":
      $ref: '../../v3/responses/401.yaml'
    "403":
      $ref: '../../v3/responses/403.yaml'
    "404":
      $ref: '../../v3/responses/404.yaml'
    "429":
      $ref: '../../v3/responses/429.yaml'
    "500":
      $ref: '../../v3/responses/500.yaml'
  security:
    - oauth2: [idn:task-definition:manage]
