Changes
Page history
Update WPCT REST CE Landing API
authored
Mar 02, 2023
by
Pau Pulido
Hide 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-0
1
-0
5
T1
2:08:34
"
,
"date_gmt"
:
"2023-01-05T12:08:34"
,
"guid"
:{
"rendered
"
:
"https:
\/\/
somcomunitats.coop
\/
?post_type=rest
_
ce
_community
&p=17
09
"
},
"modified"
:
"2023-03-0
1
T1
2:18:21
"
,
"modified_gmt"
:
"2023-03-0
1
T1
2:18:21
"
,
"slug"
:
"comunitat-rest-de-prova
"
,
"status"
:
"publish
"
,
"type"
:
"rest_ce_community
"
,
"link"
:
"https:
\/\/
somcomunitats.coop
\/
rest-ce
\/
comunitat-rest-de-prova
\/
"
,
"title"
:{
"rendered"
:
"Comunitat REST de prova"
}
,
"content"
:{
"rendered"
:
""
,
"protected"
:
false
}
,
"author"
:
5
,
"comment_status"
:
"open"
,
"ping_status"
:
"closed"
,
"template"
:
""
,
"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"
:
[
{
"embeddable"
:
true
,
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
users
\/
5"
}
]
,
"replies"
:[
{
"embeddable"
:
true
,
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
comments?pos
t=17
09
"
}
],
"wp:attachment"
:[
{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
media?parent=1709"
}
],
"curies"
:[
{
"name"
:
"wp"
,
"href"
:
"https:
\/\/
api.w.org
\/
{rel}"
,
"templated"
:
true
}
]
}
"id"
:
1713
,
"date"
:
"2023-03-02T11:46:47"
,
"date
_gmt
"
:
"2023-0
3
-0
2
T1
1:46:47
"
,
"guid"
:
{
"rendered"
:
"https:
\/\/
somcomunitats.coop
\/
?post_type=rest-ce-landing&p=1713"
,
"raw
"
:
"https:
\/\/
somcomunitats.coop
\/
?post_type=rest
-
ce
-landing
&p=17
13
"
},
"modified"
:
"2023-03-0
2
T1
1:46:47
"
,
"modified_gmt"
:
"2023-03-0
2
T1
1:46:47
"
,
"password"
:
"
"
,
"slug"
:
"
"
,
"status"
:
"draft
"
,
"type"
:
"rest-ce-landing
"
,
"link"
:
"https:
\/\/
somcomunitats.coop
\/
?post_type=rest-ce-landing&p=1713"
,
"title"
:
{
"raw"
:
"test-desde-bash"
,
"rendered"
:
"test-desde-bash"
}
,
"content"
:
{
"raw"
:
""
,
"rendered"
:
""
,
"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
-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"
:
[{
"embeddable"
:
true
,
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
comments?post=1713"
}],
"wp:attachment"
:
[{
"href"
:
"https:
\/\/
somcomunitats.coop
\/
wp-json
\/
wp
\/
v2
\/
media?paren
t=17
13
"
}],
"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"
}
...
...
...
...