Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

The tag has no usage guidance.

2
votes
1answer
38 views

recommendations regarding resource uri

lets say we have a "door api" and I want to create a resource to close the door. I could do this in 3 ways: traditional way using PUT with payload {id: XX, color: YY, closed: true} advantages: ...
1
vote
1answer
28 views

How to represent/address content within multiple / different / stacked mime types?

I have a resource, let's say image.jpg. This image(along with other resources) is compressed in a .zip file (archive.zip) under the path /favimage/image.jpg. The archive is uploaded at http://example....
0
votes
1answer
99 views

Is a URC (Uniform Resource Citation) synonymous with a Query String or Url Parameters?

Reading this: https://renenyffenegger.ch/notes/development/web/URI-URL-URN-IRI-URC URCs provide a set of attribute/value pairs that describe properties of URIs like authorship, publisher, ...
0
votes
0answers
34 views

Resource routing based on source/host system

My organization is moving to a REST architecture and I have a small problem to solve. I have two admin systems that host products/resources of the same type and so I use a common pattern of an ...
0
votes
2answers
101 views

REST Resource design

Hi I'm working with an API Where an employee can see his Vacation (overview and balance) and Request new Vacation. A manager can Approve or Reject a Request for Vacation. He can also create Vacation ...
4
votes
5answers
193 views

RESTful URI map to database tables?

When designing a RESTful API, should your URI map to tables (for the most part). I have 2 tables that look like this: Users +-----------------------------------+ |id|first_name|last_name|email|role ...
5
votes
1answer
126 views

REST URI convention - Involves different resources

I am designing a REST API but came across some difficulties while naming it. I have an API like this: GET .../users/{userId}/categories/count GET .../users/{userId}/categories/{categoryId}/count ...
3
votes
3answers
164 views

Saving URI in database parsed vs plain

So I want to save different URIs in database. I want format to be forced as well to look up different URIs easily. Is it better to create table like this: CREATE TABLE uris ( id INT(11) UNIQUE ...
7
votes
2answers
254 views

Why include IDs of parent resources in REST endpoint?

Say I have a company directory application, so Companies have Employees. It's pretty clear to me why you would have the following GET endpoints: api/companies # Get all company records ...
1
vote
0answers
43 views

Expressing units as urn's

I have a program that processes measurements of different types, using different units. For example, kilometers, miles and meters. Or pounds, kilograms and ounces. Each value has to be associated with ...
1
vote
0answers
57 views

Restful flows for data entry

I'm considering a few different possible flows for a restful api. For minimum viable product, I'm assuming a web browser as the front end. Current use case: the task of the human operator is to ...
-1
votes
1answer
155 views

Is it safe to execute the “regedit” command on Windows? [closed]

I'm writing a Java application, I need to create a URI Scheme. I've seen a library creating a URI Scheme using the "regedit" command on Windows. Is it safe to execute "regedit" for this task? Is ...
13
votes
5answers
12k views

What is a URI Scheme?

I have searched for this question, but I haven't found a good answer. Even the Wikipedia Article on URIs does not explain it thoroughly. I thought it was the protocol for accessing a web page. e.g. ...
3
votes
1answer
855 views

URI construction for REST API and use of verbs as resource?

I have two questions. 1) I have a issue of understanding the correct URL construction for a REST API. For example, https://api.context.io/lite/users/id/email_accounts/label/folders/folder/messages/...
2
votes
2answers
1k views

Web API: avoiding name conflicts in URL query parameters

I am implementing a REST-like API and have just faced an interesting problem. There is a need to provide a resource with an open list of query parameters to filter the results. For example: GET /api/...
1
vote
0answers
261 views

URI naming scheme for assets shared between Android app users

A feature of my Android application is to allow users to choose graphical assets from a gallery view. Each asset is physically defined by an individual JSON file on the file system. The application ...
1
vote
1answer
2k views

MVC URL structure with URI parameters

When creating routes for your MVC web application I have seen two possible ways to pass variables to a controller method: With the first approach the variable is passed to a parameter of the ...
6
votes
1answer
662 views

How to design URIs to initate batch jobs in a RESTful service

If I want to run a job at the end of the month to calculate the commission for all the sales consultants based on the current transaction data, eg commission rate for the person, sales done in the ...
10
votes
2answers
4k views

What is the argument for singular nouns in RESTful API resource naming?

I understand that when naming RESTful URI's it is commonly accepted to use plurals to represent collections of resources. I am curious as to the argument for using singular nouns instead.
1
vote
1answer
2k views

URIs and Resource vs Resource representation

URL is an URI which identifies a resource by location. Resource representation is a view of resource's state. This view is encoded in one or more transferable formats, such as XHTML, Atom, XML, MP3 ....
4
votes
2answers
286 views

Why do XML namespace URIs use the http scheme?

A XML namespace should be a URI, but it can use any URI scheme, including those that are not URLs. Then why do all widely used XML namespaces use the http scheme (e.g. http://www.w3.org/XML/1998/...
0
votes
1answer
88 views

What is the appropriate Data URI to use for 0-byte content?

I have a method that generates a data URI from a byte array. In the event the input byte array is empty, what is the appropriate thing for the method to do? Here are the options I see: return data:, ...
1
vote
1answer
74 views

Is this mini-DSL for hiding URI passwords compatible with the URI spec?

Passwords exposed in URIs An application stores URIs to be used for file transfers via SFTP, FTP, FTPS and SCP. Many of these URIs contain passwords, for example: sftp://someuser:sekrit@host....