Skip to content

Latest commit

 

History

History
64 lines (59 loc) · 1.03 KB

expected_middleware_payload.md

File metadata and controls

64 lines (59 loc) · 1.03 KB

Create:

  "requests": [
    {
      "method": "POST",
      "url": "/api/v1/movies",
      "body": {
        "data": {
          "attributes": {
            "name": "The Zen Monk",
            "year": 2015
          },
          "relationships": { },
          "type": "movies"
        }
      }
    },
    { }
  ]
}

Update:

  "requests": [
    {
      "method": "PATCH",
      "url": "/api/v1/movies/1",
      "body": {
        "data": {
          "attributes": {
            "name": "The Zen Monk",
            "year": 2015
          },
          "relationships": { }
          },
          "type": "movies"
        }
      }
    },
    { }
  ]
}

Delete:

  "requests": [
    {
      "method": "DELETE",
      "url": "/api/v1/movies/11111",
      "body": "11111"
    },
    {
      "method": "DELETE",
      "url": "/api/v1/movies/22222",
      "body": "22222"
    }
  ]
}