Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 2.09 KB

DEVELOPER.rst

File metadata and controls

50 lines (39 loc) · 2.09 KB

Development using fourinsight.api

It may be helpful to redirect the API calls to a development backend during development. This can be achieved by reconfiguring the API parameters on run-time:

import fourinsight.api as fapi

fapi.authenticate._CONSTANTS = {
    "API_BASE_URL": "https://api.4insight.io/",
    "USER_CLIENT_ID": "b6c8c4d4-5fc1-4bba-b46c-8f6a6cc9843d",
    "USER_CLIENT_SECRET": "H_McZ-g.56~SS1d4SxCcSUTp~0Sv3AVERk",
    "USER_AUTHORITY_URL": "https://4insight.io/auth",
    "CLIENT_TOKEN_URL": "https://login.microsoftonline.com/4subseaid.onmicrosoft.com/oauth2/v2.0/token",
    "CLIENT_SCOPE": ["https://4subseaid.onmicrosoft.com/4insight-api-prod/.default"]
}

session = fapi.UserSession()

The parameters for different development environments are listed below:

Local development

Test

QA