Real Assets CSV Workflow
For CSV uploads or large batch sizes
You can leverage this workflow if you prefer to use CSV uploads as your input method or have a batch size that exceeds those allowed in our JSON workflows.
The Postman collection provided in the Developer Assets section streamlines the steps in this workflow. We recommend importing the environment file and collection file corresponding to your choice of authentication method; once the login credentials are updated in the Postman Environment, the remaining variables in the collection file will autofill in each step outlined below.
Recommendation
Authenticating with a bearer token will trigger email notifications after the Create Portfolio and Submit Job steps below. For users leveraging this workflow to automate large batch scoring with automated looping, we strongly recommend authenticating with API Keys.
Most of the steps in this workflow are common across all our endpoints; the primary difference lies in the ability to specify the endpoint and parameters in the Submit Job step.
Create Uploads
This step generates a request to upload a CSV file. The request body requires a name for the file to be uploaded.
If successful, the key output will include the upload_id
and upload_url
.
Submit Uploads
Upload the facilities to be scored in CSV format. Using the upload_url
with a PUT request uploads the facilities input file to a secure cloud location. The application now associates the user-provided file name with the upload_id
.
See the Developer Assets section for the CSV template to input the list of facilities to be scored.
Get Upload
In this step, you name the portfolio of facilities and associate it with the upload_id
generated in prior steps. Further, the locations in the input file are geocoded (if necessary) and the data in other fields is validated during at this time. The results from geocoding and data validation will be available during the next step.
If successful, the response will include a portfolio_id
; this will be the reference ID for the output once the input locations have been scored. Users authenticating with a bearer token will receive an email with a status to indicate readiness to proceed to the next step.
Create Portfolios
In this step, you name the portfolio of facilities and associate it with the upload_id
generated in prior steps.
If successful, the response will include a portfolio_id
. This is the reference ID for the output once the input locations have been scored.
Get Portfolio
This step verifies that the portfolio created in the prior step was successfully imported. If successful, the response will include the portfolio_id
, upload_id
, portfolio_name
, import_status
indicating whether the portfolio is ready for scoring, create_date
, and the download_url
.
You can validate the geocoding results and ensure successful data validation of other fields by opening the download_url
in a browser. This downloads the validated and geocoded input file; the file will indicate geo_status
and error as applicable.
Recommendation
Before scoring, we suggest checking this file to ensure the correctness of your input data. In particular, if you provided addresses rather than coordinates, we suggest confirming the
geo_status
column to ensure correctness.
Submit Job
In this step, you specify the type of scoring and level of analysis you want to perform. As described in the Climate on Demand API Endpoints section, each endpoint below corresponds to a unique output and each requires different input parameters. Details for each endpoint’s parameters are provided in the API Reference Guide sections linked below.
Hazard scoring endpoints
Financial impact endpoints
Users authenticating with a bearer token will receive an email with a status to indicate successful scoring.
Get Job
This step verifies that scoring was successful and provides the download_url
where the scoring results can be retrieved as a CSV.
Updated about 2 months ago