For the HCP 500 Release, unprocessed and processed data for a subject can be accessed via REST calls.
In order to access data for a subject, you will need to register at https://db.humanconnectome.org
To get data via REST, in a script, you could use tools like curl.
All files associated with the T1w acquisition
All files associated with the rfMRI_REST2_LR acquisition
To download a particular file, say T1wthe for a subject, say 100307, you could invoke curl as:
curl -u DB_LOGIN_ID_HERE:DB_PASSWORD_HERE -X GET