java - Create PUT and POST endpoints in a REST API, without creating a GET endpoint? -


i writing endpoints resource items, subresource of applications, this: applications/{:id}/items. both, items , applications have other properties apart name.

i have created

  • get applications/{:applicationid}/items - returns list of items belong application

  • post applications/{:applicationid}/items - creates item application

  • put applications/{:applicationid}/items/{:itemnumber} - updates item of application

the clients interested see list of items application , not individual items, team thinks creating endpoint

get applications/{:applicationid}/items/{:itemnumber}

is unnecessary. wondering if bad idea not create such endpoint considering have post , put endpoints same resource.

it acceptable create put without matching get.

if find need @ later date can add it; if create before need it, carrying code neither needed nor used, still have maintain , test it.

if don't want test or maintain it, should delete it.

there no bugs in deleted code


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

php - Cannot override Laravel Spark authentication with own implementation -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -