Datacore
These calls obtain tokens to access Datacore.
Permission structure
Customers are give access to a number (1+) of applications. Each application has a number of permissions over a number (0+) of organizations. Each application is given a number (1+) of credentialId/credentialSecret pairs. These credentials give access to that specific application.
Users/Persons can also be given access to an application, which allows them access without using the credentialId/credentialSecret pair.
There are two different methods of providing credentials:
Application Credentials These credentials would be used to authenticate an application/service to the API where those credentials had been provided to the customer. They use the fields
credentialId/credentialSecretIndividual User Credentials These credentials would be used to authenticate a user/person to the API. These credentials would be obtained from the User Sign on (SSO) service. They use the fields
userIdentityToken/applicationId
This call will return a JWT that you can use to make API calls to the DataCore REST API service. The JWT is generated in response to parameters and the exchange of identity credentials.
Success
Error
POST /v1/oauth2/rest/token HTTP/1.1
Host: token.connect.sportradar.com
Content-Type: application/json
Accept: */*
Content-Length: 211
{
"sport": "basketball",
"organization": {
"group": "FIBA",
"id": [
"b1a23",
"b1y76"
]
},
"scopes": [
"read:organization",
"write:organization"
],
"credentialId": "e50u42059u405u43503u5",
"credentialSecret": "e50u42059u405u43503u5"
}{
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IlRoaXMgaXMganVzdCBhIGR1bW15IGV4YW1wbGUgdG9rZW4uIFlvdSBkaWRuJ3QgcmVhbGx5IGV4cGVjdCBhbnl0aGluZyBpbnRlcmVzdGluZyBoZXJlIGRpZCB5b3U_IiwiaWF0IjoxNTE2MjM5MDIyfQ.kh8vizGTBesLJgW0XuFh4cQ9dhmtOIasg6Hb1Z_KgHg",
"tokenType": "bearer",
"expiresIn": 3600
},
"meta": {
"code": 200,
"codeVersion": "d6cd1e2bd19e03a81132a23b2025920577f84e37",
"generationTime": 0.011604,
"time": "2018-06-05 23:43:41.227584",
"version": 1
}
}This call will return information about how to access the the DataCore Streaming API service specific to a Fixture.
Success
Error
POST /v1/stream/fixture/access HTTP/1.1
Host: token.connect.sportradar.com
Content-Type: application/json
Accept: */*
Content-Length: 232
{
"fixtureId": "009e9276-5c80-11e8-9c2d-fa7ae01bbebc",
"sport": "basketball",
"scopes": [
"read:stream_events",
"read:stream_statistics"
],
"includePort": false,
"credentialId": "e50u42059u405u43503u5",
"credentialSecret": "e50u42059u405u43503u5"
}{
"data": {
"url": "wss://a3q4n6jdf6vh3t-ats.iot.eu-west-1.amazonaws.com/mqtt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIASEQ6JOTPW4ZDZZFF%2F20200313%2Feu-west-1%2Fiotdevicegateway%2Faws4_request&X-Amz-Date=20200313T013641Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=4d36c67773a04f540b53d28673c3388763d7bd6eca5ad5a16a03e31cfa243288&X-Amz-Security-Token=FwoGZXIvYXdzEGMaDGWqMYxy6Ki%2BQXmx%2BCLKA1CqZhw3o%2BScGqcPJy%2FWjA5IcMN9TKbfPX5m1GCKmh%2BX%2F4eqzAY4KZzx8v54okLVBwcLWEfyFKhK8xIUOXFnfy8rhpcXuHyMbY1dhLsvZe7jvBUZna3KSaKRbhEgctqdxkasJTNULSCjHstuNaLpY44bbyPSdiSpfH3l6D%2B%2BhIdnbIiSWCoQCeuF%2B6HUf0aWKMejPGmpBaTOZZCB%2BvauinBj1bd%2BVceDn7LAI3Ff2lOAkGbBnyptfbo%2B%2BhVbuaYCKR0lnmylW2q80oK%2FXoQ9Q%2FuLLVmakTFm3h5Bfq1cIBF5TXl6L3yHd3Pdy5XJ1uuOWLRNd122kl6508yxj8t04aL%2BOujvO2iL9moMRkJ9Xst6NkiUJ0VGV8GO25HfsC2j1hpJMS%2FhATjufRT%2BP3ZNG2EAs5Uae3hBzhsh7lqQcglOOrkFwlUuslJ9YjgQt4MTIV7vQR0Z2xhgRE%2BzvGF5RpsLPg1Nv1e2vnpPZrRWYrJxeirdxP5yVeVi5jsqjFnPfH9BUwwbM54oSKuw0UV5RdV%2FjKkykpPlPZJFA28r5KQH9Yv%2B47Ujc9LZN42ft8cAiTcjvy1IpREW58zTzzOu6NXfdtBIvch1ZVDoKKjHq%2FMFMi3ypX%2BR4xXt2QmkclFTdeMGr7YFlC66U7KevUMWJvE3ErKTUYXG5CB2U0Ydw8c%3D",
"clientId": "stream-25fe57d4-fe21-4429-a46e-f4e007977550",
"topics": [
{
"topic": "stream/basketball/venue/ba53b55c-f6c6-11e9-802a-5aa538984bd8/scoreboard",
"scope": "read:stream_scoreboard",
"permission": "read"
}
]
},
"meta": {
"code": 200,
"codeVersion": "d6cd1e2bd19e03a81132a23b2025920577f84e37",
"generationTime": 0.011604,
"time": "2018-06-05 23:43:41.227584",
"version": 1
}
}This call will return information about how to access the the DataCore Streaming API service for a venue.
Success
Error
POST /v1/stream/venue/access HTTP/1.1
Host: token.connect.sportradar.com
Content-Type: application/json
Accept: */*
Content-Length: 235
{
"venueId": "009e9276-5c80-11e8-9c2d-fa7ae01bbebc",
"sport": "basketball",
"scopes": [
"read:stream_scoreboard",
"write:stream_scoreboard"
],
"includePort": false,
"credentialId": "e50u42059u405u43503u5",
"credentialSecret": "e50u42059u405u43503u5"
}{
"data": {
"url": "wss://a3q4n6jdf6vh3t-ats.iot.eu-west-1.amazonaws.com/mqtt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIASEQ6JOTPW4ZDZZFF%2F20200313%2Feu-west-1%2Fiotdevicegateway%2Faws4_request&X-Amz-Date=20200313T013641Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=4d36c67773a04f540b53d28673c3388763d7bd6eca5ad5a16a03e31cfa243288&X-Amz-Security-Token=FwoGZXIvYXdzEGMaDGWqMYxy6Ki%2BQXmx%2BCLKA1CqZhw3o%2BScGqcPJy%2FWjA5IcMN9TKbfPX5m1GCKmh%2BX%2F4eqzAY4KZzx8v54okLVBwcLWEfyFKhK8xIUOXFnfy8rhpcXuHyMbY1dhLsvZe7jvBUZna3KSaKRbhEgctqdxkasJTNULSCjHstuNaLpY44bbyPSdiSpfH3l6D%2B%2BhIdnbIiSWCoQCeuF%2B6HUf0aWKMejPGmpBaTOZZCB%2BvauinBj1bd%2BVceDn7LAI3Ff2lOAkGbBnyptfbo%2B%2BhVbuaYCKR0lnmylW2q80oK%2FXoQ9Q%2FuLLVmakTFm3h5Bfq1cIBF5TXl6L3yHd3Pdy5XJ1uuOWLRNd122kl6508yxj8t04aL%2BOujvO2iL9moMRkJ9Xst6NkiUJ0VGV8GO25HfsC2j1hpJMS%2FhATjufRT%2BP3ZNG2EAs5Uae3hBzhsh7lqQcglOOrkFwlUuslJ9YjgQt4MTIV7vQR0Z2xhgRE%2BzvGF5RpsLPg1Nv1e2vnpPZrRWYrJxeirdxP5yVeVi5jsqjFnPfH9BUwwbM54oSKuw0UV5RdV%2FjKkykpPlPZJFA28r5KQH9Yv%2B47Ujc9LZN42ft8cAiTcjvy1IpREW58zTzzOu6NXfdtBIvch1ZVDoKKjHq%2FMFMi3ypX%2BR4xXt2QmkclFTdeMGr7YFlC66U7KevUMWJvE3ErKTUYXG5CB2U0Ydw8c%3D",
"clientId": "stream-25fe57d4-fe21-4429-a46e-f4e007977550",
"topics": [
{
"topic": "stream/basketball/venue/ba53b55c-f6c6-11e9-802a-5aa538984bd8/scoreboard",
"scope": "read:stream_scoreboard",
"permission": "read"
}
]
},
"meta": {
"code": 200,
"codeVersion": "d6cd1e2bd19e03a81132a23b2025920577f84e37",
"generationTime": 0.011604,
"time": "2018-06-05 23:43:41.227584",
"version": 1
}
}This call will return information about how to access the Datacore Streaming API service.
In most cases this call should NOT be used, the '/stream/access' call should be used instead. This call would only be used to connect to a specific topic. Note: The topic names are not guaranteed to be the same on subsequent calls.
Success
Error
POST /v1/stream/fixture/specific HTTP/1.1
Host: token.connect.sportradar.com
Content-Type: application/json
Accept: */*
Content-Length: 263
{
"topics": [
"/stream/basketball/b1a23/009e9276-5c80-11e8-9c2d-fa7ae01bbebc/009e9276-5c80-11e8-9c2d-fa7ae01bbebc/scoreboard"
],
"scopes": [
"read:stream_events",
"read:stream_statistics"
],
"credentialId": "e50u42059u405u43503u5",
"credentialSecret": "e50u42059u405u43503u5"
}{
"data": {
"url": "wss://a3q4n6jdf6vh3t-ats.iot.eu-west-1.amazonaws.com/mqtt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIASEQ6JOTPW4ZDZZFF%2F20200313%2Feu-west-1%2Fiotdevicegateway%2Faws4_request&X-Amz-Date=20200313T013641Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=4d36c67773a04f540b53d28673c3388763d7bd6eca5ad5a16a03e31cfa243288&X-Amz-Security-Token=FwoGZXIvYXdzEGMaDGWqMYxy6Ki%2BQXmx%2BCLKA1CqZhw3o%2BScGqcPJy%2FWjA5IcMN9TKbfPX5m1GCKmh%2BX%2F4eqzAY4KZzx8v54okLVBwcLWEfyFKhK8xIUOXFnfy8rhpcXuHyMbY1dhLsvZe7jvBUZna3KSaKRbhEgctqdxkasJTNULSCjHstuNaLpY44bbyPSdiSpfH3l6D%2B%2BhIdnbIiSWCoQCeuF%2B6HUf0aWKMejPGmpBaTOZZCB%2BvauinBj1bd%2BVceDn7LAI3Ff2lOAkGbBnyptfbo%2B%2BhVbuaYCKR0lnmylW2q80oK%2FXoQ9Q%2FuLLVmakTFm3h5Bfq1cIBF5TXl6L3yHd3Pdy5XJ1uuOWLRNd122kl6508yxj8t04aL%2BOujvO2iL9moMRkJ9Xst6NkiUJ0VGV8GO25HfsC2j1hpJMS%2FhATjufRT%2BP3ZNG2EAs5Uae3hBzhsh7lqQcglOOrkFwlUuslJ9YjgQt4MTIV7vQR0Z2xhgRE%2BzvGF5RpsLPg1Nv1e2vnpPZrRWYrJxeirdxP5yVeVi5jsqjFnPfH9BUwwbM54oSKuw0UV5RdV%2FjKkykpPlPZJFA28r5KQH9Yv%2B47Ujc9LZN42ft8cAiTcjvy1IpREW58zTzzOu6NXfdtBIvch1ZVDoKKjHq%2FMFMi3ypX%2BR4xXt2QmkclFTdeMGr7YFlC66U7KevUMWJvE3ErKTUYXG5CB2U0Ydw8c%3D",
"clientId": "stream-25fe57d4-fe21-4429-a46e-f4e007977550",
"topics": [
{
"topic": "stream/basketball/venue/ba53b55c-f6c6-11e9-802a-5aa538984bd8/scoreboard",
"scope": "read:stream_scoreboard",
"permission": "read"
}
]
},
"meta": {
"code": 200,
"codeVersion": "d6cd1e2bd19e03a81132a23b2025920577f84e37",
"generationTime": 0.011604,
"time": "2018-06-05 23:43:41.227584",
"version": 1
}
}Last updated
Was this helpful?