{"id":2410,"date":"2013-05-23T12:38:58","date_gmt":"2013-05-23T03:38:58","guid":{"rendered":"http:\/\/auctionpro.co.kr\/?p=2410"},"modified":"2025-09-03T12:04:06","modified_gmt":"2025-09-03T03:04:06","slug":"kimstars-second-blog-__-json-%ea%b0%9c%ec%9a%94-%eb%b0%8f-%ec%98%88%ec%a0%9c","status":"publish","type":"post","link":"https:\/\/www.auctionpro.co.kr\/?p=2410","title":{"rendered":"JSON \uac1c\uc694 \ubc0f \uc608\uc81c"},"content":{"rendered":"\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \">using Microsoft.AspNetCore.Mvc;\n\nnamespace CoinAPI.Controllers\n{\n    [ApiController]\n    [Route(\"api2\/[controller]\")]\n    public class OSIController : Controller\n    {\n        private readonly ILogger&lt;OSIController&gt; _logger;\n        private readonly IConfiguration Configuration;\n\n        public OSIController(ILogger&lt;OSIController&gt; logger, IConfiguration configuration)\n        {\n            _logger = logger;\n            Configuration = configuration;\n        }\n\n        \/\/ \uc0d8\ud50c \ub370\uc774\ud130 (\uc2e4\uc81c DB \ub300\uc2e0 \uc0ac\uc6a9)\n        private static List&lt;OSIModel&gt; _osiList = new List&lt;OSIModel&gt;\n        {\n            new OSIModel { Id = 1, Code = \"OSI1\", Description = \"Special meal request\" },\n            new OSIModel { Id = 2, Code = \"OSI2\", Description = \"Wheelchair assistance\" }\n        };\n\n        \/\/ GET: api\/OSI\n        [HttpGet]\n        public IActionResult GetAll()\n        {\n            return Ok(_osiList);\n        }\n\n        \/\/ GET: api\/OSI\/1\n        [HttpGet(\"{id}\")]\n        public IActionResult GetById(int id)\n        {\n            var osi = _osiList.FirstOrDefault(o =&gt; o.Id == id);\n            if (osi == null)\n                return NotFound(new { message = \"\ud574\ub2f9 OSI \uc815\ubcf4\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\" });\n\n            return Ok(osi);\n        }\n\n        \/\/ POST: api\/OSI\n        [HttpPost]\n        public IActionResult Create([FromBody] OSIModel newOsi)\n        {\n            if (!ModelState.IsValid)\n                return BadRequest(ModelState);\n\n            newOsi.Id = _osiList.Max(o =&gt; o.Id) + 1;\n            _osiList.Add(newOsi);\n\n            return CreatedAtAction(nameof(GetById), new { id = newOsi.Id }, newOsi);\n        }\n\n        \/\/ PUT: api\/OSI\/1\n        [HttpPut(\"{id}\")]\n        public IActionResult Update(int id, [FromBody] OSIModel updatedOsi)\n        {\n            var osi = _osiList.FirstOrDefault(o =&gt; o.Id == id);\n            if (osi == null)\n                return NotFound(new { message = \"\uc218\uc815\ud560 OSI \uc815\ubcf4\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\" });\n\n            osi.Code = updatedOsi.Code;\n            osi.Description = updatedOsi.Description;\n\n            return Ok(osi);\n        }\n\n        \/\/ DELETE: api\/OSI\/1\n        [HttpDelete(\"{id}\")]\n        public IActionResult Delete(int id)\n        {\n            var osi = _osiList.FirstOrDefault(o =&gt; o.Id == id);\n            if (osi == null)\n                return NotFound(new { message = \"\uc0ad\uc81c\ud560 OSI \uc815\ubcf4\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\" });\n\n            _osiList.Remove(osi);\n            return NoContent();\n        }\n    }\n\n    \/\/ \uc0d8\ud50c \ubaa8\ub378 \ud074\ub798\uc2a4\n    public class OSIModel\n    {\n        public int Id { get; set; }\n        public string Code { get; set; }\n        public string Description { get; set; }\n    }\n}<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2013\/05\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"651\" height=\"397\" src=\"https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2013\/05\/image.png\" alt=\"\" class=\"wp-image-9861\" srcset=\"https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2013\/05\/image.png 651w, https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2013\/05\/image-300x183.png 300w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\uc2e4\ubb34\uc5d0\uc11c \uad8c\uc7a5\ub418\ub294 \uc0ac\uc6a9 \ud328\ud134<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\uc791\uc5c5<\/th><th>\uc751\ub2f5 \ucf54\ub4dc<\/th><th>\uc751\ub2f5 \uba54\uc11c\ub4dc<\/th><th>\uc751\ub2f5 Body<\/th><\/tr><\/thead><tbody><tr><td>\uc0dd\uc131(Create)<\/td><td>201<\/td><td><code>CreatedAtAction()<\/code><\/td><td>\uc0dd\uc131\ub41c \ub370\uc774\ud130<\/td><\/tr><tr><td>\uc870\ud68c(Read)<\/td><td>200<\/td><td><code>Ok()<\/code><\/td><td>\ub370\uc774\ud130<\/td><\/tr><tr><td>\uc5c5\ub370\uc774\ud2b8(Update)<\/td><td>200<\/td><td><code>Ok()<\/code><\/td><td>\uc5c5\ub370\uc774\ud2b8\ub41c \ub370\uc774\ud130<\/td><\/tr><tr><td>\uc0ad\uc81c(Delete)<\/td><td>204<\/td><td><code>NoContent()<\/code><\/td><td>\uc5c6\uc74c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\uc644\uc804\ud55c CRUD \ucee8\ud2b8\ub864\ub7ec + Swagger \uc124\uc815<\/strong> \uc608\uc81c<\/h3>\n\n\n\n<p>1) Program.cs (Swagger + MVC \uc124\uc815)<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \" title=\"Program.cs\" >using Microsoft.OpenApi.Models;\n\nvar builder = WebApplication.CreateBuilder(args);\n\nbuilder.Services.AddControllers();\n\n\/\/ Swagger\nbuilder.Services.AddEndpointsApiExplorer();\nbuilder.Services.AddSwaggerGen(c =&gt;\n{\n    c.SwaggerDoc(\"v1\", new OpenApiInfo\n    {\n        Title = \"OSI API\",\n        Version = \"v1\",\n        Description = \"Sample CRUD with CreatedAtAction \/ Ok \/ NoContent\"\n    });\n});\n\nvar app = builder.Build();\n\napp.UseHttpsRedirection();\n\napp.UseSwagger();\napp.UseSwaggerUI(c =&gt;\n{\n    c.SwaggerEndpoint(\"\/swagger\/v1\/swagger.json\", \"OSI API v1\");\n    c.RoutePrefix = string.Empty; \/\/ https:\/\/localhost:5001\/ \uc9c4\uc785 \uc2dc Swagger \uc5f4\uae30\n});\n\napp.MapControllers();\n\napp.Run();<\/pre><\/div>\n\n\n\n<p>2) \ubaa8\ub378 (\uc720\ud6a8\uc131 \uac80\uc0ac \ud3ec\ud568)<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \" title=\"OSIModel\">using System.ComponentModel.DataAnnotations;\n\npublic class OSIModel\n{\n    public int Id { get; set; }\n\n    [Required, StringLength(60)]\n    public string PassengerName { get; set; } = string.Empty;\n\n    [Required, StringLength(3, MinimumLength = 2)]\n    public string Airline { get; set; } = string.Empty; \/\/ \uc608: KE, OZ, AA\n\n    [Required, StringLength(200)]\n    public string Message { get; set; } = string.Empty; \/\/ \uc608: CTCE\/EMAIL@DOMAIN.COM\n\n    public bool IsActive { get; set; } = true;\n}\n<\/pre><\/div>\n\n\n\n<p>3) \uac04\ub2e8\ud55c \uc778\uba54\ubaa8\ub9ac \uc800\uc7a5\uc18c (\ub370\ubaa8\uc6a9)<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \">using System.Collections.Concurrent;\n\npublic static class OsiStore\n{\n    \/\/ Thread-safe\n    private static readonly ConcurrentDictionary&lt;int, OSIModel&gt; _map = new();\n    private static int _seq = 0;\n\n    public static IEnumerable&lt;OSIModel&gt; GetAll() =&gt; _map.Values.OrderBy(x =&gt; x.Id);\n\n    public static OSIModel? Get(int id) =&gt; _map.TryGetValue(id, out var v) ? v : null;\n\n    public static OSIModel Add(OSIModel m)\n    {\n        var id = Interlocked.Increment(ref _seq);\n        m.Id = id;\n        _map[id] = m;\n        return m;\n    }\n\n    public static bool Update(int id, OSIModel m)\n    {\n        if (!_map.ContainsKey(id)) return false;\n        m.Id = id;\n        _map[id] = m;\n        return true;\n    }\n\n    public static bool Remove(int id) =&gt; _map.TryRemove(id, out _);\n}\n<\/pre><\/div>\n\n\n\n<p>4) \ucee8\ud2b8\ub864\ub7ec (CRUD + \uc0c1\ud0dc\ucf54\ub4dc \uba85\ud655\ud654)<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \" title=\"OSIController \">using Microsoft.AspNetCore.Mvc;\n\n[ApiController]\n[Route(\"api\/[controller]\")]\npublic class OSIController : ControllerBase\n{\n    \/\/\/ &lt;summary&gt;\uc804\uccb4 \uc870\ud68c&lt;\/summary&gt;\n    [HttpGet]\n    [ProducesResponseType(StatusCodes.Status200OK)]\n    public ActionResult&lt;IEnumerable&lt;OSIModel&gt;&gt; GetAll()\n        =&gt; Ok(OsiStore.GetAll());\n\n    \/\/\/ &lt;summary&gt;\ub2e8\uac74 \uc870\ud68c&lt;\/summary&gt;\n    [HttpGet(\"{id:int}\")]\n    [ProducesResponseType(StatusCodes.Status200OK)]\n    [ProducesResponseType(StatusCodes.Status404NotFound)]\n    public ActionResult&lt;OSIModel&gt; GetById(int id)\n    {\n        var item = OsiStore.Get(id);\n        if (item is null) return NotFound();\n        return Ok(item); \/\/ 200 + \ubcf8\ubb38\n    }\n\n    \/\/\/ &lt;summary&gt;\uc0dd\uc131 (201 Created + Location \ud5e4\ub354)&lt;\/summary&gt;\n    [HttpPost]\n    [ProducesResponseType(StatusCodes.Status201Created)]\n    [ProducesResponseType(StatusCodes.Status400BadRequest)]\n    public ActionResult&lt;OSIModel&gt; Create([FromBody] OSIModel newOsi)\n    {\n        if (!ModelState.IsValid) return ValidationProblem(ModelState);\n\n        var created = OsiStore.Add(newOsi);\n\n        \/\/ \ud575\uc2ec: 201 Created + Location \ud5e4\ub354 (GET \/api\/OSI\/{id}\ub85c \uc774\ub3d9 \uac00\ub2a5)\n        return CreatedAtAction(\n            nameof(GetById),       \/\/ \ub300\uc0c1 \uc561\uc158\n            new { id = created.Id }, \/\/ \ub77c\uc6b0\ud2b8 \uac12 (\uc774\ub984 \uc77c\uce58 \uc911\uc694!)\n            created                \/\/ \uc751\ub2f5 \ubc14\ub514\n        );\n    }\n\n    \/\/\/ &lt;summary&gt;\uc804\uccb4 \uc218\uc815 (\uc131\uacf5 \uc2dc 204 No Content)&lt;\/summary&gt;\n    [HttpPut(\"{id:int}\")]\n    [ProducesResponseType(StatusCodes.Status204NoContent)]\n    [ProducesResponseType(StatusCodes.Status400BadRequest)]\n    [ProducesResponseType(StatusCodes.Status404NotFound)]\n    public IActionResult Update(int id, [FromBody] OSIModel updated)\n    {\n        if (!ModelState.IsValid) return ValidationProblem(ModelState);\n\n        var exist = OsiStore.Get(id);\n        if (exist is null) return NotFound();\n\n        \/\/ Id\ub294 \uacbd\ub85c \uae30\uc900\uc73c\ub85c \uace0\uc815\n        updated.Id = id;\n\n        OsiStore.Update(id, updated);\n\n        return NoContent(); \/\/ 204, \ubcf8\ubb38 \uc5c6\uc774 \uc131\uacf5\n    }\n\n    \/\/\/ &lt;summary&gt;\ubd80\ubd84 \uc218\uc815 \uc608\uc2dc (\ud65c\uc131\ud654\/\ube44\ud65c\uc131 \uac19\uc740 \uc0c1\ud0dc \ud1a0\uae00)&lt;\/summary&gt;\n    [HttpPatch(\"{id:int}\/activate\")]\n    [ProducesResponseType(StatusCodes.Status204NoContent)]\n    [ProducesResponseType(StatusCodes.Status404NotFound)]\n    public IActionResult Activate(int id)\n    {\n        var exist = OsiStore.Get(id);\n        if (exist is null) return NotFound();\n\n        exist.IsActive = true;\n        OsiStore.Update(id, exist);\n        return NoContent();\n    }\n\n    \/\/\/ &lt;summary&gt;\uc0ad\uc81c (\uc131\uacf5 \uc2dc 204 No Content)&lt;\/summary&gt;\n    [HttpDelete(\"{id:int}\")]\n    [ProducesResponseType(StatusCodes.Status204NoContent)]\n    [ProducesResponseType(StatusCodes.Status404NotFound)]\n    public IActionResult Delete(int id)\n    {\n        var ok = OsiStore.Remove(id);\n        if (!ok) return NotFound();\n        return NoContent(); \/\/ 204, \ubcf8\ubb38 \uc5c6\uc74c\n    }\n}\n<\/pre><\/div>\n\n\n\n<p>5) Swagger\uc5d0\uc11c \ud14c\uc2a4\ud2b8 \ud750\ub984 (\uc694\uc57d)<\/p>\n\n\n\n<p><strong>POST \/api\/OSI<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Body \uc608\uc2dc:<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \">{\n  \"passengerName\": \"HONG GIL DONG\",\n  \"airline\": \"KE\",\n  \"message\": \"CTCE\/EMAIL@DOMAIN.COM\",\n  \"isActive\": true\n}\n<\/pre><\/div>\n\n\n\n<p>\uc751\ub2f5: <strong>201 Created<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\ud5e4\ub354: <code>Location: https:\/\/localhost:5001\/api\/OSI\/{id}<\/code><\/li>\n\n\n\n<li>\ubc14\ub514: \uc0dd\uc131\ub41c \uac1d\uccb4(JSON)<\/li>\n<\/ul>\n\n\n\n<p><strong>GET \/api\/OSI\/{id}<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\uc751\ub2f5: <strong>200 OK<\/strong> + \ud574\ub2f9 \uac1d\uccb4<\/li>\n<\/ul>\n\n\n\n<p><strong>PUT \/api\/OSI\/{id}<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\ubc14\ub514\uc5d0 \uc804\uccb4 \ud544\ub4dc \uc804\ub2ec<\/li>\n\n\n\n<li>\uc751\ub2f5: <strong>204 No Content<\/strong> (\ubcf8\ubb38 \uc5c6\uc74c)<\/li>\n<\/ul>\n\n\n\n<p><strong>DELETE \/api\/OSI\/{id}<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\uc751\ub2f5: <strong>204 No Content<\/strong><\/li>\n<\/ul>\n\n\n\n<p>StatusCodes \uc5f4\uac70\ud615(StatusCodes \ud074\ub798\uc2a4)<\/p>\n\n\n\n<p>\uc774 \uac12\ub4e4\uc740 <strong>Microsoft.AspNetCore.Http<\/strong> \ub124\uc784\uc2a4\ud398\uc774\uc2a4\uc5d0 \uc815\uc758\ub418\uc5b4 \uc788\uc5b4\uc694.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\uc5f4\uac70\ud615 \uc0c1\uc218<\/th><th>\uc22b\uc790<\/th><th>\uc758\ubbf8<\/th><\/tr><\/thead><tbody><tr><td><code>StatusCodes.Status200OK<\/code><\/td><td>200<\/td><td>\uc694\uccad \uc131\uacf5<\/td><\/tr><tr><td><code>StatusCodes.Status201Created<\/code><\/td><td>201<\/td><td>\ub9ac\uc18c\uc2a4 \uc0dd\uc131 \uc131\uacf5<\/td><\/tr><tr><td><code>StatusCodes.Status204NoContent<\/code><\/td><td>204<\/td><td>\uc694\uccad \uc131\uacf5, \ubcf8\ubb38 \uc5c6\uc74c<\/td><\/tr><tr><td><code>StatusCodes.Status400BadRequest<\/code><\/td><td>400<\/td><td>\uc798\ubabb\ub41c \uc694\uccad<\/td><\/tr><tr><td><code>StatusCodes.Status401Unauthorized<\/code><\/td><td>401<\/td><td>\uc778\uc99d \ud544\uc694<\/td><\/tr><tr><td><code>StatusCodes.Status403Forbidden<\/code><\/td><td>403<\/td><td>\uc811\uadfc \uae08\uc9c0<\/td><\/tr><tr><td><code>StatusCodes.Status404NotFound<\/code><\/td><td>404<\/td><td>\ub9ac\uc18c\uc2a4 \uc5c6\uc74c<\/td><\/tr><tr><td><code>StatusCodes.Status500InternalServerError<\/code><\/td><td>500<\/td><td>\uc11c\ubc84 \uc5d0\ub7ec<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\uc2e4\uc804 \ud328\ud134<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \">\/\/ \ub2e8\uc77c \uc870\ud68c\n[HttpGet(\"{id}\")]\n[ProducesResponseType(StatusCodes.Status200OK)]\n[ProducesResponseType(StatusCodes.Status404NotFound)]\npublic IActionResult GetById(int id) { ... }\n\n\/\/ \uc0dd\uc131\n[HttpPost]\n[ProducesResponseType(StatusCodes.Status201Created)]\n[ProducesResponseType(StatusCodes.Status400BadRequest)]\npublic IActionResult Create([FromBody] OSIModel newOsi) { ... }\n\n\/\/ \uc218\uc815\n[HttpPut(\"{id}\")]\n[ProducesResponseType(StatusCodes.Status204NoContent)]\n[ProducesResponseType(StatusCodes.Status400BadRequest)]\n[ProducesResponseType(StatusCodes.Status404NotFound)]\npublic IActionResult Update(int id, [FromBody] OSIModel updated) { ... }\n\n\/\/ \uc0ad\uc81c\n[HttpDelete(\"{id}\")]\n[ProducesResponseType(StatusCodes.Status204NoContent)]\n[ProducesResponseType(StatusCodes.Status404NotFound)]\npublic IActionResult Delete(int id) { ... }\n<\/pre><\/div>\n\n\n\n<p><code>[ProducesResponseType]<\/code>\uc740 <strong>Swagger \ubb38\uc11c \ud488\uc9c8\uc744 \ub192\uc774\uace0 \ud611\uc5c5\uc744 \uc6d0\ud65c\ud558\uac8c \ub9cc\ub4dc\ub294 \ud575\uc2ec \ub3c4\uad6c<\/strong>\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p>API \uc0ac\uc6a9\uc790\ub294 Swagger UI\uc5d0\uc11c <strong>&#8220;\uc774 API\uac00 \uc5b4\ub5a4 \uc0c1\ud669\uc5d0\uc11c \uc5b4\ub5a4 \uc0c1\ud0dc \ucf54\ub4dc\uc640 \ub370\uc774\ud130\ub97c \ubc18\ud658\ud558\ub294\uc9c0&#8221;<\/strong> \ubc14\ub85c \uc54c \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc2e4\ubb34\uc5d0\uc11c\ub294 <strong>\ubaa8\ub4e0 \ucee8\ud2b8\ub864\ub7ec \uc561\uc158\ub9c8\ub2e4 \uaf2d \uba85\uc2dc\ud558\ub294 \uac83\uc774 \uc88b\uc2b5\ub2c8\ub2e4.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. CRUD\uc758 \ub73b<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\uc57d\uc5b4<\/th><th>\uc758\ubbf8<\/th><th>\uc124\uba85<\/th><th>\uc608\uc2dc (HTTP \uba54\uc11c\ub4dc)<\/th><\/tr><\/thead><tbody><tr><td><strong>C<\/strong><\/td><td><strong>Create<\/strong><\/td><td>\uc0c8\ub85c\uc6b4 \ub370\uc774\ud130\ub97c <strong>\uc0dd\uc131<\/strong><\/td><td><strong>POST<\/strong><\/td><\/tr><tr><td><strong>R<\/strong><\/td><td><strong>Read<\/strong><\/td><td>\uc800\uc7a5\ub41c \ub370\uc774\ud130\ub97c <strong>\uc870\ud68c<\/strong><\/td><td><strong>GET<\/strong><\/td><\/tr><tr><td><strong>U<\/strong><\/td><td><strong>Update<\/strong><\/td><td>\uae30\uc874 \ub370\uc774\ud130\ub97c <strong>\uc218\uc815<\/strong><\/td><td><strong>PUT \/ PATCH<\/strong><\/td><\/tr><tr><td><strong>D<\/strong><\/td><td><strong>Delete<\/strong><\/td><td>\ub370\uc774\ud130\ub97c <strong>\uc0ad\uc81c<\/strong><\/td><td><strong>DELETE<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. CRUD\uc640 HTTP \uba54\uc11c\ub4dc\uc758 \uad00\uacc4<\/strong><\/h2>\n\n\n\n<p>RESTful API\uc5d0\uc11c\ub294 \ubcf4\ud1b5 <strong>CRUD \u2192 HTTP \uba54\uc11c\ub4dc<\/strong>\ub97c \ub2e4\uc74c\ucc98\ub7fc \ub9e4\ud551\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\ub3d9\uc791<\/th><th>\uc124\uba85<\/th><th>HTTP \uba54\uc11c\ub4dc<\/th><th>\uc608\uc2dc URL<\/th><\/tr><\/thead><tbody><tr><td><strong>Create<\/strong><\/td><td>\uc0c8 \ub370\uc774\ud130 \uc0dd\uc131<\/td><td><code>POST<\/code><\/td><td><code>POST \/api\/OSI<\/code><\/td><\/tr><tr><td><strong>Read (\uc804\uccb4)<\/strong><\/td><td>\uc804\uccb4 \ubaa9\ub85d \uc870\ud68c<\/td><td><code>GET<\/code><\/td><td><code>GET \/api\/OSI<\/code><\/td><\/tr><tr><td><strong>Read (\ub2e8\uc77c)<\/strong><\/td><td>\ud2b9\uc815 ID \ub370\uc774\ud130 \uc870\ud68c<\/td><td><code>GET<\/code><\/td><td><code>GET \/api\/OSI\/3<\/code><\/td><\/tr><tr><td><strong>Update<\/strong><\/td><td>\uae30\uc874 \ub370\uc774\ud130 \uc218\uc815<\/td><td><code>PUT<\/code> \ub610\ub294 <code>PATCH<\/code><\/td><td><code>PUT \/api\/OSI\/3<\/code><\/td><\/tr><tr><td><strong>Delete<\/strong><\/td><td>\ub370\uc774\ud130 \uc0ad\uc81c<\/td><td><code>DELETE<\/code><\/td><td><code>DELETE \/api\/OSI\/3<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>\uc2e4\ubb34\uc5d0\uc11c \uad8c\uc7a5\ub418\ub294 \uc0ac\uc6a9 \ud328\ud134 \uc791\uc5c5 \uc751\ub2f5 \ucf54\ub4dc \uc751\ub2f5 \uba54\uc11c\ub4dc \uc751\ub2f5 Body \uc0dd\uc131(Create) 201 CreatedAtAction() \uc0dd\uc131\ub41c \ub370\uc774\ud130 \uc870\ud68c(Read) 200 Ok() \ub370\uc774\ud130 \uc5c5\ub370\uc774\ud2b8(Update) 200 Ok() \uc5c5\ub370\uc774\ud2b8\ub41c \ub370\uc774\ud130 <a class=\"mh-excerpt-more\" href=\"https:\/\/www.auctionpro.co.kr\/?p=2410\" title=\"JSON \uac1c\uc694 \ubc0f \uc608\uc81c\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[60],"tags":[],"class_list":["post-2410","post","type-post","status-publish","format-standard","hentry","category-xsl"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JSON \uac1c\uc694 \ubc0f \uc608\uc81c - AuctionPro<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.auctionpro.co.kr\/?p=2410\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JSON \uac1c\uc694 \ubc0f \uc608\uc81c - AuctionPro\" \/>\n<meta property=\"og:description\" content=\"\uc2e4\ubb34\uc5d0\uc11c \uad8c\uc7a5\ub418\ub294 \uc0ac\uc6a9 \ud328\ud134 \uc791\uc5c5 \uc751\ub2f5 \ucf54\ub4dc \uc751\ub2f5 \uba54\uc11c\ub4dc \uc751\ub2f5 Body \uc0dd\uc131(Create) 201 CreatedAtAction() \uc0dd\uc131\ub41c \ub370\uc774\ud130 \uc870\ud68c(Read) 200 Ok() \ub370\uc774\ud130 \uc5c5\ub370\uc774\ud2b8(Update) 200 Ok() \uc5c5\ub370\uc774\ud2b8\ub41c \ub370\uc774\ud130 [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.auctionpro.co.kr\/?p=2410\" \/>\n<meta property=\"og:site_name\" content=\"AuctionPro\" \/>\n<meta property=\"article:published_time\" content=\"2013-05-23T03:38:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-03T03:04:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2013\/05\/image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"651\" \/>\n\t<meta property=\"og:image:height\" content=\"397\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"golgol\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"golgol\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"5\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410\"},\"author\":{\"name\":\"golgol\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#\\\/schema\\\/person\\\/d3dbae599b06cd55f5b14a3e2116f7a2\"},\"headline\":\"JSON \uac1c\uc694 \ubc0f \uc608\uc81c\",\"datePublished\":\"2013-05-23T03:38:58+00:00\",\"dateModified\":\"2025-09-03T03:04:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410\"},\"wordCount\":76,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/image.png\",\"articleSection\":[\"[Dev]XSL XML JSON\"],\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410\",\"url\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410\",\"name\":\"JSON \uac1c\uc694 \ubc0f \uc608\uc81c - AuctionPro\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/image.png\",\"datePublished\":\"2013-05-23T03:38:58+00:00\",\"dateModified\":\"2025-09-03T03:04:06+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#\\\/schema\\\/person\\\/d3dbae599b06cd55f5b14a3e2116f7a2\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410#primaryimage\",\"url\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/image.png\",\"contentUrl\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/image.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2410#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JSON \uac1c\uc694 \ubc0f \uc608\uc81c\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#website\",\"url\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/\",\"name\":\"AuctionPro\",\"description\":\"\uc625\uc158\ud504\ub85c\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#\\\/schema\\\/person\\\/d3dbae599b06cd55f5b14a3e2116f7a2\",\"name\":\"golgol\",\"url\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?author=6\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JSON \uac1c\uc694 \ubc0f \uc608\uc81c - AuctionPro","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.auctionpro.co.kr\/?p=2410","og_locale":"ko_KR","og_type":"article","og_title":"JSON \uac1c\uc694 \ubc0f \uc608\uc81c - AuctionPro","og_description":"\uc2e4\ubb34\uc5d0\uc11c \uad8c\uc7a5\ub418\ub294 \uc0ac\uc6a9 \ud328\ud134 \uc791\uc5c5 \uc751\ub2f5 \ucf54\ub4dc \uc751\ub2f5 \uba54\uc11c\ub4dc \uc751\ub2f5 Body \uc0dd\uc131(Create) 201 CreatedAtAction() \uc0dd\uc131\ub41c \ub370\uc774\ud130 \uc870\ud68c(Read) 200 Ok() \ub370\uc774\ud130 \uc5c5\ub370\uc774\ud2b8(Update) 200 Ok() \uc5c5\ub370\uc774\ud2b8\ub41c \ub370\uc774\ud130 [...]","og_url":"https:\/\/www.auctionpro.co.kr\/?p=2410","og_site_name":"AuctionPro","article_published_time":"2013-05-23T03:38:58+00:00","article_modified_time":"2025-09-03T03:04:06+00:00","og_image":[{"width":651,"height":397,"url":"https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2013\/05\/image.png","type":"image\/png"}],"author":"golgol","twitter_card":"summary_large_image","twitter_misc":{"\uae00\uc4f4\uc774":"golgol","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"5\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.auctionpro.co.kr\/?p=2410#article","isPartOf":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=2410"},"author":{"name":"golgol","@id":"https:\/\/www.auctionpro.co.kr\/#\/schema\/person\/d3dbae599b06cd55f5b14a3e2116f7a2"},"headline":"JSON \uac1c\uc694 \ubc0f \uc608\uc81c","datePublished":"2013-05-23T03:38:58+00:00","dateModified":"2025-09-03T03:04:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=2410"},"wordCount":76,"commentCount":0,"image":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=2410#primaryimage"},"thumbnailUrl":"https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2013\/05\/image.png","articleSection":["[Dev]XSL XML JSON"],"inLanguage":"ko-KR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.auctionpro.co.kr\/?p=2410#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.auctionpro.co.kr\/?p=2410","url":"https:\/\/www.auctionpro.co.kr\/?p=2410","name":"JSON \uac1c\uc694 \ubc0f \uc608\uc81c - AuctionPro","isPartOf":{"@id":"https:\/\/www.auctionpro.co.kr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=2410#primaryimage"},"image":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=2410#primaryimage"},"thumbnailUrl":"https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2013\/05\/image.png","datePublished":"2013-05-23T03:38:58+00:00","dateModified":"2025-09-03T03:04:06+00:00","author":{"@id":"https:\/\/www.auctionpro.co.kr\/#\/schema\/person\/d3dbae599b06cd55f5b14a3e2116f7a2"},"breadcrumb":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=2410#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.auctionpro.co.kr\/?p=2410"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.auctionpro.co.kr\/?p=2410#primaryimage","url":"https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2013\/05\/image.png","contentUrl":"https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2013\/05\/image.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.auctionpro.co.kr\/?p=2410#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/www.auctionpro.co.kr\/"},{"@type":"ListItem","position":2,"name":"JSON \uac1c\uc694 \ubc0f \uc608\uc81c"}]},{"@type":"WebSite","@id":"https:\/\/www.auctionpro.co.kr\/#website","url":"https:\/\/www.auctionpro.co.kr\/","name":"AuctionPro","description":"\uc625\uc158\ud504\ub85c","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.auctionpro.co.kr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Person","@id":"https:\/\/www.auctionpro.co.kr\/#\/schema\/person\/d3dbae599b06cd55f5b14a3e2116f7a2","name":"golgol","url":"https:\/\/www.auctionpro.co.kr\/?author=6"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2410"}],"version-history":[{"count":0,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2410\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}