Attachments

Some datasets distribute binary files, such as documents or reports, together with the data. A field of an entity is marked as an attachment field when it holds the identifier of such a file.

Downloading an attachment

https://consumer.qa.data.spglobal.com/namespace/Entity/ID/FIELD_PATH/ATTACHMENT_ID
  • ID is the identifier of the instance the attachment belongs to.
  • FIELD_PATH is the path to the attachment field, which can include nested fields.
  • ATTACHMENT_ID is the value of the attachment field.

Send your credentials in the Authorization header, as for all requests. See Authentication.

The response is the file. Its content type is that of the stored file, Content-Disposition carries the file name, and the x-attachment-content-length header carries the size.

Parameters

ParameterDescription
metaData=trueReturns contentLength, contentType and lastModified (milliseconds since the epoch) of the file as JSON instead of the file. Ignored with returnPreSignedUrl.
returnPreSignedUrl=trueReturns a time-limited URL from which the file can be downloaded without credentials, valid for 7 days.
expiration=DATEWith returnPreSignedUrl: the date until which the URL is valid.

Entitlements and limits

You must be entitled to the entity and the instance, and the attachment must belong to the instance. Attachments entitled for inline access only cannot be requested directly.

Attachment downloads count towards the separate attachment quota. See Usage quota.