person-rest-api (1.0)

Download OpenAPI specification:Download

This is the specification of the person REST API endpoints.

persons

Manage the persons

List all the Persons

List all the Persons

Responses

200

OK

get /persons
http://localhost/persons

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    },
  • {
    }
]

Create a new instance of Person

Create a new instance of Person

Request Body schema: application/json

The person object to create

familyName
required
string

The family-name of the person

givenName
string

The given-name of the person

Responses

200

OK

400

Missing or invalid parameters

post /persons
http://localhost/persons

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "familyName": "Skywalker",
  • "givenName": "Luke"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "2a1152ee-4d77-4ff4-a811-598555937625",
  • "familyName": "Skywalker",
  • "givenName": "Luke"
}

Deletes all the Persons

Deletes all the Persons

Responses

204

No Content

delete /persons
http://localhost/persons

Get one Person

Get one Person

path Parameters
personId
required
string
Example: 2a1152ee-4d77-4ff4-a811-598555937625

The unique ID of the person to retrieve

Responses

200

OK

get /persons/{personId}
http://localhost/persons/{personId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "2a1152ee-4d77-4ff4-a811-598555937625",
  • "familyName": "Skywalker",
  • "givenName": "Luke"
}

Update a Person

Update a Person

path Parameters
personId
required
string
Example: 2a1152ee-4d77-4ff4-a811-598555937625

The unique ID of the person to update

Request Body schema: application/json

The person parameters

id
required
string

The unique ID of the person

familyName
required
string

The family-name of the person

givenName
required
string

The given-name of the person

Responses

200

OK

400

Missing or invalid parameters

put /persons/{personId}
http://localhost/persons/{personId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "2a1152ee-4d77-4ff4-a811-598555937625",
  • "familyName": "Skywalker",
  • "givenName": "Luke"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "2a1152ee-4d77-4ff4-a811-598555937625",
  • "familyName": "Skywalker",
  • "givenName": "Luke"
}

swagger

Static JSON format swagger file. Contains the specification of all endpoints provided by the persons.

Responses the files from the directory defined by the contentPath property

Responses

200

OK

get /api-docs/
http://localhost/api-docs/