UFC v2

API API Version
UFC v2
Note: Authentication is required for all API calls.
## Competitions List ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/competitions.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", "/ufc/trial/v2/en/competitions.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/ufc/trial/v2/en/competitions.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Competitions List. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/competitions.`{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` | Supported Locales `format` | xml or json. `your_api_key` | Your API key. ## Competitions Seasons ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/competitions/sr:competition:25809/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", "/ufc/trial/v2/en/competitions/sr:competition:25809/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/ufc/trial/v2/en/competitions/sr:competition:25809/seasons.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Competitions Seasons. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/competitions/`{competitions_id}`/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` | Supported Locales `competitions_id` | Id of a given competition. `format` | xml or json. `your_api_key` | Your API key. ## Competitor Profile ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/competitors/sr:competitor:237676/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", "/ufc/trial/v2/en/competitors/sr:competitor:237676/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/ufc/trial/v2/en/competitors/sr:competitor:237676/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/ufc/`{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` | Supported Locales `competitor_id` | Id of a given competitor. `format` | xml or json. `your_api_key` | Your API key. ## Competitor Summaries ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/competitors/sr:competitor:245495/summaries.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", "/ufc/trial/v2/en/competitors/sr:competitor:245495/summaries.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/ufc/trial/v2/en/competitors/sr:competitor:245495/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Competitor Summaries. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/competitor/`{competitor_id}`/summaries.`{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` | Supported Locales `competitor_id` | Id of a given competitor. `format` | xml or json. `your_api_key` | Your API key. ## Daily Summaries ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/schedules/2018-08-04/summaries.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", "/ufc/trial/v2/en/schedules/2018-08-04/summaries.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/ufc/trial/v2/en/schedules/2018-08-04/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Daily Summaries. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/schedules/`{year}`-`{month}`-`{day}`/summaries.`{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` | Supported Locales `year` | Year in 4 digit format (YYYY). `month` | Month in 2 digit format (MM). `day` | Day in 2 digit format (DD). `format` | xml or json. `your_api_key` | Your API key. ## Head To Heads ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/competitors/sr:competitor:413427/versus/sr:competitor:393042/summaries.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", "/ufc/trial/v2/en/competitors/sr:competitor:413427/versus/sr:competitor:393042/summaries.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/ufc/trial/v2/en/competitors/sr:competitor:413427/versus/sr:competitor:393042/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Head To Head. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/competitors/`{competitor_id}`/versus/`{competitor_id2}`/summaries.`{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` | Supported Locales `competitor_id` | Id of a given competitor. `competitor_id2` | Id of a given competitor. `format` | xml or json. `your_api_key` | Your API key. ## Live Summaries ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/schedules/live/summaries.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", "/ufc/trial/v2/en/schedules/live/summaries.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/ufc/trial/v2/en/schedules/live/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Live Summaries. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/schedules/live/summaries.`{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` | Supported Locales `format` | xml or json. `your_api_key` | Your API key. ## Rankings ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/rankings.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", "/ufc/trial/v2/en/rankings.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/ufc/trial/v2/en/rankings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Rankings. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/rankings.`{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` | Supported Locales `format` | xml or json. `your_api_key` | Your API key. ## Season Information ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/seasons/sr:season:54879/info.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", "/ufc/trial/v2/en/seasons/sr:season:54879/info.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/ufc/trial/v2/en/seasons/sr:season:54879/info.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Seasons Info. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/seasons/``{season_id}``/info.`{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` | Supported Locales `season_id` | Id of a given season. `format` | xml or json. `your_api_key` | Your API key. ## Season List ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/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", "/ufc/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/ufc/trial/v2/en/seasons.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Seasons List. https://api.sportradar.us/ufc/`{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` | Supported Locales `format` | xml or json. `your_api_key` | Your API key. ## Season Probabilities ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/seasons/sr:season:54879/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", "/ufc/trial/v2/en/seasons/sr:season:54879/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/ufc/trial/v2/en/seasons/sr:season:54879/probabilities.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Season Probabilities. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_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` | Supported Locales `season_id` | Id of a given season. `format` | xml or json. `your_api_key` | Your API key. ## Season Summaries ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/seasons/sr:season:54879/summaries.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", "/ufc/trial/v2/en/seasons/sr:season:54879/summaries.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/ufc/trial/v2/en/seasons/sr:season:54879/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Season Summaries. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/summaries.`{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` | Supported Locales `season_id` | Id of a given season. `format` | xml or json. `your_api_key` | Your API key. ## Sport Event Change Log ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/sport_events/updated.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", "/ufc/trial/v2/en/sport_events/updated.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/ufc/trial/v2/en/sport_events/updated.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Sport Event Change Log. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/sport_events/updated.`{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` | Supported Locales `format` | xml or json. `your_api_key` | Your API key. ## Sport Event Removed ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/sport_events/removed.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", "/ufc/trial/v2/en/sport_events/removed.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/ufc/trial/v2/en/sport_events/removed.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Sport Event Removed. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/sport_events/removed.`{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` | Supported Locales `format` | xml or json. `your_api_key` | Your API key. ## Sport Event Summary ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ufc/trial/v2/en/sport_events/sr:sport_event:15616172/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", "/ufc/trial/v2/en/sport_events/sr:sport_event:15616172/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/ufc/trial/v2/en/sport_events/sr:sport_event:15616172/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Sport Event Summary. https://api.sportradar.us/ufc/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{sport_event_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` | Supported Locales `sport_event_id` | Id of a given sport event. `format` | xml or json. `your_api_key` | Your API key.