A simple CRUD example with Spring Data JPA using multiple associations
Requests to the API must follow the standards:
Method | Description |
---|---|
GET |
Retrieve information about the resource. |
POST |
Create a new resource. |
PUT |
Update a resource. |
DELETE |
Delete a resource or related component. |
-
Request (application/json)
-
Response 200 (application/json)
[
{
"id": 1,
"name": "Eukarya",
"kingdom": "Plantae"
}
]
-
Attributes (object)
- name: name of domain
- kingdom: child kingdom
-
Request (application/json)
- Body
{
"name": "Eukarya",
"kingdom": "Plantae"
}
- Response 200
Domain created successfully
-
Attributes (object)
- domain_id: id of domain
-
Request (application/json)
- Body
{
"domain_id": "3"
}
- Response 200
Domain deleted successfully