Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleAPI to get meta data + datasets

Proposed response structure - to get meta + datasets.

Success Scenario - Status Code 200

Code Block
languagejson
{
    "id": "api.report.read",
    "ver": "string",
    "ts": "timestamp",
    "params": {
      "resmsgid": "string",
      "msgid": "string",
      "status": "success",
      "err": "string",
      "errmsg": "string"
    },
    "responseCode": "OK",
    "result": {
        "metadata": {... similar to above API},
        "datasets": {
            "dataset_one_example": {
                "isParameterized": true,
                "parameters": ["$state"],
                "data": {
                    "rj": {
                        "signedUrl": "url"
                    },
                    "tn": {
                        "signedUrl": "url"
                    }
                }
            },
            "dataset_two_example": {
                "isParameterized": false,
                "parameters": null,
                "data": {
                    "default": {
                        "signedUrl": "url"
                    }
                }
            }
        }
    }
}


Error Response

Unauthorized Access - Status Code 401

Code Block
{
    "id": "api.report.read",
    "ver": "v1",
    "ts": "timestamp",
    "params": {
        "resmsgid": null,
        "msgid": "string",
        "err": "UNAUTHORIZED_USER",
        "status": "UNAUTHORIZED_USER",
        "errmsg": "You are not authorized."
    },
    "responseCode": "UNAUTHORIZED",
    "result": {}
}


Internal Server Error - Status Code - 500

Code Block
{
  "id": "api.report.read",
  "ver": "v1",
  "ts": "timestamp",
  "params": {
    "resmsgid": null,
    "msgid": "string",
    "err": "string",
    "status": "SERVER_ERROR",
    "errmsg": "string"
  },
  "responseCode": "SERVER_ERROR",
  "result": {}
}


Invalid Report Id - Status Code 404

Code Block
{
  "id": "api.report.read",
  "ver": "1.0.0",
  "params": {
    "resmsgid": "string",
    "msgid": null,
    "status": "failed",
    "err": null,
    "errmsg": "no report found"
  },
  "responseCode": "string",
  "result": {}
}

...

Access Controls

  • Visibility : “public” | “private”

    visibility :

    • Type - string

    • Enum - [ Public, private ]

    • Description - Validates the visibility of the report whether it’s public or private

    • Enum - Public, private

  • authorizedRoles:

    • Type - [string] or string

    • Description - Roles authorized to read the report

  • tenant :

    • Type - [string] or string

    • Description - tenants authorized to read the report.

  • showOnDashboard:

    Boolean

Whether the report needs to be shown on the dashboard or not

Visibility - Public or Private

Authorized Roles - Report_ADMIN , REPORT_VIEWER, ORG_ADMIN or combinations.

Slug/Tenant based checks.

Access Control spec from questionset API - // TODO

Can the report be assessible via Admin Dashboard or not ?

...

    • Type - boolean

    • Default: true

    • Description - Whether to show the report on Portal Admin Dashboard or not.

...

Resources

...