function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
srikanthpallasrikanthpalla 

URI And Url difference in REST

HI

please let me know what is difference between URI and Url in REST APIs?i am confusing most ofthe times.
Best Answer chosen by srikanthpalla
Amit Chaudhary 8Amit Chaudhary 8
URI: Uniform Resource Identifier (URI) is a string of characters used to identify a name or a resource on the Internet. Such identification enables interaction with representations of the resource over a network (typically the World Wide Web) using specific protocols

URL: In computing, a Uniform Resource Locator (URL) is a subset of the Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it.

Example
To identify a specific resource and how to access it - in all completeness

URI: mysql://localhost@databasename:password

The URL shows you where you can find the database on the internet and which protocol you should use.
URL: mysql://localhost
User-added image


Please check below post for more information
1) https://developer.salesforce.com/page/Getting_Started_with_the_Chatter_REST_API
2) https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_url.htm
3) https://danielmiessler.com/study/url-uri/

Let us know if this will help you

Thanks
Amit Chaudhary

All Answers

Rupali PophaliyaRupali Pophaliya
Uniform Resource Identifier (URI) is a string of characters used to identify a name or a resource on the Internet.
A URI identifies a resource either by location or name. More often than not, most of us use URIs that defines a location to a resource. However, a URI does not have to specify the location of a specific representation. 
A URI has two specializations known as URL and URN.


A Uniform Resource Locator (URL) is a subset of the Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it. URL defines how the resource can be obtained. It does not have to be HTTP URL (http://), a URL can also be (ftp://) or (smb://)


https://quintupledev.wordpress.com/2016/02/29/difference-between-uri-url-and-urn/
Amit Chaudhary 8Amit Chaudhary 8
URI: Uniform Resource Identifier (URI) is a string of characters used to identify a name or a resource on the Internet. Such identification enables interaction with representations of the resource over a network (typically the World Wide Web) using specific protocols

URL: In computing, a Uniform Resource Locator (URL) is a subset of the Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it.

Example
To identify a specific resource and how to access it - in all completeness

URI: mysql://localhost@databasename:password

The URL shows you where you can find the database on the internet and which protocol you should use.
URL: mysql://localhost
User-added image


Please check below post for more information
1) https://developer.salesforce.com/page/Getting_Started_with_the_Chatter_REST_API
2) https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_url.htm
3) https://danielmiessler.com/study/url-uri/

Let us know if this will help you

Thanks
Amit Chaudhary
This was selected as the best answer