<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aman Panjwani on Medium]]></title>
        <description><![CDATA[Stories by Aman Panjwani on Medium]]></description>
        <link>https://medium.com/@amanpanjavani111?source=rss-1d7a4fb3920c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vFHxryBhD8BwI-Ja</url>
            <title>Stories by Aman Panjwani on Medium</title>
            <link>https://medium.com/@amanpanjavani111?source=rss-1d7a4fb3920c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 01:23:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amanpanjavani111/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[SharePoint Rest API: A Guide to Various Rest API Endpoints]]></title>
            <link>https://medium.com/@amanpanjavani111/sharepoint-rest-api-a-guide-to-various-rest-api-endpoints-abe6f1f66f94?source=rss-1d7a4fb3920c------2</link>
            <guid isPermaLink="false">https://medium.com/p/abe6f1f66f94</guid>
            <category><![CDATA[sharepoint-online]]></category>
            <category><![CDATA[sharepoint-list]]></category>
            <category><![CDATA[sharepoint-library]]></category>
            <category><![CDATA[sharepoint]]></category>
            <category><![CDATA[rest-api]]></category>
            <dc:creator><![CDATA[Aman Panjwani]]></dc:creator>
            <pubDate>Sun, 30 Jul 2023 03:55:49 GMT</pubDate>
            <atom:updated>2023-07-30T03:55:49.408Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*LahbPVOdpUlp96myroNtUw.jpeg" /></figure><p><strong>Introduction:</strong></p><p>In this article, we’ll walk through SharePoint REST API and how it can help us in our business. With Rest API, we can use different endpoints to get things done faster and be more productive. It’s a powerful tool that can make our work easier and more efficient. Let’s see how we can make the most out of it!</p><p><strong>What is SharePoint Rest API:</strong></p><p>As we all know that REST API (Representational State Transfer Application Programming Interface) is a way for different software applications to talk to each other over the internet. It allows us to exchange data across various software&#39;s to perform our tasks seamlessly.</p><p>SharePoint Rest API works in the Similar pattern it helps us to remotely work with SharePoint Sites and its data into our Application which supports standard REST capabilities.</p><p><strong>How SharePoint Rest API works behind the scenes:</strong></p><p>Let’s understand this with the help of little Imagination.</p><p>Imagine SharePoint as a big digital warehouse where we can store and manage our files, documents, and other data. The REST API is like the magical door that allows us to interact with this warehouse and let’s us to perform various actions.</p><p>Now how is it gonna allow us to perform actions?</p><ul><li>Users can interact with SharePoint by sending HTTP requests to perform various actions.</li><li>Data is exchanged in a simple JSON format, facilitating understanding between users and SharePoint.</li><li>Prior authentication ensures secure access to the warehouse in terms of adding, updating or deleting something from the SharePoint warehouse.</li><li>SharePoint responds to requests with status codes indicating success or errors.</li></ul><p>Also, SharePoint Rest API works on <a href="https://en.wikipedia.org/wiki/Open_Data_Protocol"><strong>Open Data Protocol (OData)</strong></a> which allows to perform tasks such as building APIs for web and mobile applications, integrating data from different sources, and enabling data sharing between organizations.</p><p>Ultimately, the REST API smplifies data management, enabling users to efficiently navigate and manipulate their files within SharePoint’s system.</p><p><strong>SharePoint REST Endpoint Examples:</strong></p><p>To embark on your journey with the SharePoint REST API, the first step is to generate a REST endpoint. Every REST endpoint URL commences with:</p><pre>https:///{site_url}/_api/</pre><p>Further this endpoint is classified in two groups:</p><p>To access a specific site collection, we use the following construction:</p><pre>https://{site_url}/_api/site</pre><p>This endpoint represents the root site of a SharePoint site collection. When we make a request to this endpoint, we are accessing information and operations related to the entire site collection.</p><p>To access a specific site, we use the following construction:</p><pre>https://{site_url}/_api/web</pre><p>This endpoint represents the current web (or site) within the SharePoint site collection. When we make a request to this endpoint, we are accessing information and operations specific to the individual site (web) that the URL points to.</p><p>Here are various SharePoint REST API endpoint examples.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/23115035715acaa1be3697a6e9e455a1/href">https://medium.com/media/23115035715acaa1be3697a6e9e455a1/href</a></iframe><p><strong>Conclusion:</strong></p><p>So this was brief about what SharePoint Rest API is, how it works and what are the different endpoints we can use in order to get our things done.</p><p>Hope this Article has provided you insight about the SharePoint Rest API.</p><p>You can Join me on <a href="https://www.linkedin.com/in/aman-17-panjwani/">LinkedIn </a>to follow my learning journey and stay updated with my latest insights and discoveries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abe6f1f66f94" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding of RESTful APIs and the Best Practices]]></title>
            <link>https://medium.com/@amanpanjavani111/understanding-of-restful-apis-and-the-best-practices-2ced179dd58?source=rss-1d7a4fb3920c------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ced179dd58</guid>
            <category><![CDATA[rest-web-service]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[restful-api]]></category>
            <dc:creator><![CDATA[Aman Panjwani]]></dc:creator>
            <pubDate>Mon, 27 Jun 2022 03:46:03 GMT</pubDate>
            <atom:updated>2022-06-27T03:46:03.891Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*Wr-9vfmhP3nSTnl1E5M3iA.png" /></figure><p>A RESTful API is an architectural style for an Application program interface (API).</p><p><strong>So, What is API ??🤔</strong></p><p>API is defined as an Interface that helps two different software’s to communicate and exchange data with each other. It offers various services between two products without knowing the implementation of that service.</p><p>Let’s Understand with the help of Day to Day life Example</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zzKpYJMuB8DYf5Twp2t8Rw.png" /></figure><p>API works like a waiter serving a Customer in a restaurant. Whenever we go to the restaurant we are handed a menu of items from which we can request some of the items as per our instructions, How are we gonna need those items and tell the waiter to bring them up.</p><p>Now, the Waiter working as our API will go and give our requested items to the kitchen team who will prepare the items with our specified instructions and hand them over to the waiter again.</p><p>Now the waiter will bring all the items and serves them on the table and we can review whether all the items that are requested by us with specified instructions have been received or not.</p><p>The waiter in this scenario plays a similar role to an API in web-based data delivery.</p><p>We can think of it as an API a Gateway between a client and a web resource.</p><p>Okay, then what’s the need for REST Prefix in API?😴</p><h4>What is REST?</h4><p>REST Stands for <strong>Representational State Transfer</strong> states instructions and imposes some regulations that how API Should work. REST is nothing but an Architectural Pattern used in order to develop an API. APIs Which are built on top of REST architecture is known as RESTful APIs.</p><p>REST Architectural Pattern Consist of some of the Principles:</p><h4>Uniform interface:</h4><p>The uniform interface constraint is fundamental to the design of any REST service. It States that the Interface through which we are interacting with the server should be Uniform irrespective of any device or type of application (website, mobile app).</p><p>All the resources are identified from the request if we wanna access the user name Julio Kamile then we can navigate to a URL Pattern like</p><pre>API/users/JulioKamile</pre><p>A Message That is returned to the client when a client requests something should be pretty straightforward so that client can take action by understanding that message.</p><p>After the response is rendered to the client’s Machine then the client can navigate to other actions using hyperlinks so the client should be able to use hyperlinks.</p><p>The client has all the representation of the resources and this contains enough information to update or delete the resource onto the server if the client has been given permission.</p><h4><strong>Stateless</strong>:</h4><p>As all the information required to handle the request is directly included in the request itself server would not store anything related to the request and session.</p><p>In REST Pattern client need to embed all the information regarding the request in the request header itself using Query Parameters, Headers, and URI for the Server to respond accordingly.</p><h4>Cacheable:</h4><p>Cacheable helps to streamline the data between the Client and Server.</p><p>Caching refers to storing the server’s response in the client’s browser and when again the client requests the same object the request will not hit the server but it will be satisfied by the browser cache memory.</p><p>Server’s Response has detailed information on how the caching should be done and for what period of time this information should be cached in local memory.</p><p>Well Organized and Managed coaching will eliminate the Client-Server Interaction and increase the response speed and performance.</p><h4><strong>Client-Server:</strong></h4><p>REST Architecture depends on the Client-Server Architecture.</p><p>A client-server architecture is made up of clients, servers, and resources, with requests-responses managed through HTTP.</p><h4>Layered System:</h4><p>When the Client requests the representation to the server and the server responds to the request in between that there exist various composed layers.</p><p>This layer might provide security, Caching, Load-Balancing, and various other functionalities.</p><p>These layers won’t affect the request-response.</p><p>So, this all the principles that are followed by the REST APIs 🐱‍🏍</p><p>Now, here are the few Practices that you should keep in while building or accessing the REST API for your next Project:</p><p>👉 Always Use the JSON Format for Sending and Receiving Data.</p><p>Because JSON is a LightWeight Format that is easy to read and write. Also, it is Language Independent i.e we can work with this using any programming language. JSON Documents can be easily parsed to any Data Structure that can be used in programs.</p><p>👉 Make the Use of Nouns Instead of Verbs in the End Points</p><p>As we know a verb is an HTTP Method i.e GET, PUT, POST, DELETE, etc whereas Noun is the resource that is identified by the resource.</p><p>let’s take an Example and Understand:</p><p>Endpoints should not look like this:</p><pre>/users/julioKamile/get-posts</pre><p>Instead of that, it should be something like this:</p><pre>/users/julioKamile/posts</pre><p>👉 Use Status Code in Error Handling</p><p>Always use the HTTP Status Code in response to the request made to the API, this will help the Client to identify what’s going on and whether the request is successfully executed or it fails.</p><p>Here is a table that shows different HTTP Status Code ranges and their meanings:</p><p>👉 Make Use of Nested resources to show relationships</p><p>When Designing an endpoint keep the thing in mind that if one object can contain another object, we should design the endpoint to reflect that.</p><p>For Example:</p><p>We can get the ratingId inside rating which underlies inside books and can be filtered by bookId.</p><pre>/books/:bookId/ratings/:ratingId</pre><p>Huge Nesting should be avoided because that leads to making the API less elegant and readable.</p><p>👉 Make Use of Filtering, Sorting, and Pagination to Retrieve the Data Requested.</p><p>Paging, Sorting, and Filtering help to retrieve the small and minimal as well as effective data that can be displayed using datasets. This will help to load the necessary data to the page.</p><p>👉 Well-Formed Documentation</p><p>As the API is used by the Developers so huge organizations need to Document in which manner should developer work with the API by specifying the detailed information about the API.</p><p>Documentation should contains information regarding the endpoints, various examples, and implementation using several programming languages</p><p>There are several tools in the market using which documentation can be created easily such as:</p><p><a href="https://swagger.io/tools/swagger-ui/"><strong>Swagger UI</strong></a></p><p><a href="https://redocly.com/redoc/"><strong>ReDoc</strong></a></p><p><a href="https://openapi-generator.tech/"><strong>OpenAPI Generator</strong></a></p><p>So, that’s it about the REST API in this article we have seen what is API and what makes API a REST API, and some of the Best Practices while building REST APIs.</p><p><em>Hope it was useful for you.</em></p><p><em>let me know your thoughts in the comment box 💭</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ced179dd58" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Relationships in EF Core:]]></title>
            <link>https://medium.com/@amanpanjavani111/relationships-in-ef-core-143ae6c5df1e?source=rss-1d7a4fb3920c------2</link>
            <guid isPermaLink="false">https://medium.com/p/143ae6c5df1e</guid>
            <category><![CDATA[database-relationships]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[dot-net-core]]></category>
            <category><![CDATA[ef-core]]></category>
            <dc:creator><![CDATA[Aman Panjwani]]></dc:creator>
            <pubDate>Wed, 04 May 2022 08:56:59 GMT</pubDate>
            <atom:updated>2022-05-04T09:03:58.206Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*EMKwRJ6_t__vuw1B28wivw.png" /></figure><p>When working with Relational Database there comes a need to relate two entities as per the requirement needed. When we try to establish a relation between two entities then one of them acts as a <strong>Principal entity</strong> and another acts as a <strong>Dependent entity</strong>.</p><p>Let’s first look at these two terms and then will move forward:</p><p><strong>Principal Entity</strong>: This is an Entity that contains Primary key properties into it.<br><strong>Dependent Entity</strong>: This is an Entity that contains Foreign key properties into it.</p><p>Relationships Between entities are established using the foreign keys. This allows queries to be made on the database to obtain meaningful results.</p><p>Before Moving to relationships let’s first understand a few more terminologies that are being used to establish the relationship:</p><p><strong>Primary Key</strong>: Primary key is a column in the Table that Uniquely identifies each row in the table.</p><p><strong>Foreign Key</strong>: Foreign key binds the two columns by mapping the primary key of the principal Entity.</p><p><strong>Navigation Properties</strong>: Navigation properties define the type of relationships amongst the Entity. Based on the requirements, these properties are defined either in principle entity or in Dependent Entity.</p><p>There are two types of Navigation Properties:</p><ul><li><strong>Reference Navigation Property</strong>: Property that contains a reference to a single related entity (Zero to One Or One to One).</li><li><strong>Collection Navigation Property</strong>: Property that holds the reference to many related entities (One to Many Or Many to Many).</li></ul><h3>Types of Relationships:</h3><p>Tables can have a variety of relationships. Specifically, there are three types of relationships that we are going to see further in this article.</p><ol><li>One to One</li><li>One to Many</li><li>Many to Many</li></ol><h3>One to One Relationship:</h3><p>A One-to-One relationship occurs when there is only one row in one table that is linked to only one row in another table and the other way around.</p><p>For a better understanding, let’s take an example.</p><p>Consider the Class Student and StudentAddress. Let’s Assume that Every Student has Only one Address so that this will Create One to One relation between Student and StudentAddress. Where StudentId from Student Table will act as a Primary key and StudentAddressId from StudentAddress table will act as a Primary as well as Foreign key which references the Primary key of the Student table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*O_nG4UHQUpCIz5iR" /><figcaption>One to One Database Schema</figcaption></figure><p>Here’s what our model will look like:</p><p><strong><em>Student.cs Model</em></strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/72bbe970be2431e6e4c4f09e2477c458/href">https://medium.com/media/72bbe970be2431e6e4c4f09e2477c458/href</a></iframe><p><strong><em>StudentAddress.cs Model</em></strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5f0ae6d95855611d3c59322663946665/href">https://medium.com/media/5f0ae6d95855611d3c59322663946665/href</a></iframe><p><strong><em>Note: Here Properties are defined as Virtual so that the Entity Framework can allow using lazy loading and efficient change tracking.</em></strong></p><p>As we can see that we have added referential navigational property of other entity that references the entity where the navigational property is defined. In Our Example Student class contains a reference of StudentAddress via Navigational Property and StudentAddress class Contains a reference of Student Class.</p><p>Just add the migrations and update the database to reflect the One-to-One relationships between the entities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*0iFxrOYB3VkCy6dm" /><figcaption>SQL Server</figcaption></figure><h3>One to Many Relationship:</h3><p>The one-to-many relationship is formed when a row from the first table is linked with many rows in the second table, but only one row from the second table is linked with one row from the first table.</p><p>Let’s Understand this with an example,</p><p>Again now Considering<strong> Student</strong> and <strong>StudentCourse</strong>. So, let’s assume that Each Course can have as many Students but Each Student has only one StudentCourse.</p><p>Thus the relationship between Student and the StudentCourse is one too many. The Student belongs to only one StudentCourse. The StudentCourse can have many Students. In a One to Many relationship Primary key of the StudentCourse table (StudentCourseID) is defined as Foreign keyin the Student’s table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/0*vlKFWPR6rpVOZoz6" /><figcaption>One to Many Database Schema</figcaption></figure><p>For One to Many relationship here’s what our model will look like:</p><p><strong><em>Student.cs Model:</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b59eb41c4f742b330a92655d3c3b3437/href">https://medium.com/media/b59eb41c4f742b330a92655d3c3b3437/href</a></iframe><p><strong><em>StudentCourse.cs Model:</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bc6fa1ef94180d03ce01a9cdb8bcbd17/href">https://medium.com/media/bc6fa1ef94180d03ce01a9cdb8bcbd17/href</a></iframe><p>As we can see that navigational property in the Student class returns the reference of the StudentCourse Class. And the navigational property in StudentCourse class returns the Student’s collection. EF Core will configure the classes that depend on each other here.</p><p>Again Add the Migrations and Update the Database to see the reflection on SQL Server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/0*hB8Yb36lUZ47Q1vj" /><figcaption>SQL Server</figcaption></figure><h3>Many to Many Relationship:</h3><p>A Many to Many relationships occurs when multiple rows from one table are linked with multiple rows from another table and vice versa.</p><p>Let’s continue with the same example</p><p>As Students and StudentTeacher are termed as Many to Many Relationships. The students have more than one teacher for teaching various subjects. And Teachers can have many Students. Such relationships often involve creating a joining table. A composite primary key will be constructed for the join table by combining the primary keys of the Student table and the StudentTeacher table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/0*7gOsaz1VHSiRnFhB" /><figcaption>Many to Many Database Schema</figcaption></figure><p>For Many to Many relationships here’s what our model will look like:</p><p><strong><em>Student.cs Model</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1f47f4b0a8c0299c46f8b45796cbe35/href">https://medium.com/media/e1f47f4b0a8c0299c46f8b45796cbe35/href</a></iframe><p><strong><em>StudentTeacher.cs Model</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f6bfd474f7c26f3b39319cb7e0572015/href">https://medium.com/media/f6bfd474f7c26f3b39319cb7e0572015/href</a></iframe><p>As Here in the Model Collection Reference Navigation Property is used which returns the Collection set of StudentTeacher and Student and Creates a Join Table which Contains Primary Key of Both the Tables and acts as Primary and Foreign key for that joint Table</p><p>Lets Look at that by Creating another Migration and Updating Database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/0*zuOITmW3MNuOyYoS" /><figcaption>SQL Server</figcaption></figure><p>As we can see that StudentStudentTeacher is a Joint table Containing both StudentTeacherId and StudentStudentId as a Primary and Foreign Key through which we can Query the tables based on our needs.</p><h3>Conclusion:</h3><p>In this article, we have seen how to establish One to One, One to Many, and Many to Many relationships among entities using the EF Core Code First approach.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=143ae6c5df1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>