MyRapidi
MyRapidi

Search our Wiki

REST API Link Storage Values Create Link Storage Values

Below you see an example of how to create new Link Storage values. Examples both in JSON and JSONAPI are provided.

NOTE: Remember to substitute the token (after Bearer) and the service id (the "[SERVICE ID]" below) to your own token and service id and your own link storage id instead of "1".

JSON:

curl
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/json" 
  -H "Accept: application/json"
  -X POST
  data = "{\"key_1\":\"80000\",\"key_2\":\"1234567DEFGHUJ\"}"
  https://staging.myrapidi.com/api/v2/service/[SERVICE ID]/link_storages/1/values

The output for this example would be:

{
  "id": "41",
  "key_1": "80000",
  "key_2": "1234567DEFGHUJ"
}

JSONAPI:

Create Link Storage Values:

curl
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/vnd.api+json" 
  -H "Accept: application/vnd.api+json"
  -X POST
  data = "{\"data\":{\"type\":\"cdb_link_storage_values\",\"attributes\": {\"key_1\":\"80000\",\"key_2\":\"1234567DEFGHUJ\"} }}"
  https://staging.myrapidi.com/api/v2/service/[SERVICE ID]/link_storages/1/values

The output for this example would be:

{
  "data": {
    "id": "41",
    "type": "cdb_link_storage_values",
    "attributes": {
      "key_1": "80000",
      "key_2": "1234567DEFGHUJ"
    }
  }
}