API request and Python

Hey Craig,

Finally I got the production API instructions… But Now I have to authenticate using login and password to obtain the numero_processo updates…

Questions: How can I add this code on JS and also if theere is any way to secure the login and password (to authenticate on API) per user.

https://comunicaapi.pje.jus.br/swagger/index.html#/default/post_api_v1_comunicacao

{
  "status": "string",
  "message": "string",
  "count": 0,
  "items": [
    {
      "id": 0,
      "data_disponibilizacao": "string",
      "siglaTribunal": "string",
      "tipoComunicacao": "string",
      "nomeOrgao": "string",
      "texto": "string",
      "numero_processo": "string",
      "meio": "string",
      "link": "string",
      "tipoDocumento": "string",
      "nomeClasse": "string",
      "codigoClasse": "string",
      "numeroComunicacao": 0,
      "ativo": true,
      "hash": "string",
      "datadisponibilizacao": "string",
      "meiocompleto": "string",
      "numeroprocessocommascara": "string",
      "destinatarios": [
        {
          "nome": "string",
          "polo": "string",
          "comunicacao_id": 0
        }
      ],
      "destinatarioadvogados": [
        {
          "id": 0,
          "comunicacao_id": 0,
          "advogado_id": 0,
          "created_at": "string",
          "updated_at": "string",
          "advogado": {
            "id": 0,
            "nome": "string",
            "numero_oab": "string",
            "uf_oab": "string"
          }
        }
      ]
    }
  ]
}

Do you need to authenticate a Knack user?

Not for Knack, but to access https://comunicaapi.pje.jus.br/swagger/index.html#/default/post_api_v1_comunicacao it is required a specific user and password (which of course I do have)… Just thinking a way to secure the password in case of multiple users… But this is just a second phase. For now I’m cracking my head to get all the information on GET from PJE to knack database…

On Postman I got all data correctly. But on Knack, no luck…

What about storing it in the database on your or anyone else’s account?

All get data will be storage in our DB.