<turbo-stream action="update" target="wiki_3611_3686_subpage_3690_info"><template>
<p>Below you see an example of how to update existing RTI values. Examples both in JSON and JSONAPI are provided.</p>
<p>NOTE: Remember to substitute the token (after Bearer) and the service id (the "[SERVICE ID]" below) to your own token and service id.</p>
<p></p><h2>JSON:</h2>
<pre class="card">curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/json" 
  -H "Accept: application/json"
  -X PATCH
  data = {\"source_control\":\"151026\"}  
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/rtis/3
</pre>
<p>The out-put for this example would be:</p>
<pre class="card">{
  "id": "3",
  "transfer": "A_NAVSQL_TEST_DATES",
  "source": "NAVSQL001",
  "destination": "NAVSQL002",
  "source_control": 151026
}
</pre>
<p></p><h2>JSONAPI:<p></p>
<p>Update excisting RTIs:</p>
<pre class="card">curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/vnd.api+json" 
  -H "Accept: application/vnd.api+json"
  -X PATCH
  data = "{\"data\":{\"id\":\"3\",\"type\":\"rtis\",\"attributes\": 
           {\"transfer\":\"A_NAVSQL_TEST_DATES\",\"source\":\"NAVSQL001\", 
            \"destination\":\"NAVSQL002\",\"source_control\":\"151026\"} }}"
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/rtis/3
</pre>
<p>The output for this example would be:</p>
<pre class="card">{
  "data":{
    "id": "3",
    "type":"rtis",
    "attributes":{
      "transfer": "A_NAVSQL_TEST_DATES",
      "source": "NAVSQL001",
      "destination": "NAVSQL002",
      "source_control": 151026 
    }
  }
}
</pre></h2>
</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
