MyRapidi
MyRapidi

Search our Wiki

REST API Schedule Tags Get Schedule Tags

Below you see an example of how to get a list of Schedule Tags. Examples both in JSON and JSONAPI are provided.

NOTE: Remember to substitute the token (after Bearer) and the service id (the "[SECURITY ID]" below) to your own token and service id.

JSON:

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/[SECURITY ID]/schedules/171/tags

The output for this example would be:

[
 {
  "id": "101",
  "code": "DS",
  "value": "NAV001"
 },
 {
  "id": "111",
  "code": "SOURCE",
  "value": "NAV002"
 },
 {
  "id": "121",
  "code": "DESTINATION",
  "value": "NAV003"
 },
 {
  "id": "131",
  "code": "SOURCECOMP",
  "value": "NAV004"
 },
 {
  "id": "141",
  "code": "DESTCOMP",
  "value": "NAV005"
 }
]

JSONAPI:

Get a list of Schedule Tags:

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/[SECURITY ID]/schedules/171/tags

The out-put for this example would be:

{
  "data": [
    {
      "id": "101",
      "type": "schedule_tags",
      "attributes": {
        "code": "DS",
        "value": "NAV001"
      }
    },
    {
      "id": "111",
      "type": "schedule_tags",
      "attributes": {
        "code": "SOURCE",
        "value": "NAV002"
      }
    },
    {
      "id": "101",
      "type": "schedule_tags",
      "attributes": {
        "code": "DESTINATION",
        "value": "NAV003"
      }
    },
    {
      "id": "101",
      "type": "schedule_tags",
      "attributes": {
        "code": "SOURCECOMP",
        "value": "NAV004"
      }
    },
    {
      "id": "101",
      "type": "schedule_tags",
      "attributes": {
        "code": "DESTCOMP",
        "value": "NAV005"
      }
    }
  ]
}

TIP: As you would need the Schedule ID you can run your list of Schedules before to get the Schedule ID and to get an overview where you have different Schedule Tags attached.

-----

One specific Schedule Tag from one specific Schedule

Below you see an example of how to get one specific Schedule Tag from a specific Schedule. Examples both in JSON and JSONAPI are provided.

NOTE: Remember to substitute the token (after Bearer) and the service id (the [SECURITY ID] below) to your own token and service id.

and remember to replace 171 and 101 with your own Schedule Id and Tag Id.

JSON:

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/[SECURITY ID]/schedules/171/tags/101

The out-put for this example would be:

[
  {
    "id": "101",
    "code": "DS",
    "value": "NAV001"
  }
]

JSONAPI:

Get Schedule Tags from a specific Schedule:

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/[SECURITY ID]/schedules/171/tags/101

The out-put for this example would be:

{
  "data": [
    {
      "id": "101",
      "type": "schedule_tags",
      "attributes": {
        "code": "DS",
        "value": "NAV001"
      }
    }
  ]
}

TIP: As you would need the Schedule ID you can run your list of Schedules before to get the Schedule ID and to get an overview where you have different Schedule Tags attached.