returns a list of all persons filtered by street and/or zipcode as json if neither street nor zipcode is specified return a list of all persons
Succes
[
{
"id": 1,
"email": "xxx",
"name": "xxx",
"zipCode": 1234,
"phones": [12345678, 23456789, ...],
"hobbies": ["hobby1", "hobby2", ...]
},
{...}
]
Fejl forbindelse
{
"statusCode": 404,
"message": "xxx",
"description": "xxx"
}
newlines added for readability
returns a list of persons with a specific hobby as json
Succes
[
{
"id": 1,
"email": "xxx",
"name": "xxx",
"zipCode": 1234,
"phones": [12345678, 23456789, ...],
"hobbies": ["hobby1", "hobby2", ...]
},
{...}
]
Fejl forbindelse
{
"statusCode": 404,
"message": "xxx",
"description": "xxx"
}
newlines added for readability
returns a person with the specific id as json
Succes
{
"id": 1,
"email": "xxx",
"name": "xxx",
"zipCode": 1234,
"phones": [12345678, 23456789, ...],
"hobbies": ["hobby1", "hobby2", ...]
}
Fejl forbindelse
{
"statusCode": 404,
"message": "xxx",
"description": "xxx"
}
newlines added for readability
returns a person with the specific email as json
Succes
{
"id": 1,
"email": "xxx",
"name": "xxx",
"zipCode": 1234,
"phones": [12345678, 23456789, ...],
"hobbies": ["hobby1", "hobby2", ...]
}
Fejl forbindelse
{
"statusCode": 404,
"message": "xxx",
"description": "xxx"
}
newlines added for readability
Consumes json
{
"firstName": "Daniel",
"lastName": "Lindholm",
"email": "mail@mail.dk"
}
returns the new person as json Succes
{
"firstName": "xxx",
"lastName": "xxx",
"id": 1,
"email": "xxx"
}
Fejl forbindelse
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
newlines added for readability
Consumes json
{
"id": 1,
"firstName": "Daniel",
"lastName": "Lindholm",
"email": "mail@mail.dk"
}
returns the modified person Succes
{
"id": 1,
"email": "xxx",
"name": "xxx",
"zipCode": 1234,
"phones": [12345678, 23456789, ...],
"hobbies": ["hobby1", "hobby2", ...]
}
Fejl forbindelse
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
newlines added for readability
returns a list of all companies
url filters:
set minimum marketvalue
?valuemin=5
set maximum marketvalue
?valuemax=2500
set minimum employee count
?empmin=400
set maximum employee count
?empmax=400
only allow companies with an address on a certain street
?street=nørgaardsvej
only allow companies with an address on in a certain area
?zipcode=2800
Fuldført forbindelse
[
{
"id": 1,
"name": "Testcompany",
"email": "test@company.dk",
"address": "Nørgaardsvej 30",
"zipCode": 2800,
"city": "Lyngby",
"cvr": "554-1122-33",
"description": "beskrivelsen",
"numEmployees": 500,
"marketValue": 2000,
"phones": [
"83838485",
"12345678"
]
},
{
"id": 2,
"name": "Testcompany",
"email": "test@company.dk",
"address": "Nørgaardsvej 30",
"zipCode": 2800,
"city": "Lyngby",
"cvr": "554-1122-33",
"description": "beskrivelsen",
"numEmployees": 500,
"marketValue": 2000,
"phones": [
"83838485",
"12345678"
]
},
{
"id": 3,
"name": "Testcompany",
"email": "test@company.dk",
"address": "Nørgaardsvej 30",
"zipCode": 2800,
"city": "Lyngby",
"cvr": "554-1122-33",
"description": "beskrivelsen",
"numEmployees": 500,
"marketValue": 2000,
"phones": [
"83838485",
"12345678"
]
}
]
Fejl forbindelse
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
returns a company with specific name
Fuldført forbindelse
{
"name": "name",
"description": "description",
"cvr": "cvr",
"numEmployees": "numEmployees",
"marketValue": "marketValue"
}
Fejl forbindelse
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
returns a company with specific cvr
Fuldført forbindelse
{
"name": "name",
"description": "description",
"cvr": "cvr",
"numEmployees": "numEmployees",
"marketValue": "marketValue"
}
Fejl forbindelse
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
returns a company with specific id
Fuldført forbindelse
{
"name": "name",
"description": "description",
"cvr": "cvr",
"numEmployees": "numEmployees",
"marketValue": "marketValue"
}
Fejl forbindelse
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
returns a company with specific phone number
Fuldført forbindelse
{
"name": "name",
"description": "description",
"cvr": "cvr",
"numEmployees": "numEmployees",
"marketValue": "marketValue"
}
Fejl forbindelse
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
returns a company with specific email
Fuldført forbindelse
{
"name": "name",
"description": "description",
"cvr": "cvr",
"numEmployees": "numEmployees",
"marketValue": "marketValue"
}
Fejl forbindelse
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
Consumes json
{
"name": "Daniel",
"email": "test@test.dk",
"cvr": "55-2355-6-63",
"description": "beskrivelsen",
"numEmployees": 500,
"marketValue": 2000
}
Succes
{
"id": 11,
"name": "Daniel",
"email": "test@test.dk",
"cvr": "55-2355-6-63",
"description": "beskrivelsen",
"numEmployees": 500,
"marketValue": 2000
}
Fejl forbindelse
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
Consumes json
{
"id": 11,
"name": "Daniel",
"email": "test@test.dk",
"cvr": "55-2355-6-63",
"description": "beskrivelsen",
"numEmployees": 500,
"marketValue": 2000
}
Succes
{
"id": 11,
"name": "Daniel",
"email": "test@test.dk",
"address": "Pedersvej 24",
"zipCode": 2680,
"city": "Solrød",
"cvr": "55-2355-6-63",
"description": "beskrivelsen",
"numEmployees": 500,
"marketValue": 2000,
"phones": [
"83838485",
"12345678"
]
}
Fejl forbindelse
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
City
returns a list of all cities
{
"zipCode": 555,
"city": "Scanning",
"addresses": ["Mariegade 1", "Emilievej 1", ...]
},
{...}
Error
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
returns a specific city
{
"zipCode": 555,
"city": "Scanning",
"addresses": ["Mariegade 1", "Emilievej 1", ...]
}
Error
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
Hobby
returns a list of all hobbies
{
"id": 1,
"name": "Fodbold",
"description": "at sparke til en bold",
"people": ["Maria Astaberg", "Gitte Astridhøj", "Lars Villumhøj", ...]
},
{...}
Error
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
returns a specific hobby
Success
{
"id": 1,
"name": "Fodbold",
"description": "at sparke til en bold",
"people": ["Maria Astaberg", "Gitte Astridhøj", "Lars Villumhøj", ...]
}
Error
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
returns a list of all phone numbers
Success
{
"number": "10275229",
"description": "Mobil",
"infoEntity": "Maria Astaberg"
},
{...}
Error
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
returns a specific phone number
Success
{
"number": "10275229",
"description": "Mobil",
"infoEntity": "Maria Astaberg"
}
Error
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
adds a specific phone number
Success
{
"number": "10275229",
"description": "Mobil",
"infoEntityId": "9"
}
Error
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
adds a specific phone number
Consumes
{
"description": "Mobil"
}
Success
{
"number": "10275229",
"description": "Mobil",
"infoEntityId": "9"
}
Error
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
Address
returns a list of all adresses
Success
{
"id": 1,
"address": "Mariegade 1",
"persons": ["Bente Arthurholm", ...],
"city": "Scanning",
"zipCode": 555
},
{...}
Error
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}
returns a list of all adresses with specific sip code
Success
{
"id": 1,
"address": "Mariegade 1",
"persons": ["Bente Arthurholm", ...],
"city": "Scanning",
"zipCode": 555
},
{...}
Error
{
"statusCode": 500,
"message": "xxx",
"description": "xxx"
}