ws_module_a_am API

REST API documentation for the travel discovery social platform. All endpoints return JSON responses and support CORS.

http://localhost:8091
v1
JSON
4
GET

List Comments

Retrieve all comments across posts, including nested replies. Each comment includes author info, content, timestamps, and optional parent comment reference.

http://localhost:8091/api/comments

Request

ParameterTypeDescription
No query parameters or request body required

Request Headers

HeaderValueDescription
No custom headers required

Response

200 OK application/json

Response Headers

HeaderValue
X-Powered-ByExpress
Access-Control-Allow-Origin*
Content-Typeapplication/json; charset=utf-8

Response Schema

FieldTypeExample
commentsarrayArray of objects
Item properties:
idstringcomment-mount-tai-001-01
postIdstringmount-tai-001
parentCommentIdnullNone
authorobject—
nicknamestringDean
avatarstringavatars/avatar7.jpg
contentstringI'll never shake the Red Gate night stairs—that sunrise punching through low clo...
createdAtstring2026-05-03 04:00:00

Example Response

{
  "comments": [
    {
      "id": "comment-mount-tai-001-01",
      "postId": "mount-tai-001",
      "parentCommentId": null,
      "author": {
        "nickname": "Dean",
        "avatar": "avatars/avatar7.jpg"
      },
      "content": "I'll never shake the Red Gate night stairs—that sunrise punching through low cloud made the jelly legs worth it.",
      "createdAt": "2026-05-03 04:00:00"
    },
    {
      "id": "comment-mount-tai-001-01-reply-1",
      "postId": "mount-tai-001",
      "parentCommentId": "comment-mount-tai-001-01",
      "author": {
        "nickname": "Gabe",
        "avatar": "avatars/avatar1.jpg"
      },
      "content": "What month did you score that sea of clouds? I only got thin mist in June and I'm debating a second bet.",
      "createdAt": "2026-05-03 06:00:00"
    },
    {
      "id": "comment-mount-tai-001-02",
      "postId": "mount-tai-001",
      "parentCommentId": null,
      "author": {
        "nickname": "Earl",
        "avatar": "avatars/avatar7.jpg"
      },
      "content": "Summit wind is absurd—shell + headlamp are non-negotiables. Your packing list reads lived-in.",
      "createdAt": "2026-05-04 00:00:00"
    },
    {
      "_note": "... and 27 more items"
    }
  ]
}
GET

List Follows

Retrieve all follow relationships between users. Each record represents a follower-following pair with creation timestamp.

http://localhost:8091/api/follows

Request

ParameterTypeDescription
No query parameters or request body required

Request Headers

HeaderValueDescription
No custom headers required

Response

200 OK application/json

Response Headers

HeaderValue
X-Powered-ByExpress
Access-Control-Allow-Origin*
Content-Typeapplication/json; charset=utf-8

Response Schema

FieldTypeExample
followsarrayArray of objects
Item properties:
idstringfollow-001
followerIdstringuser-001
followingIdstringuser-004
createdAtstring2026-03-15 09:20:00

Example Response

{
  "follows": [
    {
      "id": "follow-001",
      "followerId": "user-001",
      "followingId": "user-004",
      "createdAt": "2026-03-15 09:20:00"
    },
    {
      "id": "follow-002",
      "followerId": "user-004",
      "followingId": "user-001",
      "createdAt": "2026-03-18 14:30:00"
    },
    {
      "id": "follow-003",
      "followerId": "user-005",
      "followingId": "user-006",
      "createdAt": "2026-04-01 10:20:00"
    },
    {
      "_note": "... and 5 more items"
    }
  ]
}
GET

List Users

Retrieve all registered users. Returns user profile information including username, email, nickname, and avatar.

http://localhost:8091/users

Request

ParameterTypeDescription
No query parameters or request body required

Request Headers

HeaderValueDescription
No custom headers required

Response

200 OK application/json

Response Headers

HeaderValue
X-Powered-ByExpress
Access-Control-Allow-Origin*
Content-Typeapplication/json; charset=utf-8

Response Schema

FieldTypeExample
usersarrayArray of objects
Item properties:
idstringuser-001
userNamestringuser1
emailstringuser1@user1.com
passwordstringpass123
nicknamestringAlex
avatarstringavatars/avatar4.jpg

Example Response

{
  "users": [
    {
      "id": "user-001",
      "userName": "user1",
      "email": "user1@user1.com",
      "password": "pass123",
      "nickname": "Alex",
      "avatar": "avatars/avatar4.jpg"
    },
    {
      "id": "user-002",
      "userName": "user2",
      "email": "user2@user2.com",
      "password": "pass234",
      "nickname": "Jamie",
      "avatar": "avatars/avatar5.jpg"
    },
    {
      "id": "user-003",
      "userName": "user3",
      "email": "user3@user3.com",
      "password": "pass345",
      "nickname": "Jordan",
      "avatar": "avatars/avatar5.jpg"
    },
    {
      "_note": "... and 3 more items"
    }
  ]
}
GET

List Discoveries

Retrieve all discovery posts (travel/experience content). Each discovery includes title, description, media attachments, and publishing metadata.

http://localhost:8091/api/discoveries

Request

ParameterTypeDescription
No query parameters or request body required

Request Headers

HeaderValueDescription
No custom headers required

Response

200 OK application/json

Response Headers

HeaderValue
X-Powered-ByExpress
Access-Control-Allow-Origin*
Content-Typeapplication/json; charset=utf-8

Response Schema

FieldTypeExample
discoveriesarrayArray of objects
Item properties:
idstringmount-tai-001
titlestringNight-hiking Mount Tai for sunrise: sore for real, worth it for real
subtitlestringStair marathon · Dawn sea of clouds · Don't forget a headlamp
descriptionstringFrom Red Gate upward the steps feel infinite—legs questioning your life choices....
user_idstringuser-002
publishedAtstring2026-04-18 05:12:00
mediaarrayArray of objects
Item properties:
typestringimage
pathstring/images/mount_tai2.jpg

Example Response

{
  "discoveries": [
    {
      "id": "mount-tai-001",
      "title": "Night-hiking Mount Tai for sunrise: sore for real, worth it for real",
      "subtitle": "Stair marathon · Dawn sea of clouds · Don't forget a headlamp",
      "description": "From Red Gate upward the steps feel infinite—legs questioning your life choices. Then the horizon softens and a gold-red sun lifts out of the clouds, shutters clicking everywhere, and suddenly the ache makes sense.\n\nBring a wind shell; summit gusts are no joke. Don't overpack water and snacks—vendors along the way have you. Ride the cable car down if your knees are voting yes.",
      "user_id": "user-002",
      "publishedAt": "2026-04-18 05:12:00",
      "media": [
        {
          "type": "image",
          "path": "/images/mount_tai2.jpg"
        }
      ]
    },
    {
      "id": "potala-palace-001",
      "title": "Potala Palace: red-and-white walls that almost glow in the sun",
      "subtitle": "Lhasa must-see · Book ahead · Easy pace for altitude",
      "description": "From the square the palace stacks up the hillside—pure visual wallop. Inside, corridors pinch and stairs bite; move with the crowd, no sprinting. No cameras in the halls—let the murals and statues burn in as memories.\n\nDay one in Lhasa: rest before you tackle the palace. SPF and lip balm aren't optional—the high-altitude sun means business.",
      "user_id": "user-003",
      "publishedAt": "2026-04-25 11:00:00",
      "media": [
        {
          "type": "video",
          "path": "/videos/potala_palace.mp4"
        },
        {
          "type": "image",
          "path": "/images/potala_palace1.jpg"
        }
      ]
    },
    {
      "id": "yungang-grottoes-001",
      "title": "Yungang Grottoes: the colossus, caves, carvings, and pigments—summit views after the cable car, statues and murals at altitude, gusts on the horizon, quiet shots",
      "subtitle": "Northern Wei carvings · Indoor caves are non-negotiable",
      "description": "The open-air colossus lands heavy—looking up actually feels vertiginous. Indoor caves keep pigments you can study for minutes. A guide (or a dense audio app) separates \"cool rocks\" from layered history.\n\nLong walks inside the site—shuttle helps elders and kids. Hands off the carvings so the next visit still has detail.",
      "user_id": "user-001",
      "publishedAt": "2026-04-08 10:15:00",
      "media": [
        {
          "type": "image",
          "path": "/images/yungang_grottoes1.jpg"
        },
        {
          "type": "image",
          "path": "/images/yungang_grottoes2.jpg"
        },
        {
          "type": "video",
          "path": "/videos/yungang_grottoes.mp4"
        }
      ]
    },
    {
      "id": "summer-palace-001",
      "title": "Half a day at the Summer Palace: lake breeze, tour boats, painted beams, long corridor, and a lakeside palace—cable car nearby, fan routines and tai chi, sensible shoes, gusts on the horizon",
      "subtitle": "Imperial garden · Boats optional · Built for wandering",
      "description": "Enter from the East Palace Gate and the Long Corridor's painted beams can hypnotize you for hours. By the lake the wind turns soft—watch tour boats drift and time actually downshifts. Seventeen-Arch Bridge at dusk gives gentle light for portraits.\n\nThe grounds are huge—sensible shoes only. Hop the boats to chain sights if you want fewer steps.",
      "user_id": "user-004",
      "publishedAt": "2026-05-01 14:20:00",
      "media": [
        {
          "type": "image",
          "path": "/images/summer_palace1.jpg"
        },
        {
          "type": "image",
          "path": "/images/summer_palace2.jpg"
        },
        {
          "type": "image",
          "path": "/images/summer_palace3.jpg"
        },
        {
          "type": "image",
          "path": "/images/summer_palace4.jpg"
        }
      ]
    },
    {
      "id": "imperial-palace-001",
      "title": "One day in the Forbidden City: meridian gate to imperial garden, vermillion halls, treasure wings, and palace statues at altitude—colossus carvings, painted beams, a clean frame on the corridors and square, then a summit lookout on the horizon",
      "subtitle": "Classic central axis · Treasure Gallery deserves its own slot",
      "description": "Meridian Gate in, follow the spine to the Imperial Garden—you won't get lost. East and west side halls are great rabbit holes; vermillion reads on camera. Clock and treasure wings mean queues—worth it if bling is your thing.\n\nComfortable shoes and water first. Early entry or near-closing light thins crowds and softens the light.",
      "user_id": "user-006",
      "publishedAt": "2026-05-03 09:00:00",
      "media": [
        {
          "type": "video",
          "path": "/videos/the_imperial_palace.mp4"
        },
        {
          "type": "image",
          "path": "/images/the_imperial_palace1.jpg"
        },
        {
          "type": "image",
          "path": "/images/the_imperial_palace2.jpg"
        },
        {
          "type": "image",
          "path": "/images/the_imperial_palace3.jpg"
        }
      ]
    },
    {
      "id": "temple-of-heaven-001",
      "title": "Temple of Heaven Park: clean frame at hall of prayer, circular mound altar, echo wall, quiet shots, fan routines, tai chi—plus square corridors of murals, treasure wings, vermillion halls, lake tour boats, pigments in the caves, and sensible shoes",
      "subtitle": "Early means quieter · Echo Wall as a quick detour",
      "description": "Weekday mornings you can still find pockets of clean frame in front of the Hall of Prayer. Circular Mound Altar plus Imperial Vault of Heaven is a tidy two-to-three-hour loop. Locals doing tai chi and fan routines make it feel like Beijing's living room, not just a monument.\n\nArrive at opening if you care about quiet shots. Treat Echo Wall as playful crowd energy—not acoustic sorcery.",
      "user_id": "user-005",
      "publishedAt": "2026-04-22 08:45:00",
      "media": [
        {
          "type": "image",
          "path": "/images/temple_of_heaven1.jpg"
        },
        {
          "type": "image",
          "path": "/images/temple_of_heaven2.jpg"
        },
        {
          "type": "image",
          "path": "/images/temple_of_heaven3.jpg"
        },
        {
          "type": "image",
          "path": "/images/temple_of_heaven4.jpg"
        },
        {
          "type": "video",
          "path": "/videos/temple_of_heaven.mp4"
        }
      ]
    }
  ]
}