POST api/League/CreateLeague

Request Information

URI Parameters

None.

Body Parameters

LeagueDTO
NameDescriptionTypeAdditional information
League

League

None.

Matches

Collection of Match

None.

Request Formats

application/json, text/json

Sample:
{
  "League": {
    "Titel": "sample string 1",
    "Afdeling": 0,
    "Matches": [
      {
        "Date": "sample string 1",
        "HomeTeam": "sample string 2",
        "AwayTeam": "sample string 3",
        "HomeTeamPoints": 4,
        "AwayTeamPoints": 5,
        "Afdeling": 0,
        "Id": 6,
        "Created": "2019-10-15T05:47:17.0525217+02:00",
        "CreatedBy": "sample string 7",
        "Modified": "2019-10-15T05:47:17.0525217+02:00",
        "ModifiedBy": "sample string 8"
      },
      {
        "Date": "sample string 1",
        "HomeTeam": "sample string 2",
        "AwayTeam": "sample string 3",
        "HomeTeamPoints": 4,
        "AwayTeamPoints": 5,
        "Afdeling": 0,
        "Id": 6,
        "Created": "2019-10-15T05:47:17.0525217+02:00",
        "CreatedBy": "sample string 7",
        "Modified": "2019-10-15T05:47:17.0525217+02:00",
        "ModifiedBy": "sample string 8"
      }
    ],
    "Status": 0,
    "Id": 2,
    "Created": "2019-10-15T05:47:17.0525217+02:00",
    "CreatedBy": "sample string 3",
    "Modified": "2019-10-15T05:47:17.0525217+02:00",
    "ModifiedBy": "sample string 4"
  },
  "Matches": [
    {
      "Date": "sample string 1",
      "HomeTeam": "sample string 2",
      "AwayTeam": "sample string 3",
      "HomeTeamPoints": 4,
      "AwayTeamPoints": 5,
      "Afdeling": 0,
      "Id": 6,
      "Created": "2019-10-15T05:47:17.0525217+02:00",
      "CreatedBy": "sample string 7",
      "Modified": "2019-10-15T05:47:17.0525217+02:00",
      "ModifiedBy": "sample string 8"
    },
    {
      "Date": "sample string 1",
      "HomeTeam": "sample string 2",
      "AwayTeam": "sample string 3",
      "HomeTeamPoints": 4,
      "AwayTeamPoints": 5,
      "Afdeling": 0,
      "Id": 6,
      "Created": "2019-10-15T05:47:17.0525217+02:00",
      "CreatedBy": "sample string 7",
      "Modified": "2019-10-15T05:47:17.0525217+02:00",
      "ModifiedBy": "sample string 8"
    }
  ]
}

application/xml, text/xml

Sample:
<LeagueDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Model.DTOClasses">
  <League xmlns:d2p1="http://schemas.datacontract.org/2004/07/Model">
    <Created xmlns="http://schemas.datacontract.org/2004/07/Model.Base">2019-10-15T05:47:17.0525217+02:00</Created>
    <CreatedBy xmlns="http://schemas.datacontract.org/2004/07/Model.Base">sample string 3</CreatedBy>
    <Id xmlns="http://schemas.datacontract.org/2004/07/Model.Base">2</Id>
    <Modified xmlns="http://schemas.datacontract.org/2004/07/Model.Base">2019-10-15T05:47:17.0525217+02:00</Modified>
    <ModifiedBy xmlns="http://schemas.datacontract.org/2004/07/Model.Base">sample string 4</ModifiedBy>
    <d2p1:Afdeling>Håndbold</d2p1:Afdeling>
    <d2p1:Matches>
      <d2p1:Match>
        <Created xmlns="http://schemas.datacontract.org/2004/07/Model.Base">2019-10-15T05:47:17.0525217+02:00</Created>
        <CreatedBy xmlns="http://schemas.datacontract.org/2004/07/Model.Base">sample string 7</CreatedBy>
        <Id xmlns="http://schemas.datacontract.org/2004/07/Model.Base">6</Id>
        <Modified xmlns="http://schemas.datacontract.org/2004/07/Model.Base">2019-10-15T05:47:17.0525217+02:00</Modified>
        <ModifiedBy xmlns="http://schemas.datacontract.org/2004/07/Model.Base">sample string 8</ModifiedBy>
        <d2p1:Afdeling>Håndbold</d2p1:Afdeling>
        <d2p1:AwayTeam>sample string 3</d2p1:AwayTeam>
        <d2p1:AwayTeamPoints>5</d2p1:AwayTeamPoints>
        <d2p1:Date>sample string 1</d2p1:Date>
        <d2p1:HomeTeam>sample string 2</d2p1:HomeTeam>
        <d2p1:HomeTeamPoints>4</d2p1:HomeTeamPoints>
      </d2p1:Match>
      <d2p1:Match>
        <Created xmlns="http://schemas.datacontract.org/2004/07/Model.Base">2019-10-15T05:47:17.0525217+02:00</Created>
        <CreatedBy xmlns="http://schemas.datacontract.org/2004/07/Model.Base">sample string 7</CreatedBy>
        <Id xmlns="http://schemas.datacontract.org/2004/07/Model.Base">6</Id>
        <Modified xmlns="http://schemas.datacontract.org/2004/07/Model.Base">2019-10-15T05:47:17.0525217+02:00</Modified>
        <ModifiedBy xmlns="http://schemas.datacontract.org/2004/07/Model.Base">sample string 8</ModifiedBy>
        <d2p1:Afdeling>Håndbold</d2p1:Afdeling>
        <d2p1:AwayTeam>sample string 3</d2p1:AwayTeam>
        <d2p1:AwayTeamPoints>5</d2p1:AwayTeamPoints>
        <d2p1:Date>sample string 1</d2p1:Date>
        <d2p1:HomeTeam>sample string 2</d2p1:HomeTeam>
        <d2p1:HomeTeamPoints>4</d2p1:HomeTeamPoints>
      </d2p1:Match>
    </d2p1:Matches>
    <d2p1:Status>Aktiv</d2p1:Status>
    <d2p1:Titel>sample string 1</d2p1:Titel>
  </League>
  <Matches xmlns:d2p1="http://schemas.datacontract.org/2004/07/Model">
    <d2p1:Match>
      <Created xmlns="http://schemas.datacontract.org/2004/07/Model.Base">2019-10-15T05:47:17.0525217+02:00</Created>
      <CreatedBy xmlns="http://schemas.datacontract.org/2004/07/Model.Base">sample string 7</CreatedBy>
      <Id xmlns="http://schemas.datacontract.org/2004/07/Model.Base">6</Id>
      <Modified xmlns="http://schemas.datacontract.org/2004/07/Model.Base">2019-10-15T05:47:17.0525217+02:00</Modified>
      <ModifiedBy xmlns="http://schemas.datacontract.org/2004/07/Model.Base">sample string 8</ModifiedBy>
      <d2p1:Afdeling>Håndbold</d2p1:Afdeling>
      <d2p1:AwayTeam>sample string 3</d2p1:AwayTeam>
      <d2p1:AwayTeamPoints>5</d2p1:AwayTeamPoints>
      <d2p1:Date>sample string 1</d2p1:Date>
      <d2p1:HomeTeam>sample string 2</d2p1:HomeTeam>
      <d2p1:HomeTeamPoints>4</d2p1:HomeTeamPoints>
    </d2p1:Match>
    <d2p1:Match>
      <Created xmlns="http://schemas.datacontract.org/2004/07/Model.Base">2019-10-15T05:47:17.0525217+02:00</Created>
      <CreatedBy xmlns="http://schemas.datacontract.org/2004/07/Model.Base">sample string 7</CreatedBy>
      <Id xmlns="http://schemas.datacontract.org/2004/07/Model.Base">6</Id>
      <Modified xmlns="http://schemas.datacontract.org/2004/07/Model.Base">2019-10-15T05:47:17.0525217+02:00</Modified>
      <ModifiedBy xmlns="http://schemas.datacontract.org/2004/07/Model.Base">sample string 8</ModifiedBy>
      <d2p1:Afdeling>Håndbold</d2p1:Afdeling>
      <d2p1:AwayTeam>sample string 3</d2p1:AwayTeam>
      <d2p1:AwayTeamPoints>5</d2p1:AwayTeamPoints>
      <d2p1:Date>sample string 1</d2p1:Date>
      <d2p1:HomeTeam>sample string 2</d2p1:HomeTeam>
      <d2p1:HomeTeamPoints>4</d2p1:HomeTeamPoints>
    </d2p1:Match>
  </Matches>
</LeagueDTO>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ServiceResultOfBoolean
NameDescriptionTypeAdditional information
Success

boolean

None.

ErrorMessage

string

None.

SuccessMessage

string

None.

Result

boolean

None.

StatusCode

HttpStatusCode

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "ErrorMessage": "sample string 2",
  "SuccessMessage": "sample string 3",
  "Result": true,
  "StatusCode": 100
}

application/xml, text/xml

Sample:
<ServiceResultOfboolean xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Model">
  <ErrorMessage>sample string 2</ErrorMessage>
  <Result>true</Result>
  <StatusCode>Continue</StatusCode>
  <Success>true</Success>
  <SuccessMessage>sample string 3</SuccessMessage>
</ServiceResultOfboolean>