Sample Swagger

---
swagger: "2.0"
info:
  description: "This is for ServiceNow API"
  version: "1.0.0"
  title: "Swagger ServiceNow"
  termsOfService: "http://swagger.io/terms/"
  contact:
    email: "sampleemail@mail.com"
  license:
    name: "Apache 2.0"
    url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "instance.servicenow.com"
basePath: "/remedy/servicenow"
tags:
- name: "ServiceNow API"
  description: "ServiceNow API"
  externalDocs:
    description: "Find out more"
    url: "http://swagger.io"
schemes:
- "http"
paths:
  /attachment:
    post:
      consumes:
      - "multipart/form-data"
      operationId: "uploadFile"
      parameters:
      - description: "table name"
        in: "formData"
        name: "table_name"
        required: true
        type: "string"
      - description: "table system id"
        in: "formData"
        name: "table_sys_id"
        required: true
        type: "string"
      - description: "file to be uploaded"
        in: "formData"
        name: "uploadFile"
        required: true
        type: "file"
      produces:
      - "application/json"
      responses:
        201:
          description: "successful operation"
          schema:
            $ref: "#/definitions/attachmentApiResponse"
        400:
          description: "Invalid input"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
      summary: "Send attachments to Service Now"
  /create/change:
    post:
      consumes:
      - "application/json"
      description: "Insert a change"
      operationId: "createChange"
      parameters:
      - description: "Create Change in servicenow"
        in: "body"
        name: "body"
        required: true
        schema:
          $ref: "#/definitions/createChangeReq"
      produces:
      - "application/json"
      responses:
        201:
          description: "successful operation"
          schema:
            $ref: "#/definitions/createChangeResp"
        400:
          description: "Invalid input"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
  /create/incident:
    post:
      consumes:
      - "application/json"
      description: ""
      operationId: "createIncident"
      parameters:
      - description: "Create incident in servicenow"
        in: "body"
        name: "body"
        required: true
        schema:
          $ref: "#/definitions/createIncidentReq"
      produces:
      - "application/json"
      responses:
        201:
          description: "successful operation"
          schema:
            $ref: "#/definitions/createIncidentResp"
        400:
          description: "Invalid input"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
  /update/change:
    put:
      consumes:
      - "application/json"
      description: "Update change"
      operationId: "updateChange"
      parameters:
      - description: "update change in servicenow"
        in: "body"
        name: "body"
        required: true
        schema:
          $ref: "#/definitions/updateChangeReq"
      produces:
      - "application/json"
      responses:
        201:
          description: "The operation was successful."
          schema:
            $ref: "#/definitions/updateChangeResp"
        400:
          description: "invalid input"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
  /update/incident:
    put:
      consumes:
      - "application/json"
      description: ""
      operationId: "updateIncident"
      parameters:
      - description: "update incident in servicenow"
        in: "body"
        name: "body"
        required: true
        schema:
          $ref: "#/definitions/updateIncidentReq"
      produces:
      - "application/json"
      responses:
        201:
          description: "successful operation"
          schema:
            $ref: "#/definitions/updateIncidentResp"
        400:
          description: "Invalid input"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
  /create/task_ci:
    post:
      operationId: "createTask_ci"
      responses:
        201:
          description: "The operation was successful."
          schema:
            $ref: "#/definitions/createTask_ciResp"
        400:
          description: "Invalid input"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      description: "Insert a task_ci"
      parameters:
      - name: "body"
        in: "body"
        schema:
          $ref: "#/definitions/createTask_ciReq"
        description: "Create task_ci in servicenow"
        required: true
  /update/task_ci:
    put:
      operationId: "changeTask_ci"
      responses:
        201:
          description: "The operation was successful."
          schema:
            $ref: "#/definitions/changeTask_ciResp"
        400:
          description: "The operation was successful."
          schema:
            $ref: "#/definitions/attachmentApiResponse"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      description: "Update task_ci"
      parameters:
      - name: "body"
        in: "body"
        schema:
          $ref: "#/definitions/changeTask_ciReq"
        description: "update task_ci in servicenow"
        required: true
  /delete/task_ci:
    delete:
      operationId: "deleteTask_ci"
      responses:
        204:
          description: "The operation was successful."
          schema:
            $ref: "#/definitions/deleteTask_ciResp"
        400:
          description: "invalid data"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
      produces:
      - "application/json"
      description: "Remove from task_ci"
      parameters:
      - name: "table_name"
        in: "header"
        type: "string"
      - name: "sys_id"
        in: "header"
        type: "string"
  /create/service:
    post:
      operationId: "createService"
      responses:
        201:
          description: "The operation was successful."
          schema:
            $ref: "#/definitions/createService_Resp"
        400:
          description: "bad request"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      description: "create service in SNOW"
      parameters:
      - name: "body"
        in: "body"
        schema:
          $ref: "#/definitions/createService_Req"
        description: "Create service in Service now"
        required: true
  /delete/service:
    delete:
      operationId: "deleteService"
      responses:
        204:
          description: "The operation was successful."
          schema:
            $ref: "#/definitions/deleteService_Resp"
        400:
          description: "invalid data"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
      produces:
      - "application/json"
      description: "Remove from service"
      parameters:
      - name: "sys_id"
        in: "header"
        type: "string"
  /create/ritm:
    post:
      consumes:
      - "application/json"
      description: "create RITM"
      operationId: "createRITM"
      parameters:
      - description: "Create RITM in servicenow"
        in: "body"
        name: "body"
        required: true
        schema:
          $ref: "#/definitions/createRITM_Req"
      produces:
      - "application/json"
      responses:
        201:
          description: "successful operation"
          schema:
            $ref: "#/definitions/createRITM_Resp"
        400:
          description: "Invalid input"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
  /update/ritm:
    put:
      consumes:
      - "application/json"
      description: "update RITM"
      operationId: "updateRITM"
      parameters:
      - description: "Update RITM in servicenow"
        in: "body"
        name: "body"
        required: true
        schema:
          $ref: "#/definitions/updateRITM_Req"
      produces:
      - "application/json"
      responses:
        201:
          description: "successful operation"
          schema:
            $ref: "#/definitions/updateRITM_Resp"
        400:
          description: "Invalid input"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
  /incident:
    get:
      operationId: "getIncident"
      responses:
        200:
          description: "The operation was successful."
          schema:
            $ref: "#/definitions/getIncident_Resp"
        400:
          description: "invalid data"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
      produces:
      - "application/json"
      description: "check if incident number exist in SNOW"
      parameters:
      - name: "fieldName"
        in: "query"
        type: "string"
      - name: "fieldValue"
        in: "query"
        type: "string"
  /change:
    get:
      operationId: "getChange"
      responses:
        200:
          description: "The operation was successful."
          schema:
            $ref: "#/definitions/getChange_Resp"
        400:
          description: "invalid data"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
      produces:
      - "application/json"
      description: "check if change number exist in SNOW"
      parameters:
      - name: "fieldName"
        in: "query"
        type: "string"
      - name: "fieldValue"
        in: "query"
        type: "string"
  /ritm:
    get:
      operationId: "getRITM"
      responses:
        200:
          description: "The operation was successful."
          schema:
            $ref: "#/definitions/getRITM_Resp"
        400:
          description: "invalid data"
          schema:
            $ref: "#/definitions/SNOWAPI_ErrResp"
      produces:
      - "application/json"
      description: "check if ritm number exist in SNOW"
      parameters:
      - name: "fieldName"
        in: "query"
        type: "string"
      - name: "fieldValue"
        in: "query"
        type: "string"
definitions:
  attachmentApiResponse:
    properties:
      status:
        type: "string"
      sysId:
        type: "string"
    type: "object"
  createChangeReq:
    properties:
      assigned_to:
        type: "string"
      assignment_group:
        type: "string"
      backout_plan:
        type: "string"
      close_code:
        type: "string"
      close_notes:
        type: "string"
      comments:
        type: "string"
      company:
        type: "string"
      description:
        type: "string"
      due_date:
        type: "string"
      end_date:
        type: "string"
      impact:
        type: "string"
      implementation_plan:
        type: "string"
      justification:
        type: "string"
      number:
        type: "string"
      on_hold:
        type: "string"
      on_hold_reason:
        type: "string"
      opened_by:
        type: "string"
      priority:
        type: "string"
      requested_by:
        type: "string"
      risk:
        type: "string"
      short_description:
        type: "string"
      start_date:
        type: "string"
      state:
        type: "string"
      sys_created_by:
        type: "string"
      sys_id:
        type: "string"
      test_plan:
        type: "string"
      type:
        type: "string"
      u_communications_plan:
        type: "string"
      u_source:
        type: "string"
      urgency:
        type: "string"
      work_end:
        type: "string"
      work_notes:
        type: "string"
      work_start:
        type: "string"
      business_service:
        type: "string"
      infrastructure_change_id:
        type: "string"
    type: "object"
  createChangeResp:
    properties:
      SNOW_sysId:
        type: "string"
      changeNumber:
        type: "string"
      status:
        type: "string"
    type: "object"
  createIncidentReq:
    properties:
      assignedGroup:
        type: "string"
      assignedTo:
        type: "string"
      categorizationTier1:
        type: "string"
      cause:
        type: "string"
      comments:
        type: "string"
      customerFirstName:
        type: "string"
      impact:
        type: "string"
      loginId:
        type: "string"
      notes:
        type: "string"
      priority:
        type: "string"
      remedyIncidentNum:
        type: "string"
      serviceType:
        type: "string"
      severity:
        type: "string"
      shortDescription:
        type: "string"
      status:
        type: "string"
      urgency:
        type: "string"
      cmdb_ci:
        type: "string"
      customerLastName:
        type: "string"
      resolution:
        type: "string"
      statusReason:
        type: "string"
      reportedSource:
        type: "string"
      categorizationReportedSource:
        type: "string"
    type: "object"
  createIncidentResp:
    properties:
      incidentNumber:
        type: "string"
      status:
        type: "string"
      sysId:
        type: "string"
    type: "object"
  SNOWAPI_ErrResp:
    properties:
      status:
        type: "string"
      message:
        type: "string"
    type: "object"
  updateChangeReq:
    properties:
      assigned_to:
        type: "string"
      assignment_group:
        type: "string"
      backout_plan:
        type: "string"
      close_code:
        type: "string"
      close_notes:
        type: "string"
      comments:
        type: "string"
      company:
        type: "string"
      description:
        type: "string"
      due_date:
        type: "string"
      end_date:
        type: "string"
      impact:
        type: "string"
      implementation_plan:
        type: "string"
      justification:
        type: "string"
      number:
        type: "string"
      on_hold:
        type: "string"
      on_hold_reason:
        type: "string"
      priority:
        type: "string"
      risk:
        type: "string"
      short_description:
        type: "string"
      start_date:
        type: "string"
      state:
        type: "string"
      sys_id:
        type: "string"
      test_plan:
        type: "string"
      type:
        type: "string"
      u_communications_plan:
        type: "string"
      urgency:
        type: "string"
      work_end:
        type: "string"
      work_notes:
        type: "string"
      work_start:
        type: "string"
      business_service:
        type: "string"
      cmdb_ci:
        type: "string"
      sys_created_by:
        type: "string"
      opened_by:
        type: "string"
      requested_by:
        type: "string"
    type: "object"
  updateChangeResp:
    properties:
      changeNumber:
        type: "string"
      status:
        type: "string"
      sysId:
        type: "string"
    type: "object"
  updateIncidentReq:
    properties:
      assignedGroup:
        type: "string"
      assignedTo:
        type: "string"
      categorizationTier1:
        type: "string"
      cause:
        type: "string"
      comments:
        type: "string"
      customerFirstName:
        type: "string"
      impact:
        type: "string"
      loginId:
        type: "string"
      notes:
        type: "string"
      priority:
        type: "string"
      remedyIncidentNum:
        type: "string"
      serviceType:
        type: "string"
      severity:
        type: "string"
      shortDescription:
        type: "string"
      status:
        type: "string"
      sysId:
        type: "string"
      urgency:
        type: "string"
      cmdb_ci:
        type: "string"
      resolution:
        type: "string"
      statusReason:
        type: "string"
      customerLastName:
        type: "string"
      reportedSource:
        type: "string"
      categorizationReportedSource:
        type: "string"
    type: "object"
  updateIncidentResp:
    properties:
      incidentNumber:
        type: "string"
      status:
        type: "string"
      sysId:
        type: "string"
    type: "object"
  createTask_ciReq:
    type: "object"
    properties:
      ci_item:
        type: "string"
      task:
        type: "string"
  createTask_ciResp:
    type: "object"
    properties:
      status:
        type: "string"
      sysId:
        type: "string"
  changeTask_ciReq:
    type: "object"
    properties:
      cmdb_ci:
        type: "string"
      sys_id:
        type: "string"
  changeTask_ciResp:
    type: "object"
    properties:
      status:
        type: "string"
      sysId:
        type: "string"
  deleteTask_ciResp:
    type: "object"
    properties:
      status:
        type: "string"
  createService_Req:
    type: "object"
    properties:
      cmdb_ci_service:
        type: "string"
      task:
        type: "string"
  createService_Resp:
    type: "object"
    properties:
      status:
        type: "string"
      sysId:
        type: "string"
  deleteService_Resp:
    type: "object"
    properties:
      status:
        type: "string"
  createRITM_Req:
    properties:
      comments:
        type: "string"
      assigned_to:
        type: "string"
      assignment_group:
        type: "string"
      comments_and_work_notes:
        type: "string"
      company:
        type: "string"
      cmdb_ci:
        type: "string"
      sys_created_on:
        type: "string"
      sys_created_by:
        type: "string"
      description:
        type: "string"
      impact:
        type: "string"
      opened_at:
        type: "string"
      priority:
        type: "string"
      state:
        type: "string"
      urgency:
        type: "string"
      work_notes:
        type: "string"
      u_remedy_requested_for:
        type: "string"
      status_reason:
        type: "string"
      u_remedy_request:
        type: "string"
    type: "object"
  createRITM_Resp:
    properties:
      number:
        type: "string"
      status:
        type: "string"
      sys_id:
        type: "string"
    type: "object"
  updateRITM_Req:
    properties:
      sys_id:
        type: "string"
      comments:
        type: "string"
      assigned_to:
        type: "string"
      assignment_group:
        type: "string"
      comments_and_work_notes:
        type: "string"
      company:
        type: "string"
      cmdb_ci:
        type: "string"
      sys_created_on:
        type: "string"
      sys_created_by:
        type: "string"
      description:
        type: "string"
      impact:
        type: "string"
      opened_at:
        type: "string"
      priority:
        type: "string"
      state:
        type: "string"
      urgency:
        type: "string"
      work_notes:
        type: "string"
      close_notes:
        type: "string"
      closed_at:
        type: "string"
      closed_by:
        type: "string"
      configuration_item:
        type: "string"
      due_date:
        type: "string"
      status_reason:
        type: "string"
      u_remedy_request:
        type: "string"
      sys_updated_on:
        type: "string"
      sys_updated_by:
        type: "string"
    type: "object"
  updateRITM_Resp:
    properties:
      number:
        type: "string"
      status:
        type: "string"
      sys_id:
        type: "string"
    type: "object"
  getRITM_Resp:
    properties:
      number:
        type: "string"
      status:
        type: "string"
      sysId:
        type: "string"
    type: "object"
  getIncident_Resp:
    properties:
      incidentNumber:
        type: "string"
      status:
        type: "string"
      sysId:
        type: "string"
    type: "object"
  getChange_Resp:
    properties:
      changeNumber:
        type: "string"
      status:
        type: "string"
      sysId:
        type: "string"
    type: "object"

Published by Saikiran_Mallam

I am an Integration Developer with 4 years of experience on IBM Integration Bus, Datapower, IBM APIConnect.

Leave a comment

Design a site like this with WordPress.com
Get started