https://api.bitsighttech.com/ratings/v1/portfolio/ratings
Get security rating details of the countries in your portfolio, including the unique identifiers of particular countries.
Parameters
expand
-
[Query] Show the letter grades of each risk vector.
This parameter might result in a large amount of data. See error 413 for details.
Value: [String]
rating_details
period
-
[Query] Specify a time interval to filter the ratings data.
Value: [String]
daily
monthly
latest
Example:
?period=monthly
start_date
-
[Query] Filter the ratings data by starting date.
Value: [String]
YYYY-MM-DD
end_date
-
[Query] Filter the ratings data by the end date.
Value: [String]
YYYY-MM-DD
Example GET Request
Use a GET request to retrieve data for your entire portfolio.
curl -X GET 'https://api.bitsighttech.com/ratings/v1/portfolio/ratings?expand=rating_details&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD&period=time_interval' -u api_token:
Example POST Request
Use a POST to customize the JSON body for the request, i.e. select a subset of countries instead of your entire portfolio.
curl -X POST https://api_token@service.bitsighttech.com/ratings/v1/portfolio/ratings -d '{"companies":["country_a_guid","country_b_guid"],"start_date":"YYYY-MM-DD","end_date":"YYYY-MM-DD","expand":"rating_details","period":"time_interval'
Example Response
[ { "ratings":[ { "date":"2019-10-19", "rating":600, "percentile":20 } ], "guid":"5d04c480-b1e7-48af-9633-82996a8446fc", "name":"Demo Country 1" } ]
Response Attributes
The following table describes the attributes of a country’s rating details object.
Field | Description |
---|---|
ratings Array |
A list of objects containing security rating details of a country. |
date String [ |
The date when this rating details object was retrieved. |
rating Integer |
The headline security rating of this country on the specified date. |
percentile Integer |
|
guid String [ |
The unique identifier of this country. |
name String |
The name of this country. |
Status Codes
See the standard response codes.
413
-
The amount of data being computed is too high.
Troubleshooting: Make the response smaller either by setting the
period
parameter value tolatest
(?period=latest
) or by not including theexpand
parameter.
- July 30, 2020: Error 413.
Feedback
0 comments
Please sign in to leave a comment.