Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Open PermID /
avatar image
Question by lgreen · Mar 13, 2019 at 04:49 PM · pythondownload filebulk file

Bulk Files download

Looking to download bulk files form PermID.org. Do I need my token? If so, any idea on the python call to do this? using requests maybe?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by jirapongse.phuriphanvichai · Mar 14, 2019 at 04:29 AM

@lgreen

You need to know a file name and access token.

I got the source code from StackOverflow.

import requests 
import shutil 
def download_file(url): 
 local_filename = url.split('/')[-1] 
 local_filename = local_filename.split('?')[0] 
 print("Save: ", local_filename) 
 r = requests.get(url, stream=True) 
 with open(local_filename, 'wb') as f: 
   shutil.copyfileobj(r.raw, f) 
 return local_filename 

access_token = "<access token>" 
download_file("https://permid.org/sfiles/bulkDownload/OpenPermID-bulk-organization-20190310_072837.ttl.gz?access-token="+access_token) 

The above code will download the OpenPermID-bulk-organization-20190310_072837.ttl.gz file.

Comment
lgreen

People who like this

1 Show 8 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
lgreen · Mar 14, 2019 at 08:56 AM 0
Share

OK, this is great. Any idea how to get the "_072837" part of the file, which changes?

avatar image
REFINITIV
jirapongse.phuriphanvichai ♦♦ · Mar 15, 2019 at 12:45 AM 0
Share

@lgreen

I will contact the Open PermId support team to verify if we have an interface to retrieve a list of files.

avatar image
REFINITIV
jirapongse.phuriphanvichai ♦♦ · Mar 29, 2019 at 06:14 AM 0
Share

@lgreen

You can use the following URL to get a list of files.

https://permid.org/api/bulkDownload/metadata?access-token=<access_token>
avatar image
lgreen · Apr 05, 2019 at 09:47 AM 0
Share

Good. Any thoughts on how to get the changing "

072837

" in the link?

download_file("https://permid.org/sfiles/bulkDownload/OpenPermID-bulk-organization-20190310_072837.ttl.gz?access-token="+access_token)

avatar image
lgreen · Apr 12, 2019 at 08:32 AM 0
Share

Hi, I can't get this:

https://permid.org/api/bulkDownload/metadata?access-token=<access_token>;

to work... when using my token. can you give a specific example? ie do i use the < >, I have tried with and without and it does not work...

avatar image
REFINITIV
Christiaan Meihsl ♦♦ lgreen · Apr 23, 2019 at 06:14 AM 0
Share

@lgreen, you should not use the < >

avatar image
lgreen Christiaan Meihsl ♦♦ · May 01, 2019 at 07:59 AM 0
Share

Unfortunately doesn't work without either...

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
9 People are following this question.

Related Questions

Incomplete organization data from download file (.ttl)

PermID Organization Bulk File - documentation/schema/fields

SSLError: bad handshake

Bulk file download just half the size

Bulk Organisation PermId File is Half the Size

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges