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

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -