Skip to content

Commit ddc7641

Browse files
committed
Fix bug steps names
Fix issue requirements.txt on non-Windows
1 parent eb1f83c commit ddc7641

23 files changed

Lines changed: 88 additions & 84 deletions

‎.gitignore‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ ipython_config.py
1313
*.jsonl.gz
1414
*.jsonl
1515
*.zip
16-
EsgPIT*
16+
EsgPIT*
17+
18+
RDP-Generic-CFS-Env.ipynb
19+
CFS/

‎Article.md‎

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# A Generic and Step By Step Workflow for RDP Client File Store (CFS) Bulk File API
1+
# A Generic and Step By Step Workflow for RDP Client File Store (CFS) File API
22

33
## <a id="intro"></a>Introduction
44

55
The Client File Store (CFS) is a capability of Refinitiv Data Platform (RDP) that provides authorization and enables access to content files stored in publisher repositories. LSEG provides various content file domains (aka *bucket*) for consumers such as:
6-
- Bulk ESG data
6+
- CFS ESG data
77
- Green Revenue data
88
- Symbology data
99
- Tick History
@@ -77,9 +77,9 @@ Please find more detail on the [CFS API User Guide](https://developers.lseg.com/
7777

7878
Before I am going further, there is some prerequisite, dependencies, and libraries that the project is needed.
7979

80-
### Access to the RDP with the your desire Bulk file permission
80+
### Access to the RDP with the your desire CFS file permission
8181

82-
This project uses RDP access credentials with the CFS Bulk file permission.
82+
This project uses RDP access credentials with the CFS file permission.
8383

8484
Please contact your LSEG representative to help you with the RDP account and the bucket permission.
8585

@@ -187,7 +187,7 @@ The application then creates a request message in a JSON message format or URL q
187187

188188
### Step 2: Listing the packageIds using the Bucket Name
189189

190-
Now let me move on to the CFS APIs call. To request the CFS Bulk data, the first step is to send an HTTP ```GET``` request to the RDP ```/file-store/v1/packages?bucketName={bucket-name}``` endpoint to list all Package Ids under the input ```bucket-name```.
190+
Now let me move on to the CFS APIs call. To request the CFS data, the first step is to send an HTTP ```GET``` request to the RDP ```/file-store/v1/packages?bucketName={bucket-name}``` endpoint to list all Package Ids under the input ```bucket-name```.
191191

192192
The HTTP Request structure is as follows:
193193

@@ -473,7 +473,7 @@ Then you can continue to send requests to URL in ```@nextLink``` node to get the
473473

474474
Let’s leave the paging feature there.
475475

476-
### Step 4: Get the Bulk file URL on AWS S3
476+
### Step 4: Get the file URL on AWS S3
477477

478478
Now let me turn to getting the file URL on Amazon AWS S3 service with the RDP ```/file-store/v1/files/{file ID}/stream``` endpoint.
479479

@@ -556,9 +556,9 @@ Receive File Successfully
556556
Bulk-ESG-Global-Symbology-Organization-v1-Init-2023-11-26T16_04_11.525Z.jsonl.gz Saved
557557
```
558558

559-
Now you get the CFS Bulk file that you can extract and read the file.
559+
Now you get the CFS file that you can extract and read the file.
560560

561-
That covers how to download the CFS Bulk file via the RDP APIs.
561+
That covers how to download the CFS file via the RDP APIs.
562562

563563
### Step 6: Refresh Token with RDP APIs
564564

@@ -671,7 +671,7 @@ if response.status_code != 200:
671671
print(f'RDP authentication failure: {response.status_code} {response.reason}')
672672
print(f'Text: {response.text}')
673673
```
674-
That’s all I have to say about the CFS Bulk API workflow.
674+
That’s all I have to say about the CFS API workflow.
675675

676676
## <a id="how_to_run"></a>How to run the demo application
677677

@@ -702,19 +702,19 @@ The first step is to unzip or download the example project folder into a directo
702702
``` bash
703703
(CFS) $>jupyter lab
704704
```
705-
6. Open a **RDP-Generic-BULK.ipynb** file and run each cell to learn the RDP CFS Bulk File workflow step by step.
705+
6. Open a **RDP-Generic-CFS.ipynb** file and run each cell to learn the RDP CFS File workflow step by step.
706706

707707
![figure-2](images/notebook_file.png "Notebook file")
708708

709709
That completes how to run an example Jupyter Lab notebook application.
710710

711-
### <a id="how_to_run_postman"></a>Run the Postman LSEG CFS Bulk API Workspace
711+
### <a id="how_to_run_postman"></a>Run the Postman LSEG CFS API Workspace
712712

713-
Now let me turn to the Postman collection. The [RDP CFS Bulk Postman Workspace](https://www.postman.com/winter-water-515088/workspace/lseg-cfs-bulk-api-workspace) is a public workspace in Postman that demonstrates how to use CFS API. It contains the following collection and environment:
714-
- **RDP CFS Bulk API Collection**: This collection contain all HTTP requests with the RDP CFS Bulk file API. The requests are in ordered from Step 1 to Step 5.
715-
- **RDP CFS Bulk API Environment**: This environment contains all parameters consumers need for requesting data with the requests in RDP CFS Bulk API Collection (including the credential).
713+
Now let me turn to the Postman collection. The [RDP CFS API Postman Workspace](https://www.postman.com/winter-water-515088/workspace/lseg-cfs-api-workspace) is a public workspace in Postman that demonstrates how to use CFS API. It contains the following collection and environment:
714+
- **RDP CFS API Collection**: This collection contain all HTTP requests with the RDP CFS file API. The requests are in ordered from Step 1 to Step 5.
715+
- **RDP CFS API Environment**: This environment contains all parameters consumers need for requesting data with the requests in RDP CFS API Collection (including the credential).
716716

717-
Users can fork these Postman items to their own workspaces. Please follow these five steps to fork the RDP CFS Bulk Postman Workspace to a Postman workspace.
717+
Users can fork these Postman items to their own workspaces. Please follow these five steps to fork the RDP CFS Postman Workspace to a Postman workspace.
718718

719719
#### 1. Create a new Postman workspace
720720

@@ -734,27 +734,27 @@ The new workspace will appear on the list.
734734

735735
![figure-6](images/postman4.png "create a personal workspace success")
736736

737-
#### 2. Open the LSEG CFS Bulk API Workspace
737+
#### 2. Open the LSEG CFS API Workspace
738738

739-
The [LSEG CFS Bulk API Workspace](https://www.postman.com/winter-water-515088/workspace/lseg-cfs-bulk-api-workspace) is in the public workspace so you can search it in Postman by clicking on “Search Postman”.
739+
The [LSEG CFS API Workspace](https://www.postman.com/winter-water-515088/workspace/lseg-cfs-api-workspace) is in the public workspace so you can search it in Postman by clicking on “Search Postman”.
740740

741741
![figure-7](images/postman6.png "search public workspace")
742742

743-
And then, enter “LSEG CFS Bulk API”.
743+
And then, enter “LSEG CFS API”.
744744

745-
![figure-8](images/postman7.png "search for LSEG CFS Bulk API")
745+
![figure-8](images/postman7.png "search for LSEG CFS API")
746746

747-
Click on the LSEG CFS Bulk API to open the workspace.
747+
Click on the LSEG CFS API to open the workspace.
748748

749749
![figure-9](images/postman8.png)
750750

751-
This LSEG CFS Bulk API workspace will be added to the workspace list.
751+
This LSEG CFS API workspace will be added to the workspace list.
752752

753753
![figure-10](images/postman9.png)
754754

755-
#### 3. Fork the RDP CFS Bulk API Collection
755+
#### 3. Fork the RDP CFS API Collection
756756

757-
Select the LSEG CFS Bulk API workspace from the workspace list, and then select “...” menu of the RDP CFS Bulk API collection and choose the "Create a fork" command to fork this collection.
757+
Select the LSEG CFS API workspace from the workspace list, and then select “...” menu of the RDP CFS API collection and choose the "Create a fork" command to fork this collection.
758758

759759
![figure-11](images/postman10.png "fork collection")
760760

@@ -768,7 +768,7 @@ The forked collection will be created in the selected workspace.
768768

769769
#### 4. Fork the Environment
770770

771-
Select the LSEG CFS Bulk API workspace from the workspace list, and then select “...” menu of the RDP CFS Bulk Environment and choose the "Create a fork" command to fork this environment.
771+
Select the LSEG CFS API workspace from the workspace list, and then select “...” menu of the RDP CFS Environment and choose the "Create a fork" command to fork this environment.
772772

773773
![figure-14](images/postman12.png "fork environment")
774774

@@ -782,7 +782,7 @@ The forked environment will be created in the selected workspace. Input the ```U
782782

783783
#### 5. Running Postman Collection
784784

785-
The first step is run the "Step 1" Get Access Token using Password Grant (Machine ID)" request, please make sure that the environment on the top right corner is pointed to the RDP CFS Bulk Environment.
785+
The first step is run the "Step 1" Get Access Token using Password Grant (Machine ID)" request, please make sure that the environment on the top right corner is pointed to the RDP CFS Environment.
786786
787787
![figure-17](images/postman15.png)
788788
@@ -810,14 +810,14 @@ That covers how to run an example Postman collection.
810810
811811
## Next Steps
812812
813-
That brings me to the end of this CFS Bulk API workflow project. The CFS Bulk API is a powerful API that allows developers to download the content file dynamically via a straightforward sequence of HTTP RESTful API calls. The demonstration code is written in Python but the concept of the API calls steps are the same for other programming languages.
813+
That brings me to the end of this CFS API workflow project. The CFS API is a powerful API that allows developers to download the content file dynamically via a straightforward sequence of HTTP RESTful API calls. The demonstration code is written in Python but the concept of the API calls steps are the same for other programming languages.
814814
815815
At the same time, the [Refinitiv Data Platform (RDP) APIs](https://developers.lseg.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-apis) provide various LSEG data and content for developers via an easy-to-use Web-based API. The APIs are easy to integrate into any application and platform that supports the HTTP protocol and JSON message format.
816816
817817
You may interested in the following resources for more detail about the CFS data usage:
818818
- [Find environmental footprint of your bond portfolio](https://developers.lseg.com/en/article-catalog/article/Environmental_footprint_of_bond_portfolio) article
819-
- [RDP APIs Green Revenues CFS Bulk file Workflow](https://github.com/LSEG-API-Samples/Example.RDP.Python.GreenRevenuesBulk) - a dedicate Green Revenue CFS workflow
820-
- [RDP APIs ESG CFS Bulk file Workflow](https://github.com/LSEG-API-Samples/Example.RDP.Python.ESG.PointinTimeBulk) - a dedicate ESG CFS workflow
819+
- [RDP APIs Green Revenues CFS file Workflow](https://github.com/LSEG-API-Samples/Example.RDP.Python.GreenRevenuesBulk) - a dedicate Green Revenue CFS workflow
820+
- [RDP APIs ESG CFS file Workflow](https://github.com/LSEG-API-Samples/Example.RDP.Python.ESG.PointinTimeBulk) - a dedicate ESG CFS workflow
821821
822822
And much more on the [Developer Portal](https://developers.lseg.com/en) website.
823823

‎RDP-Generic-BULK.pdf‎

-8.81 MB
Binary file not shown.
Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "60fc28e4-33fb-4d20-a776-eeaad231e71a",
66
"metadata": {},
77
"source": [
8-
"# RDP Generic CFS Bulk File Workflow"
8+
"# RDP Generic CFS File Workflow"
99
]
1010
},
1111
{
@@ -26,9 +26,7 @@
2626
"import os\n",
2727
"import sys\n",
2828
"import requests \n",
29-
"import json\n",
30-
"from dotenv import dotenv_values\n",
31-
"config = dotenv_values(\".env\")"
29+
"import json"
3230
]
3331
},
3432
{
@@ -48,9 +46,9 @@
4846
},
4947
"outputs": [],
5048
"source": [
51-
"username = config['RDP_USERNAME'] #Or replace with your RDP Machine-ID\n",
52-
"password = config['RDP_PASSWORD'] #Or replace with your RDP Password\n",
53-
"clientId = config['RDP_APP_KEY'] #Or replace with your RDP APP Key\n",
49+
"username = 'your RDP Machine-ID'\n",
50+
"password = 'your RDP Password'\n",
51+
"clientId = 'your RDP APP Key'\n",
5452
"\n",
5553
"RDP_HOST= 'https://api.refinitiv.com'\n",
5654
"acccess_token = None\n",
@@ -171,11 +169,11 @@
171169
"id": "b416cad4-62de-43b6-aa83-a87788810347",
172170
"metadata": {},
173171
"source": [
174-
"## <a id=\"rdp_bulk_data\"></a>Requesting Bulk Data\n",
172+
"## <a id=\"rdp_cfs_data\"></a>Requesting CFS Data\n",
175173
"\n",
176174
"### Step 2: Listing the Package Ids using the Bucket Name\n",
177175
"\n",
178-
"To request the CFS Bulk data, the first step is to send an HTTP ```GET``` request to the RDP ```/file-store/v1/packages?bucketName={bucket-name}``` endpoint to list all Package Ids under the input ```bucket-name```.\n",
176+
"To request the CFS data, the first step is to send an HTTP ```GET``` request to the RDP ```/file-store/v1/packages?bucketName={bucket-name}``` endpoint to list all Package Ids under the input ```bucket-name```.\n",
179177
"\n",
180178
"The HTTP Request structure is as follows:\n",
181179
"\n",
@@ -454,7 +452,7 @@
454452
"id": "4d14e355-e213-47ca-a6f4-956bb4c9de0d",
455453
"metadata": {},
456454
"source": [
457-
"### Step 3.5: Listing the FileSets using the Bucket Name - Paging\n",
455+
"# Step 3.1: Listing the FileSets using the Bucket Name - Paging\n",
458456
"\n",
459457
"By default, the ```/file-store/v1/file-sets``` endpoint always returns 25 results per request. You can adjust the number of return results via the ```pageSize``` query parameter, the maximum number is **100**.\n",
460458
"\n",
@@ -571,6 +569,8 @@
571569
"source": [
572570
"Based on the response data above, you see the API returns **2 entries** per request as set via ```pageSize=2``` parameter. \n",
573571
"\n",
572+
"# Step 3.2: Listing the FileSets using the Bucket Name - nextLink\n",
573+
"\n",
574574
"The ```@nextLink``` node contains the URL for requesting the next page of query as follows:\n",
575575
"\n",
576576
"```HTTP\n",
@@ -589,6 +589,7 @@
589589
"metadata": {},
590590
"outputs": [],
591591
"source": [
592+
"# Step 3.2: Listing the FileSets using the Bucket Name - nextLink\n",
592593
"if '@nextLink' in response.json():\n",
593594
" next_link = response.json()['@nextLink']\n",
594595
" #step 3.5 - list Package IDs from bucket name - with pageSize 2 - navigate to next link\n",
@@ -681,9 +682,9 @@
681682
"source": [
682683
"Then you can continue to send requests to URL in ```@nextLink``` node to get the next page results.\n",
683684
"\n",
684-
"**Note**: The ```/file-store/v1/packages?bucketName={bucket-name}``` endpoint on the **step 2** above also supports the Paging feature with the same ```pageSize``` query parameter and ```@nextLink``` node.\n",
685+
"**Note**: The ```/file-store/v1/packages?bucketName={bucket-name}``` endpoint on the **step 2** above also supports the Paging feature with the same ```pageSize``` query parameter and ```@nextLink``` node too.\n",
685686
"\n",
686-
"### Step 4: Get the Bulk file URL on AWS S3\n",
687+
"### Step 4: Get the file URL on AWS S3\n",
687688
"\n",
688689
"The next step is getting the file URL on Amazon AWS S3 service with the RDP ```/file-store/v1/files/{file ID}/stream``` endpoint.\n",
689690
"\n",
@@ -819,9 +820,9 @@
819820
"id": "8bbc63cd-7399-4be5-80db-4df57dd88901",
820821
"metadata": {},
821822
"source": [
822-
"Now you get the CFS Bulk file that you can extract and read the file.\n",
823+
"Now you get the CFS file that you can extract and read the file.\n",
823824
"\n",
824-
"That is all for the RDP CFS Bulk File workflow."
825+
"That is all for the RDP CFS File workflow."
825826
]
826827
},
827828
{
@@ -980,7 +981,7 @@
980981
"id": "710b7155-4e15-4ec6-a0a7-abb088477823",
981982
"metadata": {},
982983
"source": [
983-
"That’s all I have to say about the CFS Bulk API workflow."
984+
"That’s all I have to say about the CFS API workflow."
984985
]
985986
},
986987
{
@@ -994,8 +995,8 @@
994995
"\n",
995996
"You may interested in the following resources for more detail about the CFS data usage:\n",
996997
"- [Find environmental footprint of your bond portfolio](https://developers.lseg.com/en/article-catalog/article/Environmental_footprint_of_bond_portfolio) article\n",
997-
"- [RDP APIs Green Revenues CFS Bulk file Workflow](https://github.com/LSEG-API-Samples/Example.RDP.Python.GreenRevenuesBulk) - a dedicate Green Revenue CFS workflow\n",
998-
"- [RDP APIs ESG CFS Bulk file Workflow](https://github.com/LSEG-API-Samples/Example.RDP.Python.ESG.PointinTimeBulk) - a dedicate ESG CFS workflow\n",
998+
"- [RDP APIs Green Revenues CFS file Workflow](https://github.com/LSEG-API-Samples/Example.RDP.Python.GreenRevenuesBulk) - a dedicate Green Revenue CFS workflow\n",
999+
"- [RDP APIs ESG CFS file Workflow](https://github.com/LSEG-API-Samples/Example.RDP.Python.ESG.PointinTimeBulk) - a dedicate ESG CFS workflow\n",
9991000
"\n",
10001001
"And much more on the [Developer Portal](https://developers.lseg.com/en) website."
10011002
]
@@ -1007,7 +1008,7 @@
10071008
"source": [
10081009
"## <a id=\"references\"></a>References\n",
10091010
"\n",
1010-
"That brings me to the end of my generic CFS Bulk file workflow project. For further details, please check out the following resources:\r\n",
1011+
"That brings me to the end of my generic CFS file workflow project. For further details, please check out the following resources:\r\n",
10111012
"\r\n",
10121013
"* [Refinitiv Data Platform APIs page](https://developers.lseg.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-apis) on the [Refinitiv Developer Community](https://developers.lseg.com/) website.\r\n",
10131014
"* [Refinitiv Data Platform APIs Playground page](https://apidocs.refinitiv.com/Apps/ApiDocs).\r\n",
@@ -1046,7 +1047,7 @@
10461047
"name": "python",
10471048
"nbconvert_exporter": "python",
10481049
"pygments_lexer": "ipython3",
1049-
"version": "3.10.13"
1050+
"version": "3.10.10"
10501051
}
10511052
},
10521053
"nbformat": 4,

0 commit comments

Comments
 (0)