Skip to content

Toy ์ƒ์„ฑ

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

Base URL

http://49.50.175.141:8080/api

Toy create API

Request

  • url

    /toys

  • method

    POST

  • request body

    {
      "title": "์นตํ…Œ์ผํ”ฝ",
      "description": "์นตํ…Œ์ผ ์ถ”์ฒœ ์„œ๋น„์Šค",
      "logoUrl": "https://github.com/woowacourse-teams/2020-6rinkers/blob/dev/front/public/image/logo/CocktailPick_logo_FullName_white.png",
      "githubIdentifier": 1,
      "password": "password486",
      "serviceLink": "https://cocktailpick.com",
      "githubLink": "https://github.com/sypark9646/springGithubAPITest",
      "organizationId": 1,
      "category": "WEB",
      "period": "LESS_THAN_SIX_MONTHS",
      "contributors": [{"githubIdentifier": 11142, "username": "toneyparky"}, {"githubIdentifier": 2212, "username": "toney123"}],
      "email": "toney@naver.com",
      "techStackIds": [1,2, 3,4,5,6,7, 10],
      "pushedAt": "2021-02-04T16:15:30"
    }
    
    Field Type Description Example Required
    title String Toy ์ œ๋ชฉ title: "ํ† ์ด๋žœ๋“œ" O
    description String Toy ์„ค๋ช… description: "ํ† ์ดํ”„๋กœ์ ํŠธ ํ๋ ˆ์ดํŒ… ์›น ์„œ๋น„์Šค" O
    logoUrl String Toy ๋กœ๊ณ  Url logoUrl: "https://avatars.githubusercontent.com/u/69037013?v=4"
    githubIdentifier Long github ๊ณ ์œ  ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์‹๋ณ„์ž githubIdentifier=123123 O
    password String Toy ๋น„๋ฐ€๋ฒˆํ˜ธ password: "password486" O
    serviceLink String ํ† ์ด ํ”„๋กœ์ ํŠธ ์„œ๋น„์Šค ์ฃผ์†Œ serviceLink: "https://toy-land.co.kr" O
    githubLink String ํ† ์ด ํ”„๋กœ์ ํŠธ ๊นƒํ—™ ๋ ˆํฌ์ง€ํ† ๋ฆฌ githubLink: "https://github.com/toy-land/backend" O
    organizationId Long ์†Œ์† id organizationId: 1 O
    category String ์นดํ…Œ๊ณ ๋ฆฌ category: "AI" O
    period String ๊ฐœ๋ฐœ ๊ธฐ๊ฐ„ period: "1์ฃผ ์ด๋‚ด" O
    contributors List contributor ๊ธฐ์—ฌ์ž๋“ค contributors:[{githubIdentifier: 123123, username: "toneyparky"}, ...] O
    email String ์ด๋ฉ”์ผ email: "toney@naver.com"
    techStackIds List Long ๊ธฐ์ˆ  ์Šคํƒ ์•„์ด๋””๋“ค techStackIds: [1, 34, 88] O
    pushedAt LocalDateTime ์ตœ์‹  ํ‘ธ์‰ฌ ์‹œ๊ฐ„ "pushedAt": "2021-02-04T16:15:30" O

Response

  • success response

    • header

      method parameter Description Required
      statusCode {{201}} created O
    • body

      {
          "message": "toy ์ถ”๊ฐ€ ์„ฑ๊ณต"
      }
      
      Field Type Description Example Required
      message String toy ์ƒ์„ฑ ์„ฑ๊ณต ๋ฉ”์„ธ์ง€ O
  • fail response

    • body
    {
        "message": {{String}}
    }
    
    Field Type Description Example Required
    message String ํด๋ผ์ด์–ธํŠธ ์—๋Ÿฌ ๋ฉ”์„ธ์ง€ "์ ๋‹นํ•œ ํด๋ผ์ด์–ธํŠธ ์—๋Ÿฌ ๋ฉ”์„ธ์ง€" O
    • header
    method parameter Description Required
    statusCode {{400, 500}} Bad request, Server error O
    status message ์ƒํ™ฉ
    400 "์ ๋‹นํ•œ ํด๋ผ์–ธํŠธ ์—๋Ÿฌ ๋ฉ”์„ธ์ง€." ํด๋ผ์ด์–ธํŠธ์—์„œ ์ž˜๋ชป ์š”์ฒญ
    500 "์ ๋‹นํ•œ ์„œ๋ฒ„ ์—๋Ÿฌ ๋ฉ”์„ธ์ง€" ์„œ๋ฒ„ ๋‚ด๋ถ€ ์˜ค๋ฅ˜