Browse Source

adiciona pasta curl com chamadas teste ao banco de dados

master
Henrique-Sousa 2 weeks ago
parent
commit
9798af0f86
7 changed files with 64 additions and 0 deletions
  1. +12
    -0
      curl/auth.sh
  2. +6
    -0
      curl/medicos/delete.sh
  3. +3
    -0
      curl/medicos/get.sh
  4. +17
    -0
      curl/medicos/post.sh
  5. +6
    -0
      curl/pacientes/delete.sh
  6. +3
    -0
      curl/pacientes/get.sh
  7. +17
    -0
      curl/pacientes/post.sh

+ 12
- 0
curl/auth.sh View File

@ -0,0 +1,12 @@
#!/bin/bash
curl -s \
'http://clinica.local.netu.no:9000/services/_auth' \
-X 'POST' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"username": "dev",
"password": "dev",
"jwt": true
}' | jq

+ 6
- 0
curl/medicos/delete.sh View File

@ -0,0 +1,6 @@
#!/bin/bash
curl -s \
"http://clinica.local.netu.no:9000/services/medicos?uid=$1" \
-X 'DELETE' \
-H "Authorization: Bearer $TOKEN" | jq

+ 3
- 0
curl/medicos/get.sh View File

@ -0,0 +1,3 @@
#!/bin/bash
curl -s 'http://clinica.local.netu.no:9000/services/medicos?campos=convenios,especialidades' | jq

+ 17
- 0
curl/medicos/post.sh View File

@ -0,0 +1,17 @@
#!/bin/bash
curl -s \
'http://clinica.local.netu.no:9000/services/medicos' \
-X 'POST' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TOKEN" \
-d '{
"crm": "02345780",
"especialidades": [
"9fe6bca9-7da2-4f23-a26a-c6c20872aa6c",
"d4688e22-ee5f-45d9-8526-36d53de50986"
],
"convenios": ["140b9cad-d4f9-44c7-b921-ac5f4ce5020f"],
"nome": "medico teste 1"
}' | jq

+ 6
- 0
curl/pacientes/delete.sh View File

@ -0,0 +1,6 @@
#!/bin/bash
curl -s \
"http://clinica.local.netu.no:9000/services/pacientes?uid=$1" \
-X 'DELETE' \
-H "Authorization: Bearer $TOKEN" | jq

+ 3
- 0
curl/pacientes/get.sh View File

@ -0,0 +1,3 @@
#!/bin/bash
curl -s 'http://clinica.local.netu.no:9000/services/pacientes?campos=convenios' | jq

+ 17
- 0
curl/pacientes/post.sh View File

@ -0,0 +1,17 @@
#!/bin/bash
curl -s \
'http://clinica.local.netu.no:9000/services/pacientes' \
-X 'POST' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TOKEN" \
-d '{
"cpf": "30984402",
"data_de_nascimento": "2026-03-19",
"endereco": "rua inexistente 42",
"nome": "paciente teste 1",
"rg": "2347892",
"telefone": "5555-5555",
"convenios": ["140b9cad-d4f9-44c7-b921-ac5f4ce5020f"]
}' | jq

Loading…
Cancel
Save