Get the OpenAPI Specification of a Decision Service
get
/decision/api/v1/applications/{appId}/versions/{versionId}/decision-services/{serviceName}/openapi
Retreives the OpenAPI specification for executing the decision service. The API returns status 404 Not found response if the decision service is not found or if the application version is not activated.
Request
Path Parameters
-
appId(required): string
Name of the application
-
serviceName(required): string
Name of decision service
-
versionId(required): string
Application version identifier
Query Parameters
-
authMethod: string
For internal use - Display basic authentication in swaggerDefault Value:
bearer
Allowed Values:[ "basic", "bearer" ]
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
- text/plain
200 Response
Successful operation
Root Schema : schema
Type:
string
400 Response
Bad request
401 Response
Unauthorized
404 Response
Resource not found
500 Response
Internal error
Examples
Example: Get openAPI schema of a decision service of Invoicing application
The following example shows how to get openAPI schema of a decision service of an application by submitting a GET request on the REST resource using cURL. For more information about cURL, see cURL Access. For more information about endpoint URL structure, see Send Requests.
curl -X 'GET' \
'https://oracle.com/decision/api/v1/applications/Invoicing/versions/X/decision-services/DecisionServiceName/openapi?authMethod=bearer'
\ -H 'accept: text/plain'
Example of 200 Operation Successful Response
{
"openapi": "3.0.1",
"info": {
"title": "API to invoke Routing of LoanOriginationApplication",
"description": "This is the the OpenAPI specification for invoking decision service Routing of of LoanOriginationApplication application version 1.0",
"version": "1.0"
},
"externalDocs": {
"description": "Find out more about Oracle Process Automation Decision Modeling",
"url": "https://docs.oracle.com/en/cloud/paas/process-automation/user-process-automation/model-decisions.html"
},
"servers": [
{
"url": "http://1.9.3.1/decision/api/v1"
}
],
"security": [
{
"bearerAuth": []
}
],
"paths": {
"/decision-models/LoanOriginationApplication/versions/1.0/active/definition/decision-services/Routing": {
"post": {
"tags": [
"decision-service-execution"
],
"summary": "Invoke a decision service",
"description": "Invokes an activated decision service. The request body should contain a json object that complies with the requestBody schema. The response body returns a json object which contains the interpretation of output and any problems encountered.",
"operationId": "callDecisionService",
"parameters": [],
"requestBody": {
"description": "Request payload",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestPayload"
}
}
}
},
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponsePayload"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorMessage"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorMessage"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorMessage"
}
}
}
},
"500": {
"description": "Internal error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorMessage"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"RequestPayload": {
"type": "object",
"properties": {
"ApplicantData": {
"$ref": "#/components/schemas/ud_ApplicantInfo"
},
"Product": {
"$ref": "#/components/schemas/ud_Product"
},
"BureauData": {
"$ref": "#/components/schemas/ud_BureauData"
}
}
},
"ResponsePayload": {
"type": "object",
"properties": {
"interpretation": {
"type": "object",
"properties": {
"Routing": {
"type": "string",
"enum": [
"Decline",
"Refer",
"Accept"
]
},
"PostBureauRiskCategory": {
"type": "string",
"enum": [
"Decline",
"High",
"Medium",
"Low",
"Very Low"
]
},
"PostBureauAffordability": {
"type": "boolean",
"enum": [
true,
false
]
}
}
},
"problems": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"severity": {
"type": "string",
"enum": [
"Error",
"Warning"
]
},
"path": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"ErrorMessage": {
"title": "ErrorMessage",
"type": "object",
"properties": {
"errorCode": {
"type": "string"
},
"status": {
"type": "integer"
},
"message": {
"type": "string"
},
"details": {
"type": "string"
},
"cause": {
"type": "string"
},
"opcRequestId": {
"type": "string"
}
},
"description": "Defines ErrorMessage"
},
"ud_ApplicantInfo": {
"title": "ApplicantInfo",
"type": "object",
"properties": {
"MonthlyFinancialData": {
"$ref": "#/components/schemas/ud_MonthlyFinancialData"
},
"Age": {
"maximum": 120,
"minimum": 18,
"type": "number"
},
"MaritalStatus": {
"type": "string",
"enum": [
"S",
"M"
]
},
"EmploymentStatus": {
"type": "string",
"enum": [
"Employed",
"Student",
"Unemployed",
"Self-employed"
]
},
"ExistingCustomer": {
"type": "boolean"
}
}
},
"ud_MonthlyFinancialData": {
"title": "MonthlyFinancialData",
"type": "object",
"properties": {
"Income": {
"type": "number"
},
"Repayments": {
"type": "number"
},
"Expense": {
"type": "number"
}
}
},
"ud_BureauData": {
"title": "BureauData",
"type": "object",
"properties": {
"Bankrupt": {
"type": "boolean"
},
"CreditScore": {
"type": "number"
}
}
},
"ud_Product": {
"title": "Product",
"type": "object",
"properties": {
"Type": {
"type": "string",
"enum": [
"Standard Loan",
"Special Loan"
]
},
"Rate": {
"type": "number"
},
"Term": {
"type": "number"
},
"Amount": {
"type": "number"
}
}
}
},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
}
}
Example Format of Bad Request Response
{
"errorCode": "string",
"status": 0,
"message": "string",
"details": "string",
"cause": "string",
"opcRequestId": "string"
}