{
    "openapi":"3.0",
    "info":{
        "title":"REST API for Oracle Insurance Policy Administration - Archival and Retrieval",
        "description":"The Oracle Insurance Policy Administration REST API enables you to perform archival and retrieval actions.",
        "termsOfService":"https://www.oracle.com/legal/terms.html",
        "contact":{
            "url":"https://support.oracle.com"
        },
        "version":"2024.03.11",
        "x-summary":"The Oracle Insurance Policy Administration REST API enables you to perform archival and retrieval actions."
    },
    "paths":{
        "/ArchiveService/api/v1/archives/tasks":{
            "post":{
                "summary":"Initiates a task",
                "description":"This api will initiate a task on entity level activity data. The task name and action will reflect the nature of the task.",
                "requestBody":{
                    "content":{
                        "application/json":{
                            "schema":{
                                "$ref":"#/components/schemas/ArchivalRequest"
                            }
                        }
                    }
                },
                "responses":{
                    "201":{
                        "description":"Task submitted successfully and an entry got created in the system to complete the task.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "type":"object",
                                    "properties":{
                                        "archiveGUID":{
                                            "type":"string",
                                            "description":"ArchiveGUID of the process created in system.",
                                            "example":"5289446E-A8AB-4D7D-80F6-A81CE6335522"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags":[
                    "Resources"
                ],
                "x-internal-id":"ArchiveService-api-v1-archives-tasks-post",
                "x-filename-id":"archiveservice-api-v1-archives-tasks-post"
            }
        },
        "/ArchiveService/api/v1/archives/{archiveGUID}":{
            "get":{
                "summary":"Get archive process details by its archiveGUID",
                "parameters":[
                    {
                        "description":"archiveGUID of the process",
                        "in":"path",
                        "name":"archiveGUID",
                        "required":true,
                        "example":"5289446E-A8AB-4D7D-80F6-A81CE6335522",
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Successfully retrieved archival process details",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/ArchivalResponse"
                                }
                            }
                        }
                    },
                    "404":{
                        "description":"No archival process details found for the archiveGUID"
                    }
                },
                "tags":[
                    "Resources"
                ],
                "x-internal-id":"ArchiveService-api-v1-archives-{archiveGUID}-get",
                "x-filename-id":"archiveservice-api-v1-archives-archiveguid-get"
            }
        },
        "/ArchiveService/api/v1/archives/{archiveGUID}/batches":{
            "get":{
                "summary":"Get archive process batch details by its archiveGUID",
                "parameters":[
                    {
                        "in":"path",
                        "name":"archiveGUID",
                        "required":true,
                        "example":"5289446E-A8AB-4D7D-80F6-A81CE6335522",
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Successfull retrieved archival process batch details",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/BatchResponse"
                                }
                            }
                        }
                    },
                    "404":{
                        "description":"No archival process batch details found for the archiveGUID"
                    }
                },
                "tags":[
                    "Resources"
                ],
                "x-internal-id":"ArchiveService-api-v1-archives-{archiveGUID}-batches-get",
                "x-filename-id":"archiveservice-api-v1-archives-archiveguid-batches-get"
            }
        }
    },
    "components":{
        "securitySchemes":{
            "basicAuth":{
                "type":"http",
                "scheme":"basic"
            }
        },
        "schemas":{
            "ArchivalRequest":{
                "type":"object",
                "properties":{
                    "taskName":{
                        "type":"string",
                        "example":"Archival/Retrieval"
                    },
                    "entityType":{
                        "type":"string",
                        "example":"ACTIVITY"
                    },
                    "statusCodes":{
                        "type":"array",
                        "items":{
                            "type":"string"
                        }
                    },
                    "effectiveTo":{
                        "type":"string",
                        "example":"YYYY-MM-DD"
                    },
                    "batchSize":{
                        "type":"integer",
                        "example":100
                    },
                    "activityLevels":{
                        "type":"array",
                        "items":{
                            "type":"string"
                        }
                    },
                    "action":{
                        "type":"string",
                        "example":"Pause/Resume/Abort/DeletePendingfromSource"
                    },
                    "archiveGUID":{
                        "type":"string",
                        "example":"5289446E-A8AB-4D7D-80F6-A81CE6335522"
                    },
                    "policyNumbers":{
                        "type":"array",
                        "items":{
                            "type":"string"
                        }
                    },
                    "policyGuids":{
                        "type":"array",
                        "items":{
                            "type":"string"
                        }
                    },
                    "clientGuids":{
                        "type":"array",
                        "items":{
                            "type":"string"
                        }
                    }
                }
            },
            "ArchivalResponse":{
                "description":"Archival Response Schema",
                "type":"object",
                "properties":{
                    "archiveGUID":{
                        "example":"5289446E-A8AB-4D7D-80F6-A81CE6335522",
                        "type":"string"
                    },
                    "archiveName":{
                        "example":"ARCHIVE_20221103093710",
                        "type":"string"
                    },
                    "archiveStatus":{
                        "example":"COMPLETED",
                        "type":"string"
                    },
                    "archivedCount":{
                        "example":100,
                        "type":"integer"
                    },
                    "batchSize":{
                        "example":100,
                        "type":"integer"
                    },
                    "createdBy":{
                        "example":"user",
                        "type":"string"
                    },
                    "createdDate":{
                        "example":"2016-03-05",
                        "type":"string"
                    },
                    "endTime":{
                        "example":"2022-11-03T08:07:33.612Z",
                        "type":"string"
                    },
                    "expectedCount":{
                        "example":100,
                        "type":"integer"
                    },
                    "startTime":{
                        "example":"2022-10-27T05:58:50.621Z",
                        "type":"string"
                    },
                    "entityType":{
                        "example":"ACTIVITY",
                        "type":"string"
                    }
                }
            },
            "BatchResponse":{
                "description":"Archival Batch Response Schema",
                "type":"array",
                "items":{
                    "type":"object",
                    "properties":{
                        "archiveGUID":{
                            "example":"5289446E-A8AB-4D7D-80F6-A81CE6335522",
                            "type":"string"
                        },
                        "batchID":{
                            "example":100,
                            "type":"integer"
                        },
                        "batchStatus":{
                            "example":"COMPLETED",
                            "type":"string"
                        },
                        "createdDate":{
                            "example":"2016-03-05",
                            "type":"string"
                        },
                        "endTime":{
                            "example":"2022-11-03",
                            "type":"string"
                        },
                        "startTime":{
                            "example":"2022-11-03",
                            "type":"string"
                        },
                        "failedEntities":{
                            "type":"array",
                            "items":{
                                "$ref":"#/components/schemas/ArchivalBatchEntityResponse"
                            }
                        }
                    }
                }
            },
            "ArchivalBatchEntityResponse":{
                "description":"Archival Batch Entity Response Schema",
                "type":"array",
                "items":{
                    "type":"object",
                    "properties":{
                        "entityGuid":{
                            "type":"string",
                            "example":"E2AA95FE-67DA-49F4-8903-EA37D5405BB7"
                        },
                        "status":{
                            "type":"string",
                            "example":"COMPLETED"
                        }
                    }
                }
            }
        }
    },
    "tags":[
        {
            "name":"Resources",
            "description":"OIPA - Archival and Retrieval REST Resources"
        }
    ]
}