Enterprise Risk Diagnostics API

Enterprise Risk Diagnostics API will holds Enterprise Risk Diagnostics data related to the users.

Service Description

The service-description will show following information for an API:

  • Gives the Python Version the API using

  • Gives the list of all installed Python packages

  • Gives the name of API

  • Gives all the available versions

  • Gives a list of middleware being used

  • Gives all available routes for each versions.

URL: /rdt/service-description

Method: GET

Example Response:

{
    "status_code": 200,
    "request_id": "c83bc540-2510-441b-881c-c053379d061c",
    "data": {
        "python_version": "3.6.8",
        "installed_packages": [
            "alabaster==0.7.12",
            "asn1crypto==0.24.0",
            ...
        ],
        "name": "user-data",
        "versions": [
            "v2",
            "v2"
        ],
        "middleware": [
            "RequestResponseMiddleware",
            "AuthenticationMiddleware",
            "ResponseGeneratorMiddleware"
        ],
        "routes": {
            "v2": {
                "preference": [
                    "delete",
                    "get",
                    "post",
                    "put"
                ],
                "user-preference": [
                    "delete",
                    "get",
                    "post",
                    "put"
                ],
                ...
            },
            "v2": {
                ...
            }
        }
    }
}

Client Risk Area Resource

GET Method

Client Risk Measure Resource

GET Method

POST Method

PUT Method

DELETE Method

Query Expression Resource

class v1.resources.query_expression.QueryExpressionResource

RDT Query Expression Resource

Note

Allowed Methods: GET / POST

GET Method

QueryExpressionResource.on_get(req, resp, gid: int = None)

Query Expression GET Method

Request

Response Object:

{
    "status_code": 200,
    "request_id": <Request UUID>,
    "data": [
        {
            "expression_gid": <Expression GID, Integer>,
            "expression": <Query Exp Text>
        },
        ...
    ]
}

POST Method

QueryExpressionResource.on_post(req, resp)

Query Expression POST Method

Request

Response Object:

{
    "status_code": 200,
    "request_id": <Request UUID>,
    "data": [
        {
            "expression_gid": <Expression GID, Integer>,
            "expression": <Query Exp Text>
        },
        ...
    ]
}

RANE Risk Area Resource

GET Method

POST Method

PUT Method

DELETE Method

RDT Topic Resource

class v1.resources.rdt_topic.RDTTopicResource

RANE RDT Topics Resource

Endpoint for managing Topics, Query Expressions

Note

Allowed Methods: GET / POST / DELETE

GET Method

RDTTopicResource.on_get(req, resp, risk_area_id: int = None)

RDT Topic GET Method

Request

Response Object:

{
    "status_code": 200,
    "request_id": <Request UUID>,
    "data": [
                {
                    "topic_gid": <topic_gid, Integer>,
                    "query_exps": [
                        {
                            "gid": <Query Exp GID, Integer>,
                            "text": <Query expression text, Text>,
                        },
                        ...
                    ],
                    "sources": [<list of source gids, Integer>],
                    "risk_areas": [<list of risk area ids, Integer>]
                },
                ...
            ]
}

POST Method

RDTTopicResource.on_post(req, resp, risk_area_id: int)

RDT Topic POST Method

add topics and query expressions to a risk area

Request

  • Method: POST

  • URL: https://stag.api.ranenetwork.com/rdt/v1/rdt-topic/<risk-area-id>

  • Request Object:

    [
         {
             "topic_gid": <topic_gid, Integer>,
             "query_exps": [
                     {
                         "gid": <Query Exp GID, Integer>,
                         "text": <Query expression text, Text>,
                     },
                     ...
                 ],
             "sources": [<list of source gids, Integer>]
         },
         ...
     ]
    

Response Object:

{
    "status_code": 200,
    "request_id": <Request UUID>,
    "data": [
                {
                    "topic_gid": <topic_gid, Integer>,
                    "query_exps": [
                        {
                            "gid": <Query Exp GID, Integer>,
                            "text": <Query expression text, Text>,
                        },
                        ...
                    ],
                    "sources": [<list of source gids, Integer>]
                },
                ...
            ]
    }
}

DELETE Method

RDTTopicResource.on_delete(req, resp, topic_gid: int = None)

RDT Topic Relationship Delete Method

Deletes all relationships for a given topic gid

Request

Response Object

{
    "status_code": 200,
    "request_id": <Request UUID>,
    "data": {}
}

RDT Events Resource

class v1.resources.event.EventsResource

GET Method

EventsResource.on_get(req, resp, risk_area_id: int = None)

RDT Event GET Method

Request

Response Object:

{
    "status_code": 200,
    "request_id": <Request UUID>,
    "data": [
        {
          "id" :                <Integer, Event ID>,
          "risk_area" :         <Integer, Risk Area ID>,
          "note" :              <Text, Note for event>,
          "event_date" :        <Timestamp, Event date>,
          "articles" :          <List, List of article gids related to event>
        }
        ...
    ]
}

POST Method

EventsResource.on_post(req, resp, risk_area_id: int = None)

RDT event POST Method

Request

  • Method: POST

  • URL 1: https://stag.api.ranenetwork.com/rdt/v1/event/<risk_area_id>

  • Request Object:

    {
        "note" :              <Text, Note for event>,
        "event_date" :        <Timestamp, Event date>,
        "articles" :          <List, List of article gids related to event>
    }
    

Response Object:

{
    "status_code": 200,
    "request_id": <Request UUID>,
    "data": [
        {
          "id" :                <Integer, Event ID>,
          "risk_area" :         <Integer, Risk Area ID>,
          "note" :              <Text, Note for event>,
          "event_date" :        <Timestamp, Event date>,
          "articles" :          <List, List of article gids related to event>
        }
        ...
    ]
}

Indices and tables