Skip to content

Toy ์กฐํšŒ

soyeon Park edited this page Feb 5, 2021 · 1 revision

Base URL

http://localhost:8080/api

Request

  • url

    /toys

  • method

    GET

  • Query Params

    Field Type Description Example Required
    page Long ํŽ˜์ด์ง• ๋ช‡๋ฒˆ์งธ์ธ์ง€ default: 0
    size Integer ํŽ˜์ด์ง• ํฌ๊ธฐ default: 6
    sort String ์ •๋ ฌ ๊ธฐ์ค€ default: created_date
    organization String List organization ํ•„ํ„ฐ๋ง
    category String List category ํ•„ํ„ฐ๋ง
    skill Long List skill ํ•„ํ„ฐ๋ง
    period Long List period ํ•„ํ„ฐ๋ง
    search String List ๊ฒ€์ƒ‰ ์กฐ๊ฑด

Response

  • success response

    • status: 200
    • body
      [
        {
          "id": 1,
          "title": "์นตํ…Œ์ผํ”ฝ",
          "description": "์นตํ…Œ์ผ ์ถ”์ฒœ ์„œ๋น„์Šค",
          "logoUrl": "https://github.com/woowacourse-teams/2020-6rinkers/blob/dev/front/public/image/logo/CocktailPick_logo_FullName_white.png",
          "category": "WEB",
          "active": "2021-02-04T16:15:30",
          "skills": [
              {
                  "createdDate": "2021-02-05T21:21:39",
                  "updatedDate": "2021-02-05T21:21:39",
                  "id": 1,
                  "name": "java"
              },
              {
                  "createdDate": "2021-02-05T21:21:39",
                  "updatedDate": "2021-02-05T21:21:39",
                  "id": 2,
                  "name": "javascript"
              },
              {
                  "createdDate": "2021-02-05T21:21:39",
                  "updatedDate": "2021-02-05T21:21:39",
                  "id": 3,
                  "name": "spring"
              },
              {
                  "createdDate": "2021-02-05T21:21:39",
                  "updatedDate": "2021-02-05T21:21:39",
                  "id": 4,
                  "name": "spring boot"
              },
              {
                  "createdDate": "2021-02-05T21:21:39",
                  "updatedDate": "2021-02-05T21:21:39",
                  "id": 5,
                  "name": "react"
              },
              {
                  "createdDate": "2021-02-05T21:21:39",
                  "updatedDate": "2021-02-05T21:21:39",
                  "id": 6,
                  "name": "vue.js"
              },
              {
                  "createdDate": "2021-02-05T21:21:39",
                  "updatedDate": "2021-02-05T21:21:39",
                  "id": 7,
                  "name": "android"
              },
              {
                  "createdDate": "2021-02-05T21:21:39",
                  "updatedDate": "2021-02-05T21:21:39",
                  "id": 10,
                  "name": "ios"
              }
          ]
        },
        ...
      ]
      
      Field Type Description Required
      id Long Toy Id O
      title String Toy title O
      description String Toy description O
      logoUrl String ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์ด๋ฏธ์ง€ O
      category String ํ”„๋กœ์ ํŠธ ์ฃผ์ œ O
      active LocalDateTime ์ตœ๊ทผ ๊นƒ์— push๋œ timestamp O
      skills ํ”„๋กœ์ ํŠธ์— ์‚ฌ์šฉํ•œ ๊ธฐ์ˆ  O
      skills.id Long skill ID O
      skills.name String skill๋ช… O
      skills.createdDate LocalDateTime toy๋ฅผ ์ถ”๊ฐ€ํ•œ ๋‚ ์งœ O
      skills.updatedDate LocalDateTime toy์˜ ๊นƒํ—™ ๋ ˆํฌ์— pushํ•œ ๋‚ ์งœ O
  • fail response

    {
        "message": {{String}}
    }
    
    Field Type Description Example Required
    message String ์˜ค๋ฅ˜ ์‹คํŒจ ๋ฉ”์„ธ์ง€ "์‚ฌ์šฉ์ž๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค" O
    status message ์ƒํ™ฉ
    400 "Bad Request" ์š”์ฒญ์„ ์˜ฌ๋ฐ”๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ ํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ
    404 "Entity Not Found exception" ์นดํ…Œ๊ณ ๋ฆฌ ์„ ํƒ ๋“ฑ์„ ๋ฒ”์œ„ ๋‚ด์—์„œ ํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ
    500 "์„œ๋ฒ„ ๋‚ด๋ถ€ ์˜ค๋ฅ˜" ์„œ๋ฒ„ ๋‚ด๋ถ€์—์„œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์„ ๊ฒฝ์šฐ