Wikipedia has:
Uniform interface
The uniform interface constraint is fundamental to the design of any REST service.[14] The uniform i
The Uniform Interface constraint, that any ReSTful architecture should comply with, actually means that, along with the data, server responses should also announce available actions and resources.
In chapter 5 of his dissertation, Roy Fielding (originator of the ReST architectural style) states that the aim of using uniform interfaces is to "ease and improve global architecture and the visibility of interactions".
In other words, querying resources should allow the client to request other actions and resources without knowing them in advance.
JSON-API spec offers a good example:
{
"links": {
"self": "http://example.com/articles",
"next": "http://example.com/articles?page[offset]=2",
"last": "http://example.com/articles?page[offset]=10"
},
"data": [{
"type": "articles",
"id": "1",
"attributes": {
"title": "JSON API paints my bikeshed!"
},
"relationships": {
"author": {
"links": {
"self": "http://example.com/articles/1/relationships/author",
"related": "http://example.com/articles/1/author"
},
},
"comments": {
"links": {
"self": "http://example.com/articles/1/relationships/comments",
"related": "http://example.com/articles/1/comments"
}
}
},
"links": {
"self": "http://example.com/articles/1"
}
}]
}
Just by analysing this single response, a client knows:
articles
in this example)id
, title
, author
, comments
)author
, list of comments
)10
, based on current response length and pagination links)I Hope this helps.
For those passionate about the topic, I strongly recommend reading Roy Thomas Fielding's dissertation!