-
Notifications
You must be signed in to change notification settings - Fork 0
HLD 2. Rest API
By: Sandro Ferreira - Mar. 26, 2020
{
"id": 0,
"username": "string",
"password": "string",
"email": "string",
"accessLevel": 0,
"notifications": 0,
"status": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}{
"token": "string",
"tokenExpirationTime": 0,
"id": "string"
}{
"errorCode": 0,
"errorMessage": "string"
}{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"birthDate": "string",
"birthPlace": "string",
"citizenship": "string",
"height": 0,
"weight": 0,
"position": "string",
"positionKey": 0,
"agent": "string",
"currentInternational": "string",
"status": "string",
"clubId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"country": "string",
"founded": "string",
"colors": "string",
"members": "string",
"stadium": "string",
"address": "string",
"homepage": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}{
"id": 0,
"key": "string",
"name": "string",
"edition": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}{
"id": 0,
"position": 0,
"played": 0,
"won": 0,
"drawn": 0,
"lost": 0,
"goalsFor": 0,
"goalsAgainst": 0,
"goalsDifference": 0,
"points": 0,
"clubId": 0,
"competitionId": 0,
"created": "string",
"updated": "string"
}{
"id": 0,
"key": "string",
"name": "string",
"description": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}{
"id": 0,
"key": "string",
"time": "string",
"gameTime": "string",
"eventDescription": "string",
"gameId": 0,
"eventId": 0,
"athleteId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}{
"id": 0,
"status": 0,
"gameId": 0,
"athleteId": 0,
"created": "string",
"updated": "string"
}{
"id": 0,
"userId": 0,
"gameId": 0,
"athleteId": 0,
"created": "string",
"updated": "string"
}{
"id": 0,
"name": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}{
"id": 0,
"image": "string",
"imageUrl": "string",
"created": "string",
"updated": "string"
}{
"game": {
"id": 0,
"timeStart": "string",
"timeEnd": "string",
"homeColor": "string",
"visitorColor": "string",
"homeScore": 0,
"visitorScore": 0,
"homePenaltyScore": 0,
"visitorPenaltyScore": 0,
"status": 0,
"type": "string",
"location": "string",
"homeId": 0,
"visitorId": 0,
"competitionId": 0,
"imageId": 0,
"userId": 0,
"created": "string",
"updated": "string"
},
"sport": {
"id": 0,
"name": "string",
"imageId": 0,
"created": "string",
"updated": "string"
},
"clubs": [
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"country": "string",
"founded": "string",
"colors": "string",
"members": "string",
"stadium": "string",
"address": "string",
"homepage": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}
],
"athletes": [
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"birthDate": "string",
"birthPlace": "string",
"citizenship": "string",
"height": 0,
"weight": 0,
"position": "string",
"positionKey": 0,
"agent": "string",
"currentInternational": "string",
"status": "string",
"clubId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
],
"competition": {
"id": 0,
"key": "string",
"name": "string",
"edition": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
},
"events": [
{
"id": 0,
"key": "string",
"name": "string",
"description": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
],
"gameEvents": [
{
"id": 0,
"key": "string",
"time": "string",
"gameTime": "string",
"eventDescription": "string",
"gameId": 0,
"eventId": 0,
"athleteId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}
]
}This controller manages athletes data.

This endpoint creates new athletes.
Request:
[
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"birthDate": "string",
"birthPlace": "string",
"citizenship": "string",
"height": 0,
"weight": 0,
"position": "string",
"agent": "string",
"currentInternational": "string",
"status": "string",
"clubId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
]Response:
Returns the previous object with the primary key.
[
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"birthDate": "string",
"birthPlace": "string",
"citizenship": "string",
"height": 0,
"weight": 0,
"position": "string",
"agent": "string",
"currentInternational": "string",
"status": "string",
"clubId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
]This endpoint updates existing athlete.
Request:
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"birthDate": "string",
"birthPlace": "string",
"citizenship": "string",
"height": 0,
"weight": 0,
"position": "string",
"agent": "string",
"currentInternational": "string",
"status": "string",
"clubId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}Response:
Returns the operation result.
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the athlete id. Example: /api/v1/athlete?id=1
Response:
Returns the operation result.
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the athlete id. Example: /api/v1/athlete?id=1
Response:
Returns the athlete data.
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"birthDate": "string",
"birthPlace": "string",
"citizenship": "string",
"height": 0,
"weight": 0,
"position": "string",
"agent": "string",
"currentInternational": "string",
"status": "string",
"clubId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}Request:
Receives the query object on the request url: Example: /api/v1/athletes?query={"fieldName": "string","condition": "string","value": "string"}
Response:
Returns the athletes that match the query.
[
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"birthDate": "string",
"birthPlace": "string",
"citizenship": "string",
"height": 0,
"weight": 0,
"position": "string",
"agent": "string",
"currentInternational": "string",
"status": "string",
"clubId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
]This controller manages SignIn and SignUp requests.

Request:
{
"id": 0,
"username": "string",
"password": "string",
"email": "string",
"accessLevel": 0,
"notifications": 0,
"status": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}Response:
{
"token": "string",
"tokenExpirationTime": 0,
"id": "string"
}Request:
{
"id": 0,
"username": "string",
"password": "string",
"email": "string",
"accessLevel": 0,
"notifications": 0,
"status": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Empty.
Response:
{
"errorCode": 0,
"errorMessage": "string"
}This controller manages clubs data.

Request:
[
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"country": "string",
"founded": "string",
"colors": "string",
"members": "string",
"stadium": "string",
"address": "string",
"homepage": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}
]Response:
[
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"country": "string",
"founded": "string",
"colors": "string",
"members": "string",
"stadium": "string",
"address": "string",
"homepage": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}
]Request:
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"country": "string",
"founded": "string",
"colors": "string",
"members": "string",
"stadium": "string",
"address": "string",
"homepage": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Example: /api/v1/club?id=1
Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request: Receives the club id. Example: /api/v1/club?id=1
Response:
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"country": "string",
"founded": "string",
"colors": "string",
"members": "string",
"stadium": "string",
"address": "string",
"homepage": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}Request:
Receives the query object on the request url: Example: /api/v1/athletes?query={"fieldName": "string","condition": "string","value": "string"}
Response:
[
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"country": "string",
"founded": "string",
"colors": "string",
"members": "string",
"stadium": "string",
"address": "string",
"homepage": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}
]This controller manages competitions data.

Request:
[
{
"id": 0,
"key": "string",
"name": "string",
"edition": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
]Response:
[
{
"id": 0,
"key": "string",
"name": "string",
"edition": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
]Request:
{
"id": 0,
"key": "string",
"name": "string",
"edition": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the competition id. Example: /api/v1/competition?id=1
Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the competition id. Example: /api/v1/competition?id=1
Response:
{
"id": 0,
"key": "string",
"name": "string",
"edition": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}Request:
Receives the query object on the request url: Example: /api/v1/athletes?query={"fieldName": "string","condition": "string","value": "string"}
Response:
[
{
"id": 0,
"key": "string",
"name": "string",
"edition": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
]Request:
[
{
"id": 0,
"position": 0,
"played": 0,
"won": 0,
"drawn": 0,
"lost": 0,
"goalsFor": 0,
"goalsAgainst": 0,
"goalsDifference": 0,
"points": 0,
"clubId": 0,
"competitionId": 0,
"created": "string",
"updated": "string"
}
]Response:
[
{
"id": 0,
"position": 0,
"played": 0,
"won": 0,
"drawn": 0,
"lost": 0,
"goalsFor": 0,
"goalsAgainst": 0,
"goalsDifference": 0,
"points": 0,
"clubId": 0,
"competitionId": 0,
"created": "string",
"updated": "string"
}
]Request:
{
"id": 0,
"position": 0,
"played": 0,
"won": 0,
"drawn": 0,
"lost": 0,
"goalsFor": 0,
"goalsAgainst": 0,
"goalsDifference": 0,
"points": 0,
"clubId": 0,
"competitionId": 0,
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the competition id. Example: /api/v1/competitionBoard?id=1
Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the competition id. Example: /api/v1/competitionBoard?id=1
Response:
{
"id": 0,
"position": 0,
"played": 0,
"won": 0,
"drawn": 0,
"lost": 0,
"goalsFor": 0,
"goalsAgainst": 0,
"goalsDifference": 0,
"points": 0,
"clubId": 0,
"competitionId": 0,
"created": "string",
"updated": "string"
}This controller manages events data.

Request:
[
{
"id": 0,
"name": "string",
"description": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
]Response:
[
{
"id": 0,
"name": "string",
"description": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
]Request:
{
"id": 0,
"name": "string",
"description": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the event id. Example: /api/v1/event?id=1
Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the event id. Example: /api/v1/event?id=1
Response:
{
"id": 0,
"name": "string",
"description": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}Request:
Receives the query object on the request url: Example: /api/v1/athletes?query={"fieldName": "string","condition": "string","value": "string"}
Response:
[
{
"id": 0,
"name": "string",
"description": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
]This controller manages games data.

Request:
[
{
"id": 0,
"timeStart": "string",
"timeEnd": "string",
"homeColor": "string",
"visitorColor": "string",
"homeScore": 0,
"visitorScore": 0,
"homePenaltyScore": 0,
"visitorPenaltyScore": 0,
"status": 0,
"homeId": 0,
"visitorId": 0,
"competitionId": 0,
"imageId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}
]Response:
[
{
"id": 0,
"timeStart": "string",
"timeEnd": "string",
"homeColor": "string",
"visitorColor": "string",
"homeScore": 0,
"visitorScore": 0,
"homePenaltyScore": 0,
"visitorPenaltyScore": 0,
"status": 0,
"homeId": 0,
"visitorId": 0,
"competitionId": 0,
"imageId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}
]Request:
{
"id": 0,
"timeStart": "string",
"timeEnd": "string",
"homeColor": "string",
"visitorColor": "string",
"homeScore": 0,
"visitorScore": 0,
"homePenaltyScore": 0,
"visitorPenaltyScore": 0,
"status": 0,
"homeId": 0,
"visitorId": 0,
"competitionId": 0,
"imageId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the game id. Example: /api/v1/game?id=1
Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the game id. Example: /api/v1/game?id=1
Response:
{
"id": 0,
"timeStart": "string",
"timeEnd": "string",
"homeColor": "string",
"visitorColor": "string",
"homeScore": 0,
"visitorScore": 0,
"homePenaltyScore": 0,
"visitorPenaltyScore": 0,
"status": 0,
"homeId": 0,
"visitorId": 0,
"competitionId": 0,
"imageId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}Request:
Response:
[
{
"id": 0,
"timeStart": "string",
"timeEnd": "string",
"homeColor": "string",
"visitorColor": "string",
"homeScore": 0,
"visitorScore": 0,
"homePenaltyScore": 0,
"visitorPenaltyScore": 0,
"status": 0,
"homeId": 0,
"visitorId": 0,
"competitionId": 0,
"imageId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}
]Request:
[
{
"id": 0,
"key": "string",
"time": "string",
"gameTime": "string",
"eventDescription": "string",
"gameId": 0,
"eventId": 0,
"athleteId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}
]Response:
[
{
"id": 0,
"key": "string",
"time": "string",
"gameTime": "string",
"eventDescription": "string",
"gameId": 0,
"eventId": 0,
"athleteId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}
]Request:
{
"id": 0,
"key": "string",
"time": "string",
"gameTime": "string",
"eventDescription": "string",
"gameId": 0,
"eventId": 0,
"athleteId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the game event id. Example: /api/v1/gameEvent?id=1
Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the game event id. Example: /api/v1/gameEvent?id=1
Response:
{
"id": 0,
"key": "string",
"time": "string",
"gameTime": "string",
"eventDescription": "string",
"gameId": 0,
"eventId": 0,
"athleteId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}Request:
Receives the game id. Example: /api/v1/gameEvents?id=1
Response:
[
{
"id": 0,
"key": "string",
"time": "string",
"gameTime": "string",
"eventDescription": "string",
"gameId": 0,
"eventId": 0,
"athleteId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}
]Request:
[
{
"id": 0,
"status": 0,
"gameId": 0,
"athleteId": 0,
"created": "string",
"updated": "string"
}
]Response:
[
{
"id": 0,
"status": 0,
"gameId": 0,
"athleteId": 0,
"created": "string",
"updated": "string"
}
]Request:
{
"id": 0,
"status": 0,
"gameId": 0,
"athleteId": 0,
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the game id. Example: /api/v1/gameAthlete?id=1
Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the game id. Example: /api/v1/gameAthletes?id=1
Response:
[
{
"id": 0,
"status": 0,
"gameId": 0,
"athleteId": 0,
"created": "string",
"updated": "string"
}
]Request:
Receives the game id. Example: /api/v1/gameData?id=1
Response:
{
"game": {
"id": 0,
"timeStart": "string",
"timeEnd": "string",
"homeColor": "string",
"visitorColor": "string",
"homeScore": 0,
"visitorScore": 0,
"homePenaltyScore": 0,
"visitorPenaltyScore": 0,
"status": 0,
"homeId": 0,
"visitorId": 0,
"competitionId": 0,
"imageId": 0,
"userId": 0,
"created": "string",
"updated": "string"
},
"sport": {
"id": 0,
"name": "string",
"imageId": 0,
"created": "string",
"updated": "string"
},
"clubs": [
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"country": "string",
"founded": "string",
"colors": "string",
"members": "string",
"stadium": "string",
"address": "string",
"homepage": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}
],
"athletes": [
{
"id": 0,
"key": "string",
"name": "string",
"fullname": "string",
"birthDate": "string",
"birthPlace": "string",
"citizenship": "string",
"height": 0,
"weight": 0,
"position": "string",
"agent": "string",
"currentInternational": "string",
"status": "string",
"clubId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
],
"competition": {
"id": 0,
"key": "string",
"name": "string",
"edition": "string",
"sportId": 0,
"imageId": 0,
"created": "string",
"updated": "string"
},
"events": [
{
"id": 0,
"name": "string",
"description": "string",
"sportId": 0,
"imageId": 0,
"created": 0,
"updated": 0
}
],
"gameEvents": [
{
"id": 0,
"key": "string",
"time": "string",
"gameTime": "string",
"eventDescription": "string",
"gameId": 0,
"eventId": 0,
"athleteId": 0,
"userId": 0,
"created": "string",
"updated": "string"
}
]
}This controller manages images data.

Request:
[
{
"id": 0,
"image": "string",
"imageUrl": "string",
"created": "string",
"updated": "string"
}
]Response:
[
{
"id": 0,
"image": "string",
"imageUrl": "string",
"created": "string",
"updated": "string"
}
]Request:
{
"id": 0,
"image": "string",
"imageUrl": "string",
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the image id. Example: /api/v1/image?id=1
Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the image id. Example: /api/v1/image?id=1
Response:
{
"id": 0,
"image": "string",
"imageUrl": "string",
"created": "string",
"updated": "string"
}This controller manages sports data.

Request:
[
{
"id": 0,
"name": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}
]Response:
[
{
"id": 0,
"name": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}
]Request:
{
"id": 0,
"name": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the sport id. Example: /api/v1/sport?id=1
Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the sport id. Example: /api/v1/sport?id=1
Response:
{
"id": 0,
"name": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}Request:
Response:
[
{
"id": 0,
"name": "string",
"imageId": 0,
"created": "string",
"updated": "string"
}
]This controller manages users data.

Request:
{
"id": 0,
"username": "string",
"password": "string",
"email": "string",
"accessLevel": 0,
"notifications": 0,
"status": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Receives the new password. Example: /api/v1/changePassword?newPassword=password
Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
{
"id": 0,
"username": "string",
"password": "string",
"email": "string",
"accessLevel": 0,
"notifications": 0,
"status": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Empty. The authenticated user is removed.
Response:
{
"errorCode": 0,
"errorMessage": "string"
}Request:
Empty. The authenticated user is returned.
Response:
{
"id": 0,
"username": "string",
"password": "string",
"email": "string",
"accessLevel": 0,
"notifications": 0,
"status": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}Request:
Response:
[
{
"id": 0,
"username": "string",
"password": "string",
"email": "string",
"accessLevel": 0,
"notifications": 0,
"status": 0,
"imageId": 0,
"created": "string",
"updated": "string"
}
]Copyright © 2018-2022 | eScout