create
PUT /trail
PUT
/trail
Creates a trail.
Authorizations
Parameters
Query Parameters
expand
string
Expand a foreign key column (https://pocketbase.io/docs/working-with-relations/#expanding-relations).
requestKey
string
Unique request id. Prevents auto cancel when sending multiple requests.
Request Body
object
name
required
Name of the trail
string
public
required
Visible for everyone
boolean
category
Category Id
string
date
Date of the trail
string format: date
description
Description of the trail
string
difficulty
Difficulty of the trail
string
distance
Distance in meters
number
duration
Duration in seconds
number
elevation_gain
Elevation gain in vertical meters
number
elevation_loss
Elevation loss in vertical meters
number
lat
Latitude of the starting point
number
location
Nearest city/village
string
lon
Longitude of the starting point
number
thumbnail
Index of the photo that should be used as the thumbnail.
integer
author
required
User Id
string
Example
Responses
200
object
author
required
string
category
required
string
collectionId
required
string
collectionName
required
string
created
required
string
date
required
string
description
required
string
difficulty
required
string
distance
required
number
duration
required
number
elevation_gain
required
number
elevation_loss
required
number
gpx
required
string
id
required
string
lat
required
number
location
required
string
lon
required
number
name
required
string
photos
required
Array<string>
public
required
boolean
summit_logs
required
Array<string>
thumbnail
required
integer
updated
required
string
waypoints
required
Array<string>
Examples
Success
400
object
message
required
string
detail
required
object
code
required
integer
message
required
string
data
required
object
author
required
object
code
required
string
message
required
string
Examples
Exception
x-400:Invalid Params
object
message
required
string
detail
required
Array<object>
object
code
required
string
validation
string
message
required
string
path
required
Array<string>
Examples
Exception