<turbo-stream action="update" target="wiki_3611_3651_subpage_3726_info"><template>
<p>To update an existing schedule see below for JSON and JSONAPI example.</p>
<p> </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>
<p><strong> Start Schedule 19 on service with id [SERVICE ID]:</strong></p>
<pre class="card">curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/json" 
  -H "Accept: application/json"
  -X POST
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/schedules/19/start</pre>
<p>The out-put for this example would be: </p>
<pre class="card">{
 "code": "G_TEST22_NAV356001",
 "description": "Group TEST22 NAV356001", 
 "transfer": "", 
 "group": "TEST22", 
 "interval": 3, 
 "interval_unit": "Hours", 
 "status": "OK",
 "error_handling": "Skip",
 "last_datetime": null,
 "next_datetime": "2015-10-01T00:00:00Z",
 "error_interval": 0,
 "error_interval_unit": "Hours",
 "notify_interval": 0, 
 "notify_interval_unit": "Hours",
 "notify_datetime": null,
 "start_time": "00:00:00Z", 
 "end_time": "00:00:00Z",
 "monday": true, 
 "tuesday": true, 
 "wednesday": true,
 "thursday": true,
 "friday": true,
 "saturday": true, 
 "sunday": true,
 "tags": [
  {
    "code": "NAV300", 
    "value": "NAV356001"
  }
 ],
 "comments": []
} 
</pre>
<p></p><h2>JSONAPI:</h2>
<pre class="card">curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/vnd.api+json" 
  -H "Accept: application/vnd.api+json"
  -X POST
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/schedules/19/start</pre>
<p>The out-put for this example would be: </p>
<pre class="card">{
 "data":{
 "id":"19",
 "type": "schedules",
 "attributes":{
  "code": "G_TEST22_NAV356001",
  "description": "Group TEST22 NAV356001", 
  "transfer": "", 
  "group": "TEST22", 
  "interval": 33, 
  "interval_unit": "Day", 
  "status": "OK",
  "error_handling": "Skip",
  "last_datetime": null,
  "next_datetime": "2015-10-01T00:00:00Z",
  "error_interval": 0,
  "error_interval_unit": "Hours",
  "notify_interval": 0, 
  "notify_interval_unit": "Hours",
  "notify_datetime": null,
  "start_time": "00:00:00Z", 
  "end_time": "00:00:00Z",
  "monday": true, 
  "tuesday": true, 
  "wednesday": true,
  "thursday": true,
  "friday": true,
  "saturday": true, 
  "sunday": true
 },
 "relationships": {
  "tags": {
    "data": [
      {
        "id": "7", 
        "type": "schedule_tags"
      }
    ]
  },
  "comments": {
    "data": [] 
  }
 }
},
"included": [
 {
  "id": "7",
  "type": "schedule_tags",
  "attributes": {
    "code": "NAV300",
    "value": "NAV356001"
  }
 }
]
</pre>
</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
