Go to main content

Oracle® Advanced Support Platform Ticket Exchange Service Model and Specification API User Guide

Exit Print View

Updated: December 2023
 
 

POST Request Format

A POST request queries an incident related to an external customer created in the Oracle system.

The endpoint is https://amr.oracle.com/api/tes/incidents/search.

The format of the request is as follows:

{
 "criteria": {
   "connectBy": "AND",
   "expressions": [{
     "name": "fieldname",
     "operator": "operator",
     "value": ""
    },
    {
    "name": "fieldname",
    "operator": "operator",
    "value": "value"
    }
   ]
  },

 "fields": "field1,field2,field3",
  "sort": "+field1"
 }

Where the values represent:

  • Criteria: Filter criteria.

  • connectBy: How expressions are connected. AND is used by default; OR is the other supported value. Expressions cannot be connected by AND or OR.

  • expressions: Actual expressions connected by the connectBy value.

  • name: Field name for the expression.

  • operator: Operator to apply for the expression condition.

  • value: Field value.

  • fields: Fields to select as part of the response.

  • sort: Sort by field (where the operator + is used for ascending order and the operator - is used for descending order)

A sample POST request is as follows:

{
 "criteria": {
   "connectBy": "AND",
   "expressions": [{
     "name": "startTime",
     "operator": "greater_or_equal",
     "value": "1513067444000"
    },
    {
    "name": "endTime",
    "operator": "less_or_equal",
    "value": "1513067744000"
    }
   ]
  },

 "fields": "status,severity,description",
  "sort": "+status"
 }

The response codes are listed in the following table:

Table 3  POST Command Response Codes
Code
Description
Response
200
Successful
[{
  "action": "create",
  "incidentId": "77777",
  "summary": "Summary",
  "description": "desc",
  "status": "In Progress",
  "severity": "1"
 },
 { "action": "update",
"incidentId": "88888",
"externalId": "100001",
"status": "Resolved",
"worklog":[{
"wlSummary": "worklog summary",
"wlTime": "2017-12-11T17:03:47 UTC",
"wlSource": "System "
}]
 }
]
400
Bad request
{
 "action": "search",
 "actionResponse" : "error",
 "status": 400,
 "errorMessage": "xxxxx"
}
401
Unauthorized
{
 "action": "search",
 "actionResponse" : "error",
 "status": 401,
 "errorMessage": "xxxxx"
}
404
Resource not found
500
Internal server error
{
 "action": "search",
 "actionResponse" : "error",
 "status": 500,
 "errorMessage": "xxxxx"
}