Changes
Page history
Update WPCT REST CE Landing API
authored
Mar 02, 2023
by
Pau Pulido
Show whitespace changes
Inline
Side-by-side
WPCT-REST-CE-Landing-API.md
View page @
70358637
...
...
@@ -6,73 +6,73 @@ Retorna la informació de tots els posts de les comunitats energètiques. Si afe
```
json
{
"id"
:
1709
,
"date"
:
"2023-01-05T12:08:34"
,
"date_gmt"
:
"2023-01-05T12:08:34"
,
"id"
:
1713
,
"date"
:
"2023-03-02T11:46:47"
,
"date_gmt"
:
"2023-03-02T11:46:47"
,
"guid"
:
{
"rendered"
:
"https:
\/\/
somcomunitats.coop
\/
?post_type=rest_ce_community&p=1709"
"rendered"
:
"https:
\/\/
somcomunitats.coop
\/
?post_type=rest-ce-landing&p=1713"
,
"raw"
:
"https:
\/\/
somcomunitats.coop
\/
?post_type=rest-ce-landing&p=1713"
},
"modified"
:
"2023-03-01T12:18:21"
,
"modified_gmt"
:
"2023-03-01T12:18:21"
,
"slug"
:
"comunitat-rest-de-prova"
,
"status"
:
"publish"
,
"type"
:
"rest_ce_community"
,
"link"
:
"https:
\/\/
somcomunitats.coop
\/
rest-ce
\/
comunitat-rest-de-prova
\/
"
,
"modified"
:
"2023-03-02T11:46:47"
,
"modified_gmt"
:
"2023-03-02T11:46:47"
,
"password"
:
""
,
"slug"
:
""
,
"status"
:
"draft"
,
"type"
:
"rest-ce-landing"
,
"link"
:
"https:
\/\/
somcomunitats.coop
\/
?post_type=rest-ce-landing&p=1713"
,
"title"
:
{
"rendered"
:
"Comunitat REST de prova"
"raw"
:
"test-desde-bash"
,
"rendered"
:
"test-desde-bash"
},
"content"
:
{
"raw"
:
""
,
"rendered"
:
""
,
"protected"
:
false
"protected"
:
false
,
"block_version"
:
0
},
"author"
:
5
,
"comment_status"
:
"open"
,
"ping_status"
:
"closed"
,
"template"
:
""
,
"permalink_template"
:
"https:
\/\/
somcomunitats.coop
\/
rest-ce-landing
\/
%pagename%
\/
"
,
"generated_slug"
:
"test-desde-bash"
,
"odoo_company_id"
:
"5"
,
"_links"
:
{
"self"
:[
{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
rest_ce_community
\/
1709"
}
],
"collection"
:[
{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
rest_ce_community"
}
],
"about"
:[
{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
types
\/
rest_ce_community"
}
],
"author"
:[
{
"self"
:
[{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
rest-ce-landing
\/
1713"
}],
"collection"
:
[{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
rest-ce-landing"
}],
"about"
:
[{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
types
\/
rest-ce-landing"
}],
"author"
:
[{
"embeddable"
:
true
,
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
users
\/
5"
}
],
"replies"
:[
{
}],
"replies"
:
[{
"embeddable"
:
true
,
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
comments?post=1709"
}
],
"wp:attachment"
:[
{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
media?parent=1709"
}
],
"curies"
:[
{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
comments?post=1713"
}],
"wp:attachment"
:
[{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
media?parent=1713"
}],
"wp:action-publish"
:
[{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
rest-ce-landing
\/
1713"
}],
"wp:action-unfiltered-html"
:
[{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
rest-ce-landing
\/
1713"
}],
"wp:action-assign-author"
:
[{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
rest-ce-landing
\/
1713"
}],
"curies"
:
[{
"name"
:
"wp"
,
"href"
:
"https:
\/\/
api.w.org
\/
{rel}"
,
"templated"
:
true
}]
}
]
}
}
...
...
@@ -102,7 +102,7 @@ Per crear una CE, cal passar a la petició POST a https://somcomunitats.coop/wp-
```
json
{
title:
"títol del post"
,
"
title
"
:
"títol del post"
,
"odoo_company_id"
:
"número de la company"
}
...
...
...
...