REST API Filtering

All GET requests can use filtering parameters to limit the response to only the data you need. Just pass in a filtering query parameter as shown below. You can use '&' to add another filtering query parameter if more than one is needed.

To test the filtering parameters, you can use the normal myrapidi.com user interface. Set some filters under Schedules and the URL will show the corresponding parameters to be used.

JSON:

For example:

curl 
 -H "Authorization: Bearer [API SECURITY TOKEN]"
 -H "Content-Type: application/json" 
 -H "Accept: application/json"
 -X GET
 https://api.myrapidi.com/api/v2/service/[SERVICE ID]/schedules?schedulercode=[SCHEDULER ID]

or
curl 
 -H "Authorization: Bearer [API SECURITY TOKEN]"
 -H "Content-Type: application/json" 
 -H "Accept: application/json"
 -X GET
 https://api.myrapidi.com/api/v2/service/[SERVICE ID]/schedules?schedulercode=[SCHEDULER ID]&search=TEST

In the first url above you have the filtering query parameter 'schedulercode'. In the second url above we have included the search filter option with '&search='

Other filtering options (for schedules) are 'groupcode','transfercode' and 'search'.

The example could have the following response body:

[{
 "code": "G_TEST22",
 "description": "Group TEST22",
 "transfer": "",
 "group": "TEST22",
 "interval": 1,
 "interval_unit": "Weeks",
 "status": "Stopped",
 "error_handling": "Skip",
 "last_datetime": "2017-03-28T15:59:07Z",
 "next_datetime": "2017-04-05T17:27:00Z",
 "error_interval": 1,
 "error_interval_unit": "Days",
 "notify_interval": 2,
 "notify_interval_unit": "Hours",
 "notify_datetime": "2014-03-30T17:01:00Z",
 "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": [],
 "comments": []
}]

JSONAPI:

For example:

curl 
 -H Authorization: Bearer [API SECURITY TOKEN]
 -H "Content-Type: application/vnd.api+json" 
 -H "Accept: application/vnd.api+json"
 -X GET
 https://api.myrapidi.com/api/v2/service/[SERVICE ID]/schedules?schedulercode=[SCHEDULER ID]

or

curl 
 -H Authorization: Bearer [API SECURITY TOKEN]
 -H "Content-Type: application/vnd.api+json" 
 -H "Accept: application/vnd.api+json"
 -X GET
 https://api.myrapidi.com/api/v2/service/[SERVICE ID]/schedules?schedulercode=[SCHEDULER ID]&search=TEST

In the first url above you have the filtering query parameter 'schedulercode'. In the second url above we have included the search filter option with '&search='

Other filtering options (for schedules) are 'groupcode','transfercode' and 'search'.

The example would have the following response body:

{"data": [
 {
  "id": "14",
  "type": "schedules",
  "attributes": {
    "code": "G_TEST22",
    "description": "Group TEST22",
    "transfer": "",
    "group": "TEST22",
    "interval": 1,
    "interval_unit": "Weeks",
    "status": "Stopped",
    "error_handling": "Skip",
    "last_datetime": "2017-03-28T15:59:07Z",
    "next_datetime": "2017-04-05T17:27:00Z",
    "error_interval": 1,
    "error_interval_unit": "Days",
    "notify_interval": 2,
    "notify_interval_unit": "Hours",
    "notify_datetime": "2014-03-30T17:01:00Z",
    "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": [],
    },
    "comments": {
      "data": []
    }
  }
 }]