IndyCar v2

API API Version
IndyCar v2
Note: Authentication is required for all API calls.
## Competitor Profile ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/indycar/trial/v2/en/competitors/sr:competitor:8101/profile.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/indycar/trial/v2/en/competitors/sr:competitor:8101/profile.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/indycar/trial/v2/en/competitors/sr:competitor:8101/profile.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Competitor Profile. https://api.sportradar.us/indycar/`{access_level}`/`{version}`/`{language_code}`/competitors/`{competitor_id}`/profile.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | Optional 2 letter code for supported languages: en (English), ru (Russian), and zh (simplified Chinese). | | `competitor_id` | Id of a given competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Competitor Profile, use the following URL. http://schemas.sportradar.com/bsa/genericstage/v2/xml/endpoints/genericstage/competitor_profile.xsd ## Seasons ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/indycar/trial/v2/en/seasons.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/indycar/trial/v2/en/seasons.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/indycar/trial/v2/en/seasons.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Seasons. https://api.sportradar.us/indycar/`{access_level}`/`{version}`/`{language_code}`/seasons.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | Optional 2 letter code for supported languages: en (English), ru (Russian), and zh (simplified Chinese). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Seasons, use the following URL. http://schemas.sportradar.com/bsa/genericstage/v2/xml/endpoints/genericstage/seasons.xsd ## Stage Probabilities ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/indycar/trial/v2/us/sport_events/sr:stage:351963/probabilities.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/indycar/trial/v2/us/sport_events/sr:stage:351963/probabilities.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/indycar/trial/v2/us/sport_events/sr:stage:351963/probabilities.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Stage Probabilities. https://api.sportradar.us/indycar/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{stage_id}`/probabilities.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | Optional 2 letter code for supported languages: en (English), ru (Russian), and zh (simplified Chinese). | | `stage_id` | Id of a given stage. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Stage Probabilities, use the following URL. http://schemas.sportradar.com/bsa/genericstage/v2/xml/endpoints/genericstage/probabilities.xsd ## Stage Schedule ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/indycar/trial/v2/en/sport_events/sr:stage:348851/schedule.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/indycar/trial/v2/en/sport_events/sr:stage:348851/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/indycar/trial/v2/en/sport_events/sr:stage:348851/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Stage Schedule. https://api.sportradar.us/indycar/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{stage_id}`/schedule.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | Optional 2 letter code for supported languages: en (English), ru (Russian), and zh (simplified Chinese). | | `stage_id` | Id of a given stage. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Stage Schedule, use the following URL. http://schemas.sportradar.com/bsa/genericstage/v2/xml/endpoints/genericstage/schedule.xsd ## Stage Summary ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/indycar/trial/v2/en/sport_events/sr:stage:348851/summary.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/indycar/trial/v2/en/sport_events/sr:stage:348851/summary.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/indycar/trial/v2/en/sport_events/sr:stage:348851/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Stage Summary. https://api.sportradar.us/indycar/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{stage_id}`/summary.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | Optional 2 letter code for supported languages: en (English), ru (Russian), and zh (simplified Chinese). | | `stage_id` | Id of a given stage. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Stage Summary, use the following URL. http://schemas.sportradar.com/bsa/genericstage/v2/xml/endpoints/genericstage/summary.xsd