Skip to content

[ISSSUE] Standardize Response Format for Both POST and GET Calls #4

Closed
@muhammad-ali-e

Description

@muhammad-ali-e

The current response format varies between POST and GET calls. In one response, the data is returned under the message key, while in another, it is under the execution_result key.

{
    "pending": false,
    "execution_status": "COMPLETED",
    "status_code": 200,
    "message": [
        {
            "file": "Qualys_Quotation_Renewal_04-30-2024.pdf",
            "status": "Success",
            "result": {},
            "metadata": {}
        }
    ]
}
{
    "pending": false,
    "execution_status": "COMPLETED",
    "error": null,
    "extraction_result": [
        {
            "file": "Dup_Qualys_Quotation_Renewal_04-30-2024.pdf",
            "status": "Success",
            "result": {},
            "metadata": {}
        }
    ],
    "status_code": 200
}

Requirements

  • Standardize the response structure for both POST and GET calls to ensure consistent key names.
  • Decide on a single key (e.g., execution_result) for returning data and ensure both response types follow this format.
  • Update the check_execution_status function to return the standardized response structure.

Metadata

Metadata

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions