<?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"><channel><title><![CDATA[PATCH method for client libraries]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I am using the typescript client library and I was wondering whether the PATCH method is also available somewhere in there, which is documented in the REST API though.</p>
<p dir="auto">The PUT request, as usually used by <code>update&lt;Resource&gt;()</code> overwrites the complete object and requires to retrieve the object beforehand. The PATCH would allow to just overwrite some values and is very handy. (Currently I use it for example to setup my default tenant while kickstarting)</p>
<p dir="auto">I have seen in the library that there is a function <code>.withMethod("PUT")</code> <a href="https://github.com/FusionAuth/fusionauth-typescript-client/blob/d4570de7cd0420ff14ec51e99a49f38924c58894/src/FusionAuthClient.ts#L4477" rel="nofollow ugc">here</a> which gets called from any <code>update&lt;Resource&gt;()</code> method and was therefore wondering why no <code>.withMethod("PATCH")</code> for lets say <code>updatePartial&lt;Resource&gt;()</code>? The client libs are autom. generated if I understood this correctly, so it should not be such a big problem, or did I miss something crucial?</p>
<p dir="auto">Thx for clarification!</p>
<p dir="auto">Cyrill</p>
]]></description><link>https://fusionauth.io/community/forum/topic/1277/patch-method-for-client-libraries</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Jul 2026 13:20:03 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/1277.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Sep 2021 13:56:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PATCH method for client libraries on Wed, 06 Oct 2021 19:10:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/553">@cyrill-lippuner</a></p>
<p dir="auto">Ah, ok the scope of the question/request makes sense to me.</p>
<p dir="auto">With the disclaimer that I have not used the typescript library extensively (yet), when I search this library for "patch" it does appear that we do support PATCH.</p>
<p dir="auto">Can you confirm that you see this as well (or possibly I am overlooking something)</p>
<p dir="auto"><a href="https://github.com/FusionAuth/fusionauth-typescript-client/blob/master/src/FusionAuthClient.ts" rel="nofollow ugc">https://github.com/FusionAuth/fusionauth-typescript-client/blob/master/src/FusionAuthClient.ts</a> (this is the library I searched)</p>
<p dir="auto">Thanks<br />
Josh</p>
]]></description><link>https://fusionauth.io/community/forum/post/3786</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/3786</guid><dc:creator><![CDATA[joshua]]></dc:creator><pubDate>Wed, 06 Oct 2021 19:10:20 GMT</pubDate></item><item><title><![CDATA[Reply to PATCH method for client libraries on Fri, 01 Oct 2021 07:17:20 GMT]]></title><description><![CDATA[<p dir="auto">Sure!</p>
<p dir="auto">The <code>PUT</code> method is used to <strong>replace</strong> an existing object completely with the provided information. This means I need to provide the complete informations of the object even when I only want to update one single value. (If I don't, all values which already exist but I do not provide get wiped!)</p>
<p dir="auto">The <code>PATCH</code> method will <strong>merge</strong> the provided information into the existing object, meaning I can only give the missing information without having to provide the rest of the values, too.</p>
<p dir="auto">This is already implemented on the <code>API</code> level of fusionauth, but just not available in the client libraries. This would be very handy, as with the <code>PUT</code> request, I am forced to <code>GET</code> the object first to then be able to change information and send a second <code>PUT</code> request to update it. <strong>BUT</strong>, when I have the <em>object-id</em> already, I can directly <code>PATCH</code> a single data field and cut the transaction count in half.</p>
<p dir="auto">You can have a look at the different ways described <a href="https://fusionauth.io/docs/v1/tech/apis/users/#update-a-user" rel="nofollow ugc">here</a>.</p>
<p dir="auto">I hope this is clearer now, otherwise come back to me <img src="https://fusionauth.io/community/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=rcgg4tg866g" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">PS: I would like to have this on <strong>every</strong> endpoint which already provides <strong>PATCH</strong> methods documented in the <strong>api docs</strong> <a href="https://fusionauth.io/docs/v1/tech/apis/" rel="nofollow ugc">here</a>. (The functionality is already there, just not accessible by the client libs.)</p>
]]></description><link>https://fusionauth.io/community/forum/post/3770</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/3770</guid><dc:creator><![CDATA[cyrill.lippuner]]></dc:creator><pubDate>Fri, 01 Oct 2021 07:17:20 GMT</pubDate></item><item><title><![CDATA[Reply to PATCH method for client libraries on Thu, 30 Sep 2021 00:19:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/553">@cyrill-lippuner</a></p>
<p dir="auto">Can you confirm what endpoint you would like to use the patch on?</p>
<p dir="auto">This, of course, could be missing functionality within this library.  If you could expand with a few details to confirm what you are attempting, that would be great.</p>
<p dir="auto">Thanks,<br />
Josh<br />
FusionAuth</p>
]]></description><link>https://fusionauth.io/community/forum/post/3764</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/3764</guid><dc:creator><![CDATA[joshua]]></dc:creator><pubDate>Thu, 30 Sep 2021 00:19:53 GMT</pubDate></item></channel></rss>