{
    "openapi":"3.0.1",
    "info":{
        "title":"REST API for GoldenGate Stream Analytics",
        "description":"REST API for GoldenGate Stream Analytics",
        "contact":{
            "email":"osa-dev-grp@oracle.com"
        },
        "license":{
            "name":"Oracle"
        },
        "version":"2026.02.11",
        "x-summary":"REST API for GoldenGate Stream Analytics"
    },
    "servers":[
        {
            "url":"https://{ggsa_host}:{ggsa_port}/{context_path}/",
            "description":"User Management Api.",
            "variables":{
                "ggsa_host":{
                    "description":"GGSA server",
                    "default":"localhost"
                },
                "ggsa_port":{
                    "description":"GGSA server port",
                    "default":"9080"
                },
                "context_path":{
                    "description":"GGSA server context path",
                    "default":"osa/admin"
                }
            }
        }
    ],
    "security":[
        {
            "basicAuth":[
            ]
        }
    ],
    "paths":{
        "/services/{version}/authorizations/{role}/{user}":{
            "get":{
                "tags":[
                    "User Management"
                ],
                "summary":"Retrieve User",
                "description":"Get Authorization User Resource information.",
                "operationId":"getUser",
                "parameters":[
                    {
                        "name":"version",
                        "in":"path",
                        "description":"GGSA API version",
                        "required":true,
                        "schema":{
                            "type":"string"
                        },
                        "example":"v1"
                    },
                    {
                        "name":"role",
                        "in":"path",
                        "required":true,
                        "schema":{
                            "type":"string"
                        }
                    },
                    {
                        "name":"user",
                        "in":"path",
                        "required":true,
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "responses":{
                    "default":{
                        "description":"The user",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/User"
                                }
                            }
                        }
                    },
                    "200":{
                        "description":"Successfully return Authorization User Resource information."
                    },
                    "404":{
                        "description":"User/Role not found"
                    }
                },
                "x-internal-id":"services-{version}-authorizations-{role}-{user}-get",
                "x-filename-id":"services-version-authorizations-role-user-get"
            },
            "post":{
                "tags":[
                    "User Management"
                ],
                "summary":"Create User",
                "description":"Create a new Authorization User Resource.",
                "operationId":"createUser",
                "parameters":[
                    {
                        "name":"version",
                        "in":"path",
                        "description":"GGSA API version",
                        "required":true,
                        "schema":{
                            "type":"string"
                        },
                        "example":"v1"
                    },
                    {
                        "name":"user",
                        "in":"path",
                        "description":"Username to be created",
                        "required":true,
                        "schema":{
                            "type":"string"
                        }
                    },
                    {
                        "name":"role",
                        "in":"path",
                        "description":"Role of the user",
                        "required":true,
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "requestBody":{
                    "description":"Oracle GGSA Service single User entry for credentials and info.",
                    "content":{
                        "*/*":{
                            "schema":{
                                "$ref":"#/components/schemas/User"
                            }
                        }
                    },
                    "required":true
                },
                "responses":{
                    "201":{
                        "description":"Successfully created an Authorization User Resource.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/User"
                                }
                            }
                        }
                    },
                    "400":{
                        "description":"User already exist"
                    },
                    "404":{
                        "description":"Role does not exist."
                    }
                },
                "x-internal-id":"services-{version}-authorizations-{role}-{user}-post",
                "x-filename-id":"services-version-authorizations-role-user-post"
            },
            "patch":{
                "tags":[
                    "User Management"
                ],
                "summary":"Update User",
                "description":"Update an existing Authorization User Resource.",
                "operationId":"updateUser",
                "parameters":[
                    {
                        "name":"version",
                        "in":"path",
                        "description":"GGSA API version",
                        "required":true,
                        "schema":{
                            "type":"string"
                        },
                        "example":"v1"
                    },
                    {
                        "name":"role",
                        "in":"path",
                        "description":"Role of the user",
                        "required":true,
                        "schema":{
                            "type":"string"
                        }
                    },
                    {
                        "name":"user",
                        "in":"path",
                        "description":"User to be updated",
                        "required":true,
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "requestBody":{
                    "description":"Oracle GoldenGate Service single User entry.",
                    "content":{
                        "*/*":{
                            "schema":{
                                "$ref":"#/components/schemas/User"
                            }
                        }
                    },
                    "required":true
                },
                "responses":{
                    "200":{
                        "description":"Successfully updated an existing Authorization User Resource.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/User"
                                }
                            }
                        }
                    },
                    "400":{
                        "description":"Invalid request"
                    },
                    "404":{
                        "description":"User/Role not found"
                    }
                },
                "x-internal-id":"services-{version}-authorizations-{role}-{user}-patch",
                "x-filename-id":"services-version-authorizations-role-user-patch"
            }
        },
        "/services/{version}/authorizations/{role}":{
            "get":{
                "tags":[
                    "User Management"
                ],
                "summary":"List Users",
                "description":"Get the collection of Authorized Users associated with the Authorization Role.",
                "operationId":"getUsers",
                "parameters":[
                    {
                        "name":"version",
                        "in":"path",
                        "description":"GGSA API version",
                        "required":true,
                        "schema":{
                            "type":"string"
                        },
                        "example":"v1"
                    },
                    {
                        "name":"role",
                        "in":"path",
                        "required":true,
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Successfully returned a collection Authorized Users Resources associated Authorization Role.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/User"
                                }
                            }
                        }
                    },
                    "404":{
                        "description":"Role does not exist."
                    }
                },
                "x-internal-id":"services-{version}-authorizations-{role}-get",
                "x-filename-id":"services-version-authorizations-role-get"
            }
        },
        "/services/{version}/artifacts/import":{
            "patch":{
                "tags":[
                    "Pipeline Management"
                ],
                "summary":"Import GGSA artifacts",
                "description":"Import GGSA artifacts from the bundle(archive).",
                "operationId":"importArtifacts",
                "parameters":[
                    {
                        "name":"version",
                        "in":"path",
                        "description":"GGSA API version",
                        "required":true,
                        "schema":{
                            "type":"string"
                        },
                        "example":"v1"
                    },
                    {
                        "name":"overwrite",
                        "in":"query",
                        "description":"if true, Overwrite the existing artifact with the new one matched in the bundle otherwise ignore all such artifact in the bundle.",
                        "schema":{
                            "type":"boolean"
                        },
                        "example":true
                    }
                ],
                "requestBody":{
                    "description":"GGSA Artifacts bundle",
                    "content":{
                        "multipart/form-data":{
                        }
                    },
                    "required":true
                },
                "responses":{
                    "200":{
                        "description":"Successfully imported the artifacts.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/Artifact"
                                }
                            }
                        }
                    },
                    "404":{
                        "description":"Entity not found."
                    },
                    "409":{
                        "description":"Incorrect state / conflict."
                    }
                },
                "x-internal-id":"services-{version}-artifacts-import-patch",
                "x-filename-id":"services-version-artifacts-import-patch"
            }
        },
        "/services/{version}/pipelines/{id}/export":{
            "get":{
                "tags":[
                    "Pipeline Management"
                ],
                "summary":"Export a GGSA pipeline",
                "description":"Export a GGSA pipeline along with other artifacts (e.g., connection, stream, target etc.) that the pipeline depends on as an archive (binary stream).",
                "operationId":"exportArtifact",
                "parameters":[
                    {
                        "name":"version",
                        "in":"path",
                        "description":"GGSA API version",
                        "required":true,
                        "schema":{
                            "type":"string"
                        },
                        "example":"v1"
                    },
                    {
                        "name":"id",
                        "in":"path",
                        "description":"Pipeline id",
                        "required":true,
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Successfully exported the pipeline.",
                        "content":{
                            "application/octet-stream":{
                            }
                        }
                    },
                    "404":{
                        "description":"Pipeline not found."
                    },
                    "409":{
                        "description":"Incorrect state / conflict."
                    }
                },
                "x-internal-id":"services-{version}-pipelines-{id}-export-get",
                "x-filename-id":"services-version-pipelines-id-export-get"
            }
        },
        "/services/{version}/pipelines":{
            "get":{
                "tags":[
                    "Pipeline Management"
                ],
                "summary":"List GGSA pipelines",
                "description":"list GGSA pipelines",
                "operationId":"listPipelines",
                "parameters":[
                    {
                        "name":"version",
                        "in":"path",
                        "description":"GGSA API version",
                        "required":true,
                        "schema":{
                            "type":"string"
                        },
                        "example":"v1"
                    },
                    {
                        "name":"state",
                        "in":"query",
                        "description":"filter out the pipelines based on its current state (e.g., published/unpublished)",
                        "schema":{
                            "type":"string"
                        },
                        "example":"published"
                    }
                ],
                "responses":{
                    "200":{
                        "description":"List of GGSA pipelines.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/PipelineDetail"
                                }
                            }
                        }
                    }
                },
                "x-internal-id":"services-{version}-pipelines-get",
                "x-filename-id":"services-version-pipelines-get"
            }
        },
        "/services/{version}/pipelines/{id}/publish":{
            "patch":{
                "tags":[
                    "Pipeline Management"
                ],
                "summary":"Publish a GGSA pipeline",
                "description":"Publish a GGSA pipeline",
                "operationId":"publish",
                "parameters":[
                    {
                        "name":"version",
                        "in":"path",
                        "description":"GGSA API version",
                        "required":true,
                        "schema":{
                            "type":"string"
                        },
                        "example":"v1"
                    },
                    {
                        "name":"id",
                        "in":"path",
                        "description":"Pipeline id",
                        "required":true,
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "requestBody":{
                    "description":"Runtime parameters for the Pipeline.",
                    "content":{
                        "application/json":{
                            "schema":{
                                "$ref":"#/components/schemas/PipelineConfig"
                            }
                        }
                    }
                },
                "responses":{
                    "200":{
                        "description":"Successfully published the pipeline.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/PipelineDetail"
                                }
                            }
                        }
                    },
                    "404":{
                        "description":"pipeline id not found."
                    },
                    "409":{
                        "description":"Incorrect state / conflict."
                    }
                },
                "x-internal-id":"services-{version}-pipelines-{id}-publish-patch",
                "x-filename-id":"services-version-pipelines-id-publish-patch"
            }
        },
        "/services/{version}/pipelines/{id}/unpublish":{
            "patch":{
                "tags":[
                    "Pipeline Management"
                ],
                "summary":"Unpublish a GGSA pipeline",
                "description":"Unpublish a GGSA pipeline",
                "operationId":"unpublish",
                "parameters":[
                    {
                        "name":"version",
                        "in":"path",
                        "description":"GGSA API version",
                        "required":true,
                        "schema":{
                            "type":"string"
                        },
                        "example":"v1"
                    },
                    {
                        "name":"id",
                        "in":"path",
                        "description":"Pipeline id",
                        "required":true,
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Successfully unpublished the pipeline.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/PipelineDetail"
                                }
                            }
                        }
                    },
                    "404":{
                        "description":"pipeline id not found"
                    },
                    "409":{
                        "description":"Incorrect state / conflict."
                    }
                },
                "x-internal-id":"services-{version}-pipelines-{id}-unpublish-patch",
                "x-filename-id":"services-version-pipelines-id-unpublish-patch"
            }
        }
    },
    "components":{
        "schemas":{
            "User":{
                "type":"object",
                "properties":{
                    "id":{
                        "type":"integer",
                        "format":"int64"
                    },
                    "user":{
                        "type":"string"
                    },
                    "credential":{
                        "type":"string"
                    },
                    "info":{
                        "type":"string"
                    },
                    "type":{
                        "type":"string"
                    }
                },
                "xml":{
                    "name":"User"
                }
            },
            "Artifact":{
                "type":"object",
                "properties":{
                    "id":{
                        "type":"string",
                        "description":"GGSA Artifact ID."
                    },
                    "name":{
                        "type":"string",
                        "description":"GGSA Artifact Name."
                    },
                    "description":{
                        "type":"string",
                        "description":"GGSA Artifact Description."
                    },
                    "type":{
                        "type":"string",
                        "description":"GGSA Artifact Type."
                    },
                    "createdBy":{
                        "type":"string",
                        "description":"Author of the GGSA Artifact."
                    },
                    "createdAt":{
                        "type":"string",
                        "description":"Creation time of GGSA Artifact.",
                        "format":"date-time"
                    },
                    "tagNames":{
                        "uniqueItems":true,
                        "type":"array",
                        "description":"List of tags defined for the GGSA Artifact.",
                        "items":{
                            "type":"string",
                            "description":"List of tags defined for the GGSA Artifact.",
                            "xml":{
                                "name":"tagNames"
                            }
                        }
                    }
                },
                "xml":{
                    "name":"Artifact"
                }
            },
            "PipelineDetail":{
                "type":"object",
                "properties":{
                    "id":{
                        "type":"string",
                        "description":"GGSA Pipeline ID."
                    },
                    "name":{
                        "type":"string",
                        "description":"GGSA Pipeline Name."
                    },
                    "displayName":{
                        "type":"string",
                        "description":"GGSA Pipeline Display Name."
                    },
                    "description":{
                        "type":"string",
                        "description":"GGSA Pipeline Description."
                    },
                    "tagNames":{
                        "type":"array",
                        "description":"List of tags defined for the GGSA Pipeline.",
                        "xml":{
                            "name":"tagnames"
                        },
                        "items":{
                            "type":"string",
                            "description":"List of tags defined for the GGSA Pipeline.",
                            "xml":{
                                "name":"tagnames"
                            }
                        }
                    },
                    "createdBy":{
                        "type":"string",
                        "description":"Author of the GGSA Pipeline."
                    },
                    "createdAt":{
                        "type":"string",
                        "description":"Creation time of GGSA Pipeline.",
                        "format":"date-time"
                    },
                    "published":{
                        "type":"boolean",
                        "description":"GGSA Pipeline Publish Flag."
                    }
                },
                "xml":{
                    "name":"PipelineDetail"
                }
            },
            "PipelineConfig":{
                "type":"object",
                "properties":{
                    "batchDuration":{
                        "type":"integer",
                        "description":"Batch duration (millisecond) of streaming job for the pipeline.",
                        "format":"int64",
                        "default":1000
                    },
                    "logLevel":{
                        "type":"string",
                        "description":"Logging level for pipeline execution logs.",
                        "enum":[
                            "Debug, Info, Warning, Error"
                        ],
                        "default":"Info"
                    },
                    "executorInstance":{
                        "minimum":1,
                        "type":"integer",
                        "description":"The number of executors for the pipeline execution.",
                        "format":"int32"
                    },
                    "exectorCores":{
                        "minimum":2,
                        "type":"integer",
                        "description":"The number of cores per executor for the pipeline execution.",
                        "format":"int32",
                        "default":2
                    },
                    "executorMemory":{
                        "minimum":800,
                        "type":"integer",
                        "description":"Memory per executor instance for the pipeline execution.",
                        "format":"int64",
                        "default":1500
                    },
                    "driverCores":{
                        "minimum":1,
                        "type":"integer",
                        "description":"The number of cores per driver for the pipeline execution.",
                        "format":"int32",
                        "default":1
                    },
                    "driverMemory":{
                        "minimum":800,
                        "type":"integer",
                        "description":"Memory per driver instance for the pipeline execution.",
                        "format":"int64",
                        "default":1800
                    },
                    "enableCheckPointing":{
                        "type":"boolean",
                        "description":"Turns HA on/off for the pipeline."
                    },
                    "enableIntermediateTopic":{
                        "type":"boolean",
                        "description":"Pipeline Intermediate Topic Setting."
                    },
                    "intermediateTopicRetentionPeriod":{
                        "type":"integer",
                        "description":"The Pipeline Topic Retention Period (in milliseconds).",
                        "format":"int64",
                        "default":3600000
                    },
                    "topicOffset":{
                        "type":"string",
                        "description":"Topic Offset Position.",
                        "enum":[
                            "latest, earliest"
                        ],
                        "default":"latest"
                    },
                    "resetOffset":{
                        "type":"boolean",
                        "description":"Input topics offset hard reset value.",
                        "default":false
                    }
                },
                "xml":{
                    "name":"PipelineConfig"
                }
            }
        },
        "securitySchemes":{
            "basicAuth":{
                "type":"http",
                "scheme":"basic"
            }
        }
    },
    "tags":[
        {
            "name":"Pipeline Management",
            "description":"Pipeline Management - Export, Import, List, Publish, Unpublish"
        },
        {
            "name":"User Management",
            "description":"User Management - Create, List, Retrieve, Update"
        }
    ]
}