Skip to content

HLD 2. Rest API

Sandro Ferreira edited this page Jul 1, 2020 · 4 revisions

Rest Endpoints Requests and Responses

By: Sandro Ferreira - Mar. 26, 2020

1. Schemas

1.1. User

{
  "id": 0,
  "username": "string",
  "password": "string",
  "email": "string",
  "accessLevel": 0,
  "notifications": 0,
  "status": 0,
  "imageId": 0,
  "created": "string",
  "updated": "string"
}

1.2. AuthData

{
  "token": "string",
  "tokenExpirationTime": 0,
  "id": "string"
}

1.3. SvcResult

{
  "errorCode": 0,
  "errorMessage": "string"
}

1.4. Athlete

{
  "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"
}

1.5. Club

{
  "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"
}

1.6. Competition

{
  "id": 0,
  "key": "string",
  "name": "string",
  "edition": "string",
  "sportId": 0,
  "imageId": 0,
  "created": "string",
  "updated": "string"
}

1.7. CompetitionBoard

{
  "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"
}

1.8. Event

{
  "id": 0,
  "key": "string",
  "name": "string",
  "description": "string",
  "sportId": 0,
  "imageId": 0,
  "created": "string",
  "updated": "string"
}

1.9. GameEvent

{
  "id": 0,
  "key": "string",
  "time": "string",
  "gameTime": "string",
  "eventDescription": "string",
  "gameId": 0,
  "eventId": 0,
  "athleteId": 0,
  "userId": 0,
  "created": "string",
  "updated": "string"
}

1.10. GameAthlete

{
  "id": 0,
  "status": 0,
  "gameId": 0,
  "athleteId": 0,
  "created": "string",
  "updated": "string"
}

1.11. GameUser

{
  "id": 0,
  "userId": 0,
  "gameId": 0,
  "athleteId": 0,
  "created": "string",
  "updated": "string"
}

1.12. Sport:

{
  "id": 0,
  "name": "string",
  "imageId": 0,
  "created": "string",
  "updated": "string"
}

1.13. Image:

{
  "id": 0,
  "image": "string",
  "imageUrl": "string",
  "created": "string",
  "updated": "string"
}

1.14. GameData:

{
  "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"
    }
  ]
}

2. Athletes

This controller manages athletes data.

2.1. POST - /api/v1/athlete

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"
  }
]

2.2. PUT - /api/v1/athlete

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"
}

2.3. DELETE - /api/v1/athlete

Request:

Receives the athlete id. Example: /api/v1/athlete?id=1

Response:

Returns the operation result.

{
  "errorCode": 0,
  "errorMessage": "string"
}

2.4. GET - /api/v1/athlete

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"
}

2.5. GET - /api/v1/athletes

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"
  }
]

3. Authentication

This controller manages SignIn and SignUp requests.

3.1. POST - /api/v1/signIn

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"
}

3.2. POST - /api/v1/signUp

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"
}

3.3. GET - /api/v1/authenticated

Request:

Empty.

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

4. Club

This controller manages clubs data.

4.1. POST - /api/v1/club

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"
  }
]

4.2. PUT - /api/v1/club

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"
}

4.3. DELETE - /api/v1/club

Request:

Example: /api/v1/club?id=1

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

4.4. GET - /api/v1/club

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"
}

4.5 GET - /api/v1/clubs

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"
  }
]

5. Competition

This controller manages competitions data.

5.1. POST - /api/v1/competition

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"
  }
]

5.2. PUT - /api/v1/competition

Request:

{
  "id": 0,
  "key": "string",
  "name": "string",
  "edition": "string",
  "sportId": 0,
  "imageId": 0,
  "created": "string",
  "updated": "string"
}

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

5.3. DELETE - /api/v1/competition

Request:

Receives the competition id. Example: /api/v1/competition?id=1

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

5.4. GET - /api/v1/competition

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"
}

5.5. GET - /api/v1/competitions

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"
  }
]

5.6. POST - /api/v1/competitionBoard

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"
  }
]

5.7. PUT - /api/v1/competitionBoard

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"
}

5.8. DELETE - /api/v1/competitionBoard

Request:

Receives the competition id. Example: /api/v1/competitionBoard?id=1

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

5.9. GET - /api/v1/competitionBoard

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"
}

6. Event

This controller manages events data.

6.1. POST - /api/v1/event

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"
  }
]

6.2. PUT - /api/v1/event

Request:

{
  "id": 0,
  "name": "string",
  "description": "string",
  "sportId": 0,
  "imageId": 0,
  "created": "string",
  "updated": "string"
}

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

6.3. DELETE - /api/v1/event

Request:

Receives the event id. Example: /api/v1/event?id=1

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

6.4. GET - /api/v1/event

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"
}

6.5. GET - /api/v1/events

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"
  }
]

7. Game

This controller manages games data.

7.1. POST - /api/v1/game

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"
  }
]

7.2. PUT - /api/v1/game

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"
}

7.3. DELETE - /api/v1/game

Request:

Receives the game id. Example: /api/v1/game?id=1

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

7.4. GET - /api/v1/game

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"
}

7.5. GET - /api/v1/games

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"
  }
]

7.6. POST - /api/v1/gameEvent

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"
  }
]

7.7. PUT - /api/v1/gameEvent

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"
}

7.8. DELETE - /api/v1/gameEvent

Request:

Receives the game event id. Example: /api/v1/gameEvent?id=1

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

7.9. GET - /api/v1/gameEvent

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"
}

7.10. GET - /api/v1/gameEvents

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"
  }
]

7.11. POST - /api/v1/gameAthlete

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"
  }
]

7.12. PUT - /api/v1/gameAthlete

Request:

{
  "id": 0,
  "status": 0,
  "gameId": 0,
  "athleteId": 0,
  "created": "string",
  "updated": "string"
}

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

7.13. DELETE - /api/v1/gameAthlete

Request:

Receives the game id. Example: /api/v1/gameAthlete?id=1

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

7.14. GET - /api/v1/gameAthletes

Request:

Receives the game id. Example: /api/v1/gameAthletes?id=1

Response:

[
  {
    "id": 0,
    "status": 0,
    "gameId": 0,
    "athleteId": 0,
    "created": "string",
    "updated": "string"
  }
]

7.15. GET - /api/v1/gameData

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"
    }
  ]
}

8. Image

This controller manages images data.

8.1. POST - /api/v1/image

Request:

[
  {
    "id": 0,
    "image": "string",
    "imageUrl": "string",
    "created": "string",
    "updated": "string"
  }
]

Response:

[
  {
    "id": 0,
    "image": "string",
    "imageUrl": "string",
    "created": "string",
    "updated": "string"
  }
]

8.2. PUT - /api/v1/image

Request:

{
  "id": 0,
  "image": "string",
  "imageUrl": "string",
  "created": "string",
  "updated": "string"
}

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

8.3. DELETE - /api/v1/image

Request:

Receives the image id. Example: /api/v1/image?id=1

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

8.4. GET - /api/v1/image

Request:

Receives the image id. Example: /api/v1/image?id=1

Response:

{
  "id": 0,
  "image": "string",
  "imageUrl": "string",
  "created": "string",
  "updated": "string"
}

9. Sport

This controller manages sports data.

9.1. POST - ​/api​/v1​/sport

Request:

[
  {
    "id": 0,
    "name": "string",
    "imageId": 0,
    "created": "string",
    "updated": "string"
  }
]

Response:

[
  {
    "id": 0,
    "name": "string",
    "imageId": 0,
    "created": "string",
    "updated": "string"
  }
]

9.2. PUT - /api​/v1​/sport

Request:

{
  "id": 0,
  "name": "string",
  "imageId": 0,
  "created": "string",
  "updated": "string"
}

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

9.3. DELETE - /api​/v1​/sport

Request:

Receives the sport id. Example: /api/v1/sport?id=1

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

9.4. GET - /api​/v1​/sport

Request:

Receives the sport id. Example: /api/v1/sport?id=1

Response:

{
  "id": 0,
  "name": "string",
  "imageId": 0,
  "created": "string",
  "updated": "string"
}

9.5. GET - /api​/v1​/sports

Request:

Response:

[
  {
    "id": 0,
    "name": "string",
    "imageId": 0,
    "created": "string",
    "updated": "string"
  }
]

10. User

This controller manages users data.

10.1. POST - /api/v1/resetPassword

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"
}

10.2. POST - /api/v1/changePassword

Request:

Receives the new password. Example: /api/v1/changePassword?newPassword=password

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

10.3. PUT - /api/v1/user

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"
}

10.4. DELETE - /api/v1/user

Request:

Empty. The authenticated user is removed.

Response:

{
  "errorCode": 0,
  "errorMessage": "string"
}

10.5. GET - /api/v1/user

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"
}

10.6. GET - /api/v1/users

Request:

Response:

[
  {
    "id": 0,
    "username": "string",
    "password": "string",
    "email": "string",
    "accessLevel": 0,
    "notifications": 0,
    "status": 0,
    "imageId": 0,
    "created": "string",
    "updated": "string"
  }
]

Clone this wiki locally