REST API Fields

Support General REST API Fields

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5604
    alpha.mediaalpha.media
    Participant

    I am wondering if sending post requests using meta box fields is supposed to work properly? I know the MB Rest API plugin works with GET requests but I do see functionality with updating post meta. I have been trying to send post requests as a test however I just can't get the data to populate correctly.

    I have tried sending the data as such:

    "meta": {
      "meta_key": "meta_value"
    }

    Also tried sending it as the same way the GET request shows the data.

    "meta_box": {
      "meta_key": "meta_value"
    }

    However, none are seeming to work. Could you please direct me in the best way to update post meta that is from the meta box plugin?

    #5605
    alpha.mediaalpha.media
    Participant

    I got it to work using the second option. I had to update the meta box plugin because it was breaking the REST API on the site I was trying to post to. After updating meta box plugin, the issue was fixed and the data posted correctly.

    "meta_box": {
      "meta_key": "meta_value"
    }
    #5612
    Anh TranAnh Tran
    Keymaster

    Yes, the 2nd method is the way we use to update post meta. The latest version of MB Rest API extension requires the latest Meta Box version to work (as we use some new function from Meta Box).

    Glad that you figured it out.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘REST API Fields’ is closed to new replies.