On resource IDs
Every resource in the Spoke Public API has a unique ID. This ID is generated by Spoke and is unique for every resource per collection.
Every resource representation returned by the API will show the ID in the following format:
{
"id": "collectionName/resourceId"
}And if the resource is on a sub-collection, it will be in the following format:
{
"id": "collectionName/resourceId/subcollectionName/subResourceId"
}For example, a stop with ID stop1 under a plan with ID plan1 will have the
following representation on its serialized ID field:
{
"id": "plans/plan1/stops/stop1"
}This means that if you wish to directly retrieve this stop by using a GET endpoint you can simply use this ID as follows:
curl "https://api.spoke.com/public/v1/`serializedId`" -u yourApiKey:For the example above this would be:
curl "https://api.spoke.com/public/v1/plans/plan1/stops/stop1" -u yourApiKey: