SpaK2User
Canvas Initiate

REST API HTTP 400 response code error

Attempting to post add request from k2 to external application (service desk plus)  

Confirmed the swagger file has no issues running from swagger.io 

Unable to get K2 to post data. from the REST API Service

{
"swagger": "2.0",
"info": {
"description": "defaultDescription",
"version": "0.1",
"title": "defaultTitle"
},
"host": "localhost:8181",
"paths": {
"/api/v3/requests": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "input_data",
"in": "query",
"required": false,
"type": "string",
"x-example": "{ \"request\":{ \"subject\": \"Test Ticket 10\", \"requester\":{ \"name\": \"test.user\" } } }"
},
{
"name": "TECHNICIAN_KEY",
"in": "query",
"required": false,
"type": "string",
"x-example": "4D14C0AE-FE17-4967-A00E-36EB29AEAFBB"
}
],
"responses": {
"201": {
"description": "Definition generated from Swagger Inspector",
"schema": {
"$ref": "#/definitions/Model0"
}
}
}
}
}
},
"definitions": {
"Resolution": {
"properties": {
"resolution_attachments": {
"type": "array"
},
"content": {
"type": "object",
"properties": {}
}
}
},
"Requester": {
"properties": {
"email_id": {
"type": "object",
"properties": {}
},
"phone": {
"type": "object",
"properties": {}
},
"name": {
"type": "string"
},
"mobile": {
"type": "object",
"properties": {}
},
"is_vipuser": {
"type": "boolean"
},
"id": {
"type": "string"
},
"department": {
"type": "object",
"properties": {}
}
}
},
"Created_time": {
"properties": {
"display_value": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"Created_by": {
"properties": {
"email_id": {
"type": "object",
"properties": {}
},
"phone": {
"type": "string"
},
"name": {
"type": "string"
},
"mobile": {
"type": "string"
},
"is_vipuser": {
"type": "boolean"
},
"id": {
"type": "string"
},
"department": {
"type": "object",
"properties": {}
}
}
},
"Status": {
"properties": {
"color": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"Template": {
"properties": {
"is_service_template": {
"type": "boolean"
},
"name": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"Request": {
"properties": {
"ola_due_by_time": {
"type": "object",
"properties": {}
},
"subject": {
"type": "string"
},
"resolution": {
"$ref": "#/definitions/Resolution"
},
"linked_to_request": {
"type": "object",
"properties": {}
},
"onhold_time": {
"type": "object",
"properties": {}
},
"mode": {
"type": "object",
"properties": {}
},
"is_read": {
"type": "boolean"
},
"lifecycle": {
"type": "object",
"properties": {}
},
"reason_for_cancel": {
"type": "object",
"properties": {}
},
"assets": {
"type": "array"
},
"is_trashed": {
"type": "boolean"
},
"id": {
"type": "string"
},
"assigned_time": {
"type": "object",
"properties": {}
},
"group": {
"type": "object",
"properties": {}
},
"requester": {
"$ref": "#/definitions/Requester"
},
"cancel_requested_by": {
"type": "object",
"properties": {}
},
"email_to": {
"type": "array"
},
"sla_violated_technician": {
"type": "object",
"properties": {}
},
"created_time": {
"$ref": "#/definitions/Created_time"
},
"item": {
"type": "object",
"properties": {}
},
"level": {
"type": "object",
"properties": {}
},
"has_resolution_attachments": {
"type": "boolean"
},
"approval_status": {
"type": "object",
"properties": {}
},
"impact": {
"type": "object",
"properties": {}
},
"service_category": {
"type": "object",
"properties": {}
},
"sla": {
"type": "object",
"properties": {}
},
"priority": {
"type": "object",
"properties": {}
},
"created_by": {
"$ref": "#/definitions/Created_by"
},
"sla_violated_group": {
"type": "object",
"properties": {}
},
"scheduled_end_time": {
"type": "object",
"properties": {}
},
"tags": {
"type": "array"
},
"first_response_due_by_time": {
"type": "object",
"properties": {}
},
"last_updated_time": {
"type": "object",
"properties": {}
},
"has_notes": {
"type": "boolean"
},
"impact_details": {
"type": "object",
"properties": {}
},
"subcategory": {
"type": "object",
"properties": {}
},
"email_cc": {
"type": "array"
},
"status": {
"$ref": "#/definitions/Status"
},
"scheduled_start_time": {
"type": "object",
"properties": {}
},
"template": {
"$ref": "#/definitions/Template"
},
"email_ids_to_notify": {
"type": "array"
},
"request_type": {
"type": "object",
"properties": {}
},
"cancel_requested_time": {
"type": "object",
"properties": {}
},
"notification_status": {
"type": "object",
"properties": {}
},
"description": {
"type": "object",
"properties": {}
},
"has_dependency": {
"type": "boolean"
},
"has_conversation": {
"type": "boolean"
},
"callback_url": {
"type": "object",
"properties": {}
},
"chat_type": {
"type": "integer",
"format": "int32"
},
"is_service_request": {
"type": "boolean"
},
"urgency": {
"type": "object",
"properties": {}
},
"is_shared": {
"type": "boolean"
},
"cancel_requested": {
"type": "boolean"
},
"has_request_initiated_change": {
"type": "boolean"
},
"request_template_task_ids": {
"type": "array"
},
"department": {
"type": "object",
"properties": {}
},
"is_reopened": {
"type": "boolean"
},
"has_draft": {
"type": "boolean"
},
"has_attachments": {
"type": "boolean"
},
"has_linked_requests": {
"type": "boolean"
},
"is_overdue": {
"type": "boolean"
},
"technician": {
"type": "object",
"properties": {}
},
"has_request_caused_by_change": {
"type": "boolean"
},
"has_problem": {
"type": "boolean"
},
"due_by_time": {
"type": "object",
"properties": {}
},
"has_project": {
"type": "boolean"
},
"is_first_response_overdue": {
"type": "boolean"
},
"cancel_requested_is_pending": {
"type": "boolean"
},
"recommend_template": {
"type": "object",
"properties": {}
},
"unreplied_count": {
"type": "object",
"properties": {}
},
"category": {
"type": "object",
"properties": {}
}
}
},
"Response_status": {
"properties": {
"status_code": {
"type": "integer",
"format": "int32"
},
"status": {
"type": "string"
}
}
},
"Model0": {
"properties": {
"request": {
"$ref": "#/definitions/Request"
},
"response_status": {
"$ref": "#/definitions/Response_status"
}
}
}
}
}

Labels: (1)
0 Kudos
Reply