Getting started
Concepts
- Model concepts
- API concepts
- API versions
- Entitlements
- Filters
- Request parameters
- Usage quota
- Error codes
Services
Parameters
- after
- aggregate
- aggregateIncrementFrom
- cursor
- dateFormat
- descending
- entity
- envelope
- fields
- format
- from
- groupBy
- groupById
- groupByIdAndTime
- groupByTo
- includeMetaData
- inline
- inlineLatest
- inlineTimeseries
- limit
- modulus
- nextUrl
- part
- pivot
- rankBy
- requestTimeout
- returnPreSignedUrl
- showMessage
- showStreamCursor
- to
- trace
- verifyLinks
- wait
Deprecated parameters
Datasets
- ECR: timeseries and observations
- ECR: usage patterns
- fiindices: retrieving index data
- Parsing: asset classes
- Parsing: best practices
Samples
API concepts
URL structure
All data offered by the API is addressed with a simple URL:
https://consumer.qa.data.spglobal.com/namespace/Entity/service?format=json
For example, https://consumer.qa.data.spglobal.com/csbpd/Instrument/latest?format=json.
namespaceidentifies the dataset (see Model concepts).Entityidentifies the entity within the dataset.serviceidentifies the service, such aslatestortimeseries.- The query string contains the request parameters, such as
format,limitandafter.
Namespace and entity names are case sensitive. Parameter names are not. All requests for data use HTTPS GET.
No side effects
Each call has no effect on subsequent calls, which keeps the API scalable and simple. The only exception is authentication: you obtain an API key once and use it in all subsequent requests.
Services
Depending on the dataset, the following services are available:
- latest: the latest record of each instance of an entity.
- timeseries: the historical records of an entity.
- stream: all updates flowing through the platform for a dataset or entity.
- batchrun: the records of a single batch run, and the list of batch runs.
- archive: archived stream messages.
- meta: the namespaces, entities and fields available to you.
- Attachments: binary files that belong to an instance.
Data formats
The default format is JSON. XML and CSV are available for most services. HTML is intended for exploring the API in a browser. See the format parameter.
Paging
Results larger than the page size are returned in pages:
- Set limit to the number of records per page. Using
limitis strongly recommended for any request that can return many records. - Request the envelope of the response with
envelope=true. The envelope contains anaftervalue. - Request the next page by repeating the request with the after parameter set to that value.
- Stop when a response contains no
aftervalue or no records.
Always use the after value exactly as returned. Its format depends on the service and on the API version and must not be constructed by the client.
For the stream service the process is different: keep polling with the returned after value, including after empty responses.
Adding nextUrl=true to the envelope request returns the full URL of the next page in a next field.
Requests, logging and support
Every response carries a requestId, in the envelope of data responses, in the body of error responses and in the X-Request-Id response header. Log it with your own request logs. If you contact S&P Global about a request, quote the requestId.
Exploring in the browser
Every URL can be opened in a browser with format=HTML. The HTML view shows the data, the fields of the entity and a form for the request parameters. Change format=HTML to format=JSON for a response suited to application integration.