List gear
GET
/api/v1/gear
const url = 'http://localhost:8080/api/v1/gear';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8080/api/v1/gear \ --header 'Authorization: Bearer <token>'Lists all gear, active gear first
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”All gear.
Media typeapplication/json
object
gear
required
Array<object>
object
id
required
string
name
required
string
type
required
string
isRetired
required
boolean
distanceInMeter
required
integer
numberOfActivities
required
integer
Example
{ "gear": [ { "id": "gear-b12659861", "name": "Canyon Grail", "type": "imported", "distanceInMeter": 10500, "numberOfActivities": 1 } ]}The Authorization header was missing, malformed, or did not match the configured key.
Media typeapplication/json
Every error uses this shape.
object
error
required
A stable, machine readable code.
string
message
required
string
Examples
ExampleinvalidToken
{ "error": "invalid_token", "message": "A valid API token is required. Send it in the Authorization header as a Bearer token."}Headers
Section titled “Headers”WWW-Authenticate
string