Highlighted

Optional arguments for a GET REST web service

New Here ,
Aug 17, 2015

Copy link to clipboard

Copied

Can one use optional argument for a GET REST service?  For example:

http://somesite/rest/someservice/{year}/

or

http://somesite/rest/someservice/{year}/{catalognumber}

In the first case, it returns all the catalog information given a year.  In the second case, it only returns information for a given year and catalognumber?

How may I proceed in accomplishing that?  Thanks in advance.

Views

105

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Optional arguments for a GET REST web service

New Here ,
Aug 17, 2015

Copy link to clipboard

Copied

Can one use optional argument for a GET REST service?  For example:

http://somesite/rest/someservice/{year}/

or

http://somesite/rest/someservice/{year}/{catalognumber}

In the first case, it returns all the catalog information given a year.  In the second case, it only returns information for a given year and catalognumber?

How may I proceed in accomplishing that?  Thanks in advance.

Views

106

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 17, 2015 0

Have something to add?

Join the conversation