Custom Fields
Re-Envisioned
Support General REST API Fields

  • Creator
    Topic
  • #5604
    alpha.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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #5605
    alpha.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 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 2 replies - 1 through 2 (of 2 total)
  • The topic ‘REST API Fields’ is closed to new replies.