Hi,
I’m trying to sent a POST request with the HTTP request node, to the Wordpress API. Specifically, I can’t figure out how to format the JSON for the post meta data.
If I send a GET request, this is the JSON I get:
[
{
"id": 998,
"date": "2022-12-02T18:44:08",
"date_gmt": "2022-12-03T02:44:08",
"guid": {
"rendered": "https://www.mysite.com/?post_type=my-post-type&p=998"
},
"modified": "2022-12-02T18:44:08",
"modified_gmt": "2022-12-03T02:44:08",
"slug": "",
"status": "draft",
"type": "my-post-type",
"link": "https://www.mysite.com/?post_type=my-post-type&p=998",
"title": {
"rendered": "New Launch"
},
"content": {
"rendered": "<p>The content.</p>",
"protected": false
},
"excerpt": {
"rendered": "<p>The content.</p>",
"protected": false
},
"author": 1,
"featured_media": 0,
"comment_status": "closed",
"ping_status": "closed",
"template": "",
"meta": {
"homepage": "",
"twitter": "",
"discord": "",
"twitter-followers-jet": "",
"discord-members-jet": "",
"discord-online-jet": ""
},
"post_type_category": [],
"post_type_tag": [],
"uagb_featured_image_src": {
"full": false,
"thumbnail": false,
"medium": false,
"medium_large": false,
"large": false,
"thumblist": false,
"meccarouselthumb": false,
"gridsquare": false,
"tileview": false,
"1536x1536": false,
"2048x2048": false
},
"uagb_author_info": {
"display_name": "Author Name",
"author_link": "https://www.mysite.com/author/author-name/"
},
"uagb_comment_info": 0,
"uagb_excerpt": "The content.",
"_links": {
"self": [
{
"href": "https://www.mysite.com/wp-json/wp/v2/my-post-type/998"
}
],
"collection": [
{
"href": "https://www.mysite.com/wp-json/wp/v2/my-post-type"
}
],
"about": [
{
"href": "https://www.mysite.com/wp-json/wp/v2/types/my-post-type"
}
],
"author": [
{
"embeddable": true,
"href": "https://www.mysite.com/wp-json/wp/v2/users/1"
}
],
"replies": [
{
"embeddable": true,
"href": "https://www.mysite.com/wp-json/wp/v2/comments?post=998"
}
],
"version-history": [
{
"count": 1,
"href": "https://www.mysite.com/wp-json/wp/v2/my-post-type/998/revisions"
}
],
"predecessor-version": [
{
"id": 61421,
"href": "https://www.mysite.com/wp-json/wp/v2/my-post-type/998/revisions/61421"
}
],
"wp:attachment": [
{
"href": "https://www.mysite.com/wp-json/wp/v2/media?parent=998"
}
],
"wp:term": [
{
"taxonomy": "my-post-type_category",
"embeddable": true,
"href": "https://www.mysite.com/wp-json/wp/v2/mec_category?post=998"
},
{
"taxonomy": "my-post-type_tag",
"embeddable": true,
"href": "https://www.mysite.com/wp-json/wp/v2/mec_tag?post=998"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}
]
I am able to post/edit to the top level items, like “title,” like this:
But I don’t understand what to put in the query parameters to make it change something in a second level, like the meta → homepage.
I’ve tried a bunch of things but am not getting it right, if anyone can give me a hint it would be greatly appreciated!