1
Create Source
First call the POST Source endpoint to create a source reference object. In the request, make sure to:
- Set the
__typenameparameter toCreateDocumentSourceRequest - Include the
content_lengthparameter (i.e. file size in bytes): this value is checked during the file upload step - Choose a display name: this name will be shown in the registry
- Provide the file name of the upload: this value will be checked in the upload step
2
Upload source file
The response to the above request will include a
signed_upload_url field for a Google Cloud Storage bucket. To upload the source file, make a PUT request to the URL as follows:curl
3
Attach to a datapoint
When creating a datapoint, sources can be attached by passing the source ID (
src_xxxx) in the source_ids array.