Java

1 2 3 4 5 6 7 8 9 10 HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.plexi.com.br/api/maestro/........")) .header("Content-Type", "application/json") .header("Accept", "application/json") .header("Callback", "string") .header("Authorization", "Bearer {chave-api}") .method("POST", HttpRequest.BodyPublishers.ofString("{\n\t\"renavam\": \"99999\"\n}")) .build(); HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body());

Substitua a URL da consulta, composta de Base URL + endpoint da consulta.

{chave-api}: chave da API que você visualiza acessando a interface

URL Base:

endpoint da consulta: Veja a documentação específica em https://crawly.atlassian.net/wiki/spaces/PLEXIAPI/pages/601522208