Mudanças entre as edições de "WordPress:REST API"
Ir para navegação
Ir para pesquisar
(Criou página com ' == API Posts == https://ufrgs.br/bibead/wp-json/ ou http://ufrgs.br/bibead/wp-json/wp/v2/posts http://yourdomain.com/wp-json/wp/v2/posts/<ID> === Criando um Post === c...') |
|||
| Linha 1: | Linha 1: | ||
| − | + | = Instalar o autenticador = | |
| + | Baixe o arquivo (ZIP) | ||
| + | https://github.com/WP-API/Basic-Auth | ||
| + | No WordPress clique nos PlugIn e envio o arquivo ZIP. | ||
== API Posts == | == API Posts == | ||
https://ufrgs.br/bibead/wp-json/ | https://ufrgs.br/bibead/wp-json/ | ||
| + | [https://hospedagemphp2.ufrgs.br/fabico/wp-json/ https://hospedagemphp2.ufrgs.br/fabico/wp-json/] | ||
ou | ou | ||
http://ufrgs.br/bibead/wp-json/wp/v2/posts | http://ufrgs.br/bibead/wp-json/wp/v2/posts | ||
Edição das 22h29min de 1 de dezembro de 2021
Instalar o autenticador
Baixe o arquivo (ZIP)
https://github.com/WP-API/Basic-Auth
No WordPress clique nos PlugIn e envio o arquivo ZIP.
API Posts
https://ufrgs.br/bibead/wp-json/ https://hospedagemphp2.ufrgs.br/fabico/wp-json/
ou
http://ufrgs.br/bibead/wp-json/wp/v2/posts
http://yourdomain.com/wp-json/wp/v2/posts/<ID>
Criando um Post
curl -X POST –user username:password http://yourdomain.com/wp-json/wp/v2/posts/<ID> -d ‘{“title”:”My New Title”}’
API Pages
http://ufrgs.br/bibead//wp-json/wp/v2/pages
WordPress REST API Basic Auth curl -X GET –user username:password -i http://yourdomain.com/wp-json/wp/v2/posts?status=draft