- Python 3.10 or higher
- Requirements need to be installed
pip install -r requirements.txt
python ess-demo.py [ options ]
This script showcases the IRS ESS top-down investigation use-case.
The demo consists of four steps:
- Request all digital twins of the provided Digital Twin Registry for the requested company.
- Filter these Twins for the lifecycle asPlanned and collect their BPN and globalAssetId
- Start an ESS Batch investigation with these twins
- Wait for completion and print the result of the investigation
searchBPN: BPNL00ARBITRARY4
incidentBPNS: BPNS00ARBITRARY6
searchBPN: BPNL00ARBITRARY4
incidentBPNS: BPNS00ARBITRARY8
searchBPN: BPNL00ARBITRARY8
incidentBPNS: BPNS0ARBITRARY10
searchBPN: BPNL00ARBITRARY8
incidentBPNS: BPNS0ARBITRARY12
python ess-demo.py \
--aas "https://registry.example/api/v3.0/shell-descriptors" \
--ownBPN "BPNL0000000XYZ00" \
--searchBPN "BPNL0000000XYZ11" \
--incidentBPNS "BPNS0000000XYZ22" "BPNS0000000XYZ33" \
--irs "https://irs.example" \
--tokenurl "https://oauth2.example/auth/EXAMPLE/openid-connect/token" \
--clientid "exampleuser" \
--clientsecret "examplepass"
IRS is secured by OAuth2. This requires the user of this demo script to provide the token URL of the OAuth2 provider which is used by the IRS as well as a valid clientId and clientSecret.
For more information regarding IRS authentication, see: Safety and security concepts
Parameter | Example | Description |
---|---|---|
-h, --help | show help message | |
--aas | https://registry.example/api/v3.0/shell-descriptors | AAS registry URL |
--ownBPN | BPNL0000000XYZ00 | BPN of the requesting Company |
--searchBPN | BPNL0000000XYZ11 | BPN of the Company to search for |
--incidentBPNS | BPNS0000000XYZ22 BPNS0000000XYZ33 | List of BPNS of the Companies where the incidents occurred |
--irs | https://irs.example | IRS base URL |
--tokenurl | https://oauth2.example/auth/EXAMPLE/openid-connect/token | OAuth2 token URL |
--clientid | exampleuser | Client ID |
--clientsecret | examplepass | Client Secret |
--batchsize | 10 | The batch size for a ESS investigation. Must be mod 10. Default 10 |
--debug | debug logging (optional) |