Mudanças entre as edições de "Requisições MiniGestao"

De MSTECH wiki
Ir para: navegação, pesquisa
(Criou página com '==Documentação - requisições CRUD== (Chrome) Postman - REST Client shortcut <Link> POST Header: Content-Type, Value: application/json Raw – Json <send> ===Chamada=...')
 
 
Linha 59: Linha 59:
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/Escola/GetAll  
 
http://localhost:52439/Escola/GetAll  
http://pastebin.com/YN5LHScH   
+
====Retorno:====
 +
http://pastebin.com/YN5LHScH   
 
===Get===
 
===Get===
 
http://localhost:52439/Escola/Get?id=1   
 
http://localhost:52439/Escola/Get?id=1   
http://pastebin.com/rVW5iicC  
+
====Retorno:====
 +
http://pastebin.com/rVW5iicC  
  
 
===GetByDocente===
 
===GetByDocente===
 
http://localhost:52439/Escola/GetByDocente?pes_id=df97ba73-762e-e611-80c9-00155d000d82  
 
http://localhost:52439/Escola/GetByDocente?pes_id=df97ba73-762e-e611-80c9-00155d000d82  
  
====Retorno:==== http://pastebin.com/7L0zjHpj  
+
====Retorno:====
 +
http://pastebin.com/7L0zjHpj  
 
===Save===
 
===Save===
 
http://localhost:52439/Escola/Save  
 
http://localhost:52439/Escola/Save  
  
====Entrada:==== http://pastebin.com/qn2we6Zg  
+
====Entrada:====
====Retorno:==== http://pastebin.com/BaZvYbe4  
+
http://pastebin.com/qn2we6Zg  
 +
====Retorno:====
 +
http://pastebin.com/BaZvYbe4  
 
===Edit===
 
===Edit===
 
http://localhost:52439/Ano/Edit  
 
http://localhost:52439/Ano/Edit  
====Entrada:==== http://pastebin.com/i5EvfG56  
+
====Entrada:====
 +
http://pastebin.com/i5EvfG56  
  
 
===Delete===
 
===Delete===
Linha 90: Linha 96:
 
http://localhost:52439/Ano/Save  
 
http://localhost:52439/Ano/Save  
  
====Entrada:==== http://pastebin.com/AUqXGM2Z  
+
====Entrada:====
====Retorno:==== http://pastebin.com/ix9Wd49H  
+
http://pastebin.com/AUqXGM2Z  
 +
====Retorno:====
 +
http://pastebin.com/ix9Wd49H  
 
===Edit===
 
===Edit===
 
http://localhost:52439/Ano/Edit  
 
http://localhost:52439/Ano/Edit  
====Entrada:==== http://pastebin.com/PShwpPxq  
+
====Entrada:====
 +
http://pastebin.com/PShwpPxq  
  
 
===Delete===
 
===Delete===
Linha 102: Linha 111:
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/Pessoa/GetAll  
 
http://localhost:52439/Pessoa/GetAll  
====Retorno:==== http://pastebin.com/yUNpYfPX  
+
====Retorno:====
 +
http://pastebin.com/yUNpYfPX  
  
 
===Get===  
 
===Get===  
Linha 109: Linha 119:
 
http://localhost:52439/Pessoa/Get?pes_id=772c60e0-bcdf-e511-80bf-e894f602060a  
 
http://localhost:52439/Pessoa/Get?pes_id=772c60e0-bcdf-e511-80bf-e894f602060a  
  
====Retorno:==== http://pastebin.com/FXb4LYKG  
+
====Retorno:====
 +
http://pastebin.com/FXb4LYKG  
  
 
==Aluno==
 
==Aluno==
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/Aluno/GetAll  
 
http://localhost:52439/Aluno/GetAll  
====Retorno:==== http://pastebin.com/qYkFN8zC  
+
====Retorno:====
 +
http://pastebin.com/qYkFN8zC  
 
Obs: Traz sem os dados de Responsável para diminuir a carga do banco
 
Obs: Traz sem os dados de Responsável para diminuir a carga do banco
  
Linha 120: Linha 132:
 
busca pelo ID do banco do mini-gestão (AlunoId: int)
 
busca pelo ID do banco do mini-gestão (AlunoId: int)
 
http://localhost:52439/Aluno/Get?id=4  
 
http://localhost:52439/Aluno/Get?id=4  
====Retorno:==== http://pastebin.com/sW46sZ0Q  
+
====Retorno:====
 +
http://pastebin.com/sW46sZ0Q  
 
===GetByTurma===
 
===GetByTurma===
 
http://localhost:52439/Aluno/GetByTurma?id=1  
 
http://localhost:52439/Aluno/GetByTurma?id=1  
====Retorno:==== http://pastebin.com/m39EgUet  
+
====Retorno:====
 +
http://pastebin.com/m39EgUet  
  
 
===GetByCoreSSO===
 
===GetByCoreSSO===
Linha 134: Linha 148:
  
 
====Retorno:====
 
====Retorno:====
 +
 
http://pastebin.com/RaaFEuEd  
 
http://pastebin.com/RaaFEuEd  
 
===Save===
 
===Save===
 
cria novo aluno, retornando os id’s do mesmo
 
cria novo aluno, retornando os id’s do mesmo
 
http://localhost:52439/Aluno/Save  
 
http://localhost:52439/Aluno/Save  
====Entrada:==== http://pastebin.com/7muwer6b  
+
====Entrada:====
====Retorno:==== http://pastebin.com/vRc0j93e   
+
http://pastebin.com/7muwer6b  
 +
====Retorno:====
 +
http://pastebin.com/vRc0j93e   
  
 
===Edit===
 
===Edit===
 
===Edit===a sem retorno
 
===Edit===a sem retorno
 
http://localhost:52439/Aluno/Edit  
 
http://localhost:52439/Aluno/Edit  
====Entrada:==== http://pastebin.com/tYQyUPBa  
+
====Entrada:====
 +
http://pastebin.com/tYQyUPBa  
  
 
===Delete===
 
===Delete===
Linha 152: Linha 170:
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/Docente/GetAll  
 
http://localhost:52439/Docente/GetAll  
====Retorno:==== http://pastebin.com/Bqfi7Jhp  
+
====Retorno:====
 +
http://pastebin.com/Bqfi7Jhp  
  
 
===Get===
 
===Get===
Linha 161: Linha 180:
 
===GetByTurma===
 
===GetByTurma===
 
http://localhost:52439/Docente/GetByTurma?id=1  
 
http://localhost:52439/Docente/GetByTurma?id=1  
====Retorno:==== http://pastebin.com/BzmSSNHW  
+
====Retorno:====
 +
http://pastebin.com/BzmSSNHW  
  
 
===GetByCoreSSO===
 
===GetByCoreSSO===
Linha 172: Linha 192:
  
 
====Retorno:====
 
====Retorno:====
 +
 
http://pastebin.com/UnCmUv2F  
 
http://pastebin.com/UnCmUv2F  
  
Linha 179: Linha 200:
  
 
http://localhost:52439/Docente/Save  
 
http://localhost:52439/Docente/Save  
====Entrada:==== http://pastebin.com/zgeiH0EN  
+
====Entrada:====
====Retorno:==== http://pastebin.com/R0PAYzb6  
+
http://pastebin.com/zgeiH0EN  
 +
====Retorno:====
 +
http://pastebin.com/R0PAYzb6  
  
 
===Edit===
 
===Edit===
 
===Edit===a sem retorno
 
===Edit===a sem retorno
 
http://localhost:52439/Docente/Edit  
 
http://localhost:52439/Docente/Edit  
====Entrada:==== http://pastebin.com/feunYBkZ  
+
====Entrada:====
 +
http://pastebin.com/feunYBkZ  
  
 
===Delete===
 
===Delete===
Linha 193: Linha 217:
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/caderneta/getall  
 
http://localhost:52439/caderneta/getall  
====Retorno:==== http://pastebin.com/nPdcmGuM   
+
====Retorno:====
 +
http://pastebin.com/nPdcmGuM   
  
 
===Get===
 
===Get===
 
http://localhost:52439/caderneta/get?id=2  
 
http://localhost:52439/caderneta/get?id=2  
====Retorno:==== http://pastebin.com/PgyGsEVa  
+
====Retorno:====
 +
http://pastebin.com/PgyGsEVa  
  
 
===Save===
 
===Save===
 
http://localhost:52439/caderneta/save  
 
http://localhost:52439/caderneta/save  
====Entrada:==== http://pastebin.com/Kc0GNUpL  
+
====Entrada:====
====Retorno:==== http://pastebin.com/fsJYytgy  
+
http://pastebin.com/Kc0GNUpL  
 +
====Retorno:====
 +
http://pastebin.com/fsJYytgy  
  
 
Observação: caso seja enviado um id da chave primária que já existe no banco, não é cadastrado nada e o método retorna a mesma coisa que veio na requisição.
 
Observação: caso seja enviado um id da chave primária que já existe no banco, não é cadastrado nada e o método retorna a mesma coisa que veio na requisição.
Linha 210: Linha 238:
 
===Edit===
 
===Edit===
 
http://localhost:52439/caderneta/edit  
 
http://localhost:52439/caderneta/edit  
====Entrada:==== http://pastebin.com/wWu3n9ZD  
+
====Entrada:====
 +
http://pastebin.com/wWu3n9ZD  
 
===Delete===
 
===Delete===
 
http://localhost:52439/caderneta/delete?id=1  
 
http://localhost:52439/caderneta/delete?id=1  
Linha 217: Linha 246:
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/aula/getall  
 
http://localhost:52439/aula/getall  
====Retorno:==== http://pastebin.com/659YXvgV  
+
====Retorno:====
 +
http://pastebin.com/659YXvgV  
 
===Get===
 
===Get===
 
http://localhost:52439/aula/get?id=2005  
 
http://localhost:52439/aula/get?id=2005  
====Retorno:==== http://pastebin.com/gwQyh48A  
+
====Retorno:====
 +
http://pastebin.com/gwQyh48A  
 
===Save===
 
===Save===
 
http://localhost:52439/aula/save
 
http://localhost:52439/aula/save
  
====Entrada:==== http://pastebin.com/t6x9HQrx  
+
====Entrada:====
 +
http://pastebin.com/t6x9HQrx  
 
saída: http://pastebin.com/sTZ5sX4K  
 
saída: http://pastebin.com/sTZ5sX4K  
  
Linha 231: Linha 263:
 
Caso seja enviado um json com um id que não existe, é cadastrada uma nova aula, com um novo ID (que não necessariamente é o ID que veio na requisição), e retornado o novo registro com o novo ID.
 
Caso seja enviado um json com um id que não existe, é cadastrada uma nova aula, com um novo ID (que não necessariamente é o ID que veio na requisição), e retornado o novo registro com o novo ID.
  
====Entrada:==== http://pastebin.com/WUGHTCy2  
+
====Entrada:====
====Retorno:==== http://pastebin.com/yS1RjW8h   
+
http://pastebin.com/WUGHTCy2  
 +
====Retorno:====
 +
http://pastebin.com/yS1RjW8h   
  
 
===Edit===
 
===Edit===
 
http://localhost:52439/Aula/Edit  
 
http://localhost:52439/Aula/Edit  
====Entrada:==== http://pastebin.com/v4vDfyML  
+
====Entrada:====
 +
http://pastebin.com/v4vDfyML  
  
 
===Delete===
 
===Delete===
Linha 244: Linha 279:
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/curso/GetAll  
 
http://localhost:52439/curso/GetAll  
====Retorno:==== http://pastebin.com/14bHspwb  
+
====Retorno:====
 +
http://pastebin.com/14bHspwb  
  
 
===Get===
 
===Get===
 
http://localhost:52439/curso/Get?id=4  
 
http://localhost:52439/curso/Get?id=4  
====Retorno:==== http://pastebin.com/5Z6ReW6c  
+
====Retorno:====
 +
http://pastebin.com/5Z6ReW6c  
 
===Save===
 
===Save===
 
http://localhost:52439/curso/Save  
 
http://localhost:52439/curso/Save  
====Entrada:==== http://pastebin.com/YgC9Gb8k  
+
====Entrada:====
====Retorno:==== http://pastebin.com/DHTfjSmk  
+
http://pastebin.com/YgC9Gb8k  
 +
====Retorno:====
 +
http://pastebin.com/DHTfjSmk  
 
===Edit===
 
===Edit===
 
http://localhost:52439/curso/Edit  
 
http://localhost:52439/curso/Edit  
====Entrada:==== http://pastebin.com/shRySuUN  
+
====Entrada:====
 +
http://pastebin.com/shRySuUN  
 
===Delete===
 
===Delete===
 
http://localhost:52439/curso/Delete?id=2  
 
http://localhost:52439/curso/Delete?id=2  
Linha 262: Linha 302:
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/cursoDisciplina/GetAll  
 
http://localhost:52439/cursoDisciplina/GetAll  
====Retorno:==== http://pastebin.com/hdVXZGYz  
+
====Retorno:====
 +
http://pastebin.com/hdVXZGYz  
 
===Get===
 
===Get===
 
http://localhost:52439/cursoDisciplina/Get?id=1011  
 
http://localhost:52439/cursoDisciplina/Get?id=1011  
====Retorno:==== http://pastebin.com/UAdtQMpJ  
+
====Retorno:====
 +
http://pastebin.com/UAdtQMpJ  
 
===Save===
 
===Save===
 
http://localhost:52439/cursoDisciplina/Save  
 
http://localhost:52439/cursoDisciplina/Save  
====Entrada:==== http://pastebin.com/NbvRSgem  
+
====Entrada:====
====Retorno:==== http://pastebin.com/ZTka7pqZ  
+
http://pastebin.com/NbvRSgem  
 +
====Retorno:====
 +
http://pastebin.com/ZTka7pqZ  
 
===Delete===
 
===Delete===
 
http://localhost:52439/cursoDisciplina/Delete?id=1010  
 
http://localhost:52439/cursoDisciplina/Delete?id=1010  
 
===Edit===
 
===Edit===
 
http://localhost:52439/cursoDisciplina/Edit  
 
http://localhost:52439/cursoDisciplina/Edit  
====Entrada:==== http://pastebin.com/YRqhvQqh  
+
====Entrada:====
 +
http://pastebin.com/YRqhvQqh  
  
 
==Disciplina==
 
==Disciplina==
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/Disciplina/GetAll  
 
http://localhost:52439/Disciplina/GetAll  
====Retorno:==== http://pastebin.com/zdhQ8ZY2  
+
====Retorno:====
 +
http://pastebin.com/zdhQ8ZY2  
 
===Get===
 
===Get===
 
http://localhost:52439/Disciplina/Get?id=3  
 
http://localhost:52439/Disciplina/Get?id=3  
====Retorno:==== http://pastebin.com/43z0dseW  
+
====Retorno:====
 +
http://pastebin.com/43z0dseW  
 
===Save===
 
===Save===
 
http://localhost:52439/Disciplina/Save  
 
http://localhost:52439/Disciplina/Save  
====Entrada:==== http://pastebin.com/s8UqHXwZ  
+
====Entrada:====
====Retorno:==== http://pastebin.com/k8dfePdz  
+
http://pastebin.com/s8UqHXwZ  
 +
====Retorno:====
 +
http://pastebin.com/k8dfePdz  
 
===Edit===
 
===Edit===
 
http://localhost:52439/Disciplina/Edit  
 
http://localhost:52439/Disciplina/Edit  
====Entrada:==== http://pastebin.com/qyC2R8KD  
+
====Entrada:====
 +
http://pastebin.com/qyC2R8KD  
 
===Delete===
 
===Delete===
 
http://localhost:52439/Disciplina/Delete?id=1  
 
http://localhost:52439/Disciplina/Delete?id=1  
Linha 296: Linha 346:
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/DocenteTurmaDisciplina/getall  
 
http://localhost:52439/DocenteTurmaDisciplina/getall  
====Retorno:==== http://pastebin.com/rjJJ0cNj  
+
====Retorno:====
 +
http://pastebin.com/rjJJ0cNj  
  
 
===GetByBusca===
 
===GetByBusca===
Linha 302: Linha 353:
  
 
http://localhost:52439/Docenteturmadisciplina/GetByBusca?escolaId=2&cursoId=1&anoId=1&turmaId=1&disciplinaId=2&docenteId=1  
 
http://localhost:52439/Docenteturmadisciplina/GetByBusca?escolaId=2&cursoId=1&anoId=1&turmaId=1&disciplinaId=2&docenteId=1  
====Retorno:==== http://pastebin.com/R4q9ALXw  
+
====Retorno:====
 +
http://pastebin.com/R4q9ALXw  
  
 
===Get===
 
===Get===
 
http://localhost:52439/DocenteTurmaDisciplina/get?id=8  
 
http://localhost:52439/DocenteTurmaDisciplina/get?id=8  
====Retorno:==== http://pastebin.com/HzmBDcQ7  
+
====Retorno:====
 +
http://pastebin.com/HzmBDcQ7  
 
===Save===
 
===Save===
 
http://localhost:52439/DocenteTurmaDisciplina/Save  
 
http://localhost:52439/DocenteTurmaDisciplina/Save  
====Entrada:==== http://pastebin.com/Xc1qUnPx  
+
====Entrada:====
====Retorno:==== http://pastebin.com/7PD4x8gT  
+
http://pastebin.com/Xc1qUnPx  
 +
====Retorno:====
 +
http://pastebin.com/7PD4x8gT  
 
===Edit===
 
===Edit===
 
(atenção: é preciso preencher os id’s de turma e disciplina dos objetos internos)
 
(atenção: é preciso preencher os id’s de turma e disciplina dos objetos internos)
 
http://localhost:52439/DocenteTurmaDisciplina/Edit  
 
http://localhost:52439/DocenteTurmaDisciplina/Edit  
====Entrada:==== http://pastebin.com/ERjUT8iJ  
+
====Entrada:====
 +
http://pastebin.com/ERjUT8iJ  
 
===Delete===
 
===Delete===
 
http://localhost:52439/DocenteTurmaDisciplina/delete?id=6  
 
http://localhost:52439/DocenteTurmaDisciplina/delete?id=6  
Linha 321: Linha 377:
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/Turma/GetAll  
 
http://localhost:52439/Turma/GetAll  
====Retorno:==== http://pastebin.com/QGBCs6iA  
+
====Retorno:====
 +
http://pastebin.com/QGBCs6iA  
  
 
===GetAllWithEscola===
 
===GetAllWithEscola===
Linha 327: Linha 384:
  
 
http://localhost:52439/Turma/GetAllWithEscola  
 
http://localhost:52439/Turma/GetAllWithEscola  
====Retorno:==== http://pastebin.com/i3rsn7r2  
+
====Retorno:====
 +
http://pastebin.com/i3rsn7r2  
  
 
===Get===
 
===Get===
 
http://localhost:52439/Turma/Get?id=2010  
 
http://localhost:52439/Turma/Get?id=2010  
====Retorno:==== http://pastebin.com/0f89jF7N  
+
====Retorno:====
 +
http://pastebin.com/0f89jF7N  
 
===GetByEscola===
 
===GetByEscola===
 
http://localhost:52439/Turma/GetByEscola?id=2  
 
http://localhost:52439/Turma/GetByEscola?id=2  
Linha 338: Linha 397:
 
===GetByBusca===
 
===GetByBusca===
 
http://localhost:52439/Turma/GetByBusca?escolaId=2&anoId=1&cursoId=1  
 
http://localhost:52439/Turma/GetByBusca?escolaId=2&anoId=1&cursoId=1  
====Retorno:==== http://pastebin.com/qZmzRzx9  
+
====Retorno:====
 +
http://pastebin.com/qZmzRzx9  
  
 
===GetByPessoaEscola===
 
===GetByPessoaEscola===
Linha 348: Linha 408:
  
  
====Retorno:==== http://pastebin.com/pmpDnaDK  
+
====Retorno:====
 +
http://pastebin.com/pmpDnaDK  
  
 
===Save===
 
===Save===
 
http://localhost:52439/Turma/Save  
 
http://localhost:52439/Turma/Save  
====Entrada:==== http://pastebin.com/8gYEjZuB  
+
====Entrada:====
 +
http://pastebin.com/8gYEjZuB  
 
saída: (em correção)
 
saída: (em correção)
 
===Edit===
 
===Edit===
 
http://localhost:52439/Turma/Edit  
 
http://localhost:52439/Turma/Edit  
====Entrada:==== http://pastebin.com/ScXfYkbY
+
====Entrada:====
 +
http://pastebin.com/ScXfYkbY
 
===Delete===
 
===Delete===
 
http://localhost:52439/Turma/Delete?id=2009  
 
http://localhost:52439/Turma/Delete?id=2009  
Linha 363: Linha 426:
 
===GetAll===
 
===GetAll===
 
http://localhost:52439/TurmaDisciplina/GetAll  
 
http://localhost:52439/TurmaDisciplina/GetAll  
====Retorno:==== http://pastebin.com/gSz0305h  
+
====Retorno:====
 +
http://pastebin.com/gSz0305h  
  
 
===GetByBusca===
 
===GetByBusca===
Linha 369: Linha 433:
  
 
http://localhost:52439/turmadisciplina/GetByBusca?turmaid=1&disciplinaid=2  
 
http://localhost:52439/turmadisciplina/GetByBusca?turmaid=1&disciplinaid=2  
====Retorno:==== http://pastebin.com/8kGNEPC5  
+
====Retorno:====
 +
http://pastebin.com/8kGNEPC5  
 
===Get===
 
===Get===
 
http://localhost:52439/TurmaDisciplina/Get?id=2011  
 
http://localhost:52439/TurmaDisciplina/Get?id=2011  
====Retorno:==== http://pastebin.com/v7JHHdRu  
+
====Retorno:====
 +
http://pastebin.com/v7JHHdRu  
  
 
===Save===
 
===Save===
 
http://localhost:52439/TurmaDisciplina/Save  
 
http://localhost:52439/TurmaDisciplina/Save  
====Entrada:==== http://pastebin.com/dnkeCD5H  
+
====Entrada:====
====Retorno:==== http://pastebin.com/SbXYYksH  
+
http://pastebin.com/dnkeCD5H  
 +
====Retorno:====
 +
http://pastebin.com/SbXYYksH  
  
 
===Edit===
 
===Edit===
 
http://localhost:52439/TurmaDisciplina/Edit  
 
http://localhost:52439/TurmaDisciplina/Edit  
====Entrada:==== http://pastebin.com/fLZmpUEV  
+
====Entrada:====
 +
http://pastebin.com/fLZmpUEV  
 
===Delete===
 
===Delete===
 
http://localhost:52439/TurmaDisciplina/Delete?id=2010
 
http://localhost:52439/TurmaDisciplina/Delete?id=2010

Edição atual tal como às 16h05min de 18 de agosto de 2016

Índice

Documentação - requisições CRUD

(Chrome) Postman - REST Client shortcut

<Link> POST Header: Content-Type, Value: application/json

Raw – Json <send>


Chamada

tipo requisição ===Get===, GetAll

Get

===Save===, Edit, Delete POST




Como buscar paginado no postman:

<link> GET

Header Value (exemplo) Descrição Content-Type application/json cabeçalho json PageSize 2 tamanho da página. se não colocar nada, por padrão é 10. CurrentPage 0 página que será exibida. a primeira página é 0 SortField Name nome do campo do json que será ordenado o resultado. sem aspas. Case Sensitive! Diferencia maiúscula de minúscula! SortDir asc ou desc ordenação ascendente ou descendente. colocar “asc” ou “desc” sem aspas. por padrão é “asc”.

Além disso, este resultado retorna via response, mais alguns headers, em especial 2 campos:


Header Value (exemplo) Descrição TotalPages 7 Total de páginas que essa busca possui, baseado no tamanho da página e contagem de registros. X-RecordsCount 19 Total de registros da página.

Escola

GetAll

http://localhost:52439/Escola/GetAll

Retorno:

http://pastebin.com/YN5LHScH  

Get

http://localhost:52439/Escola/Get?id=1

Retorno:

http://pastebin.com/rVW5iicC 

GetByDocente

http://localhost:52439/Escola/GetByDocente?pes_id=df97ba73-762e-e611-80c9-00155d000d82

Retorno:

http://pastebin.com/7L0zjHpj 

Save

http://localhost:52439/Escola/Save

Entrada:

http://pastebin.com/qn2we6Zg

Retorno:

http://pastebin.com/BaZvYbe4 

Edit

http://localhost:52439/Ano/Edit

Entrada:

http://pastebin.com/i5EvfG56

Delete

http://localhost:52439/Escola/Delete?id=5

Ano

Get

http://localhost:52439/Ano/GetAll http://pastebin.com/g2tBHFNn

GetAll

http://localhost:52439/Ano/Get?id=20 http://pastebin.com/Zdhh858P

Save

http://localhost:52439/Ano/Save

Entrada:

http://pastebin.com/AUqXGM2Z

Retorno:

http://pastebin.com/ix9Wd49H 

Edit

http://localhost:52439/Ano/Edit

Entrada:

http://pastebin.com/PShwpPxq

Delete

http://localhost:52439/Ano/Delete?id=10

Pessoa

GetAll

http://localhost:52439/Pessoa/GetAll

Retorno:

http://pastebin.com/yUNpYfPX 

Get

busca dados da pessoa + usuário do Core passando o pes_id (Guid):

http://localhost:52439/Pessoa/Get?pes_id=772c60e0-bcdf-e511-80bf-e894f602060a

Retorno:

http://pastebin.com/FXb4LYKG 

Aluno

GetAll

http://localhost:52439/Aluno/GetAll

Retorno:

http://pastebin.com/qYkFN8zC 

Obs: Traz sem os dados de Responsável para diminuir a carga do banco

Get

busca pelo ID do banco do mini-gestão (AlunoId: int) http://localhost:52439/Aluno/Get?id=4

Retorno:

http://pastebin.com/sW46sZ0Q 

GetByTurma

http://localhost:52439/Aluno/GetByTurma?id=1

Retorno:

http://pastebin.com/m39EgUet 

GetByCoreSSO

busca aluno tanto pelo pes_id quanto pelo usu_id, ambos são opcionais, mas pelo menos 1 precisa ser obrigatório para retornar um resultado:

(por usu_id_coresso) http://localhost:52439/Aluno/GetByCoreSSO?usu_id=4cbe2fa1-452f-e611-80c9-00155d000d82

(por pes_id_coresso) http://localhost:52439/Aluno/GetByCoreSSO?pes_id=b32daff9-732e-e611-80c9-00155d000d82

Retorno:

http://pastebin.com/RaaFEuEd

Save

cria novo aluno, retornando os id’s do mesmo http://localhost:52439/Aluno/Save

Entrada:

http://pastebin.com/7muwer6b

Retorno:

http://pastebin.com/vRc0j93e  

Edit

===Edit===a sem retorno http://localhost:52439/Aluno/Edit

Entrada:

http://pastebin.com/tYQyUPBa

Delete

http://localhost:52439/Aluno/Delete?id=3

Docente

GetAll

http://localhost:52439/Docente/GetAll

Retorno:

http://pastebin.com/Bqfi7Jhp 

Get

Busca pelo ID do miniGestão (docenteId : int)

http://localhost:52439/Docente/Get?id=3

GetByTurma

http://localhost:52439/Docente/GetByTurma?id=1

Retorno:

http://pastebin.com/BzmSSNHW 

GetByCoreSSO

busca docente tanto pelo pes_id quanto pelo usu_id, ambos são opcionais, mas pelo menos 1 precisa ser obrigatório para retornar um resultado:

(por usu_id_coresso) http://localhost:52439/Docente/getByCoreSSO?usu_id=e757577e-762e-e611-80c9-00155d000d82

(por pes_id_coresso) http://localhost:52439/Docente/getByCoreSSO?pes_id=e657577e-762e-e611-80c9-00155d000d82

Retorno:

http://pastebin.com/UnCmUv2F


Save

cria novo aluno, retornando os id’s do mesmo

http://localhost:52439/Docente/Save

Entrada:

http://pastebin.com/zgeiH0EN

Retorno:

http://pastebin.com/R0PAYzb6 

Edit

===Edit===a sem retorno http://localhost:52439/Docente/Edit

Entrada:

http://pastebin.com/feunYBkZ

Delete

http://localhost:52439/docente/Delete?id=1

Caderneta

GetAll

http://localhost:52439/caderneta/getall

Retorno:

http://pastebin.com/nPdcmGuM  

Get

http://localhost:52439/caderneta/get?id=2

Retorno:

http://pastebin.com/PgyGsEVa 

Save

http://localhost:52439/caderneta/save

Entrada:

http://pastebin.com/Kc0GNUpL

Retorno:

http://pastebin.com/fsJYytgy 

Observação: caso seja enviado um id da chave primária que já existe no banco, não é cadastrado nada e o método retorna a mesma coisa que veio na requisição.

Caso este ID não exista, é chamado o método de gravação, que grava o registro, caso este não tenha a mesma combinação de chave estrangeira no BD.

Edit

http://localhost:52439/caderneta/edit

Entrada:

http://pastebin.com/wWu3n9ZD

Delete

http://localhost:52439/caderneta/delete?id=1

Aula

GetAll

http://localhost:52439/aula/getall

Retorno:

http://pastebin.com/659YXvgV 

Get

http://localhost:52439/aula/get?id=2005

Retorno:

http://pastebin.com/gwQyh48A 

Save

http://localhost:52439/aula/save

Entrada:

http://pastebin.com/t6x9HQrx saída: http://pastebin.com/sTZ5sX4K

Observação: caso seja enviado um json com um ID que já existe no banco, não é cadastrado nada, e retorna o mesmo json da requisição.

Caso seja enviado um json com um id que não existe, é cadastrada uma nova aula, com um novo ID (que não necessariamente é o ID que veio na requisição), e retornado o novo registro com o novo ID.

Entrada:

http://pastebin.com/WUGHTCy2

Retorno:

http://pastebin.com/yS1RjW8h  

Edit

http://localhost:52439/Aula/Edit

Entrada:

http://pastebin.com/v4vDfyML

Delete

http://localhost:52439/aula/Delete?id=1005 Curso

GetAll

http://localhost:52439/curso/GetAll

Retorno:

http://pastebin.com/14bHspwb 

Get

http://localhost:52439/curso/Get?id=4

Retorno:

http://pastebin.com/5Z6ReW6c 

Save

http://localhost:52439/curso/Save

Entrada:

http://pastebin.com/YgC9Gb8k

Retorno:

http://pastebin.com/DHTfjSmk 

Edit

http://localhost:52439/curso/Edit

Entrada:

http://pastebin.com/shRySuUN

Delete

http://localhost:52439/curso/Delete?id=2

CursoDisciplina

GetAll

http://localhost:52439/cursoDisciplina/GetAll

Retorno:

http://pastebin.com/hdVXZGYz 

Get

http://localhost:52439/cursoDisciplina/Get?id=1011

Retorno:

http://pastebin.com/UAdtQMpJ 

Save

http://localhost:52439/cursoDisciplina/Save

Entrada:

http://pastebin.com/NbvRSgem

Retorno:

http://pastebin.com/ZTka7pqZ 

Delete

http://localhost:52439/cursoDisciplina/Delete?id=1010

Edit

http://localhost:52439/cursoDisciplina/Edit

Entrada:

http://pastebin.com/YRqhvQqh

Disciplina

GetAll

http://localhost:52439/Disciplina/GetAll

Retorno:

http://pastebin.com/zdhQ8ZY2 

Get

http://localhost:52439/Disciplina/Get?id=3

Retorno:

http://pastebin.com/43z0dseW 

Save

http://localhost:52439/Disciplina/Save

Entrada:

http://pastebin.com/s8UqHXwZ

Retorno:

http://pastebin.com/k8dfePdz 

Edit

http://localhost:52439/Disciplina/Edit

Entrada:

http://pastebin.com/qyC2R8KD

Delete

http://localhost:52439/Disciplina/Delete?id=1

DocenteTurmaDisciplina

GetAll

http://localhost:52439/DocenteTurmaDisciplina/getall

Retorno:

http://pastebin.com/rjJJ0cNj 

GetByBusca

Retorna o objeto com os devidos objetos filhos com todos os parâmetros opcionais:

http://localhost:52439/Docenteturmadisciplina/GetByBusca?escolaId=2&cursoId=1&anoId=1&turmaId=1&disciplinaId=2&docenteId=1

Retorno:

http://pastebin.com/R4q9ALXw 

Get

http://localhost:52439/DocenteTurmaDisciplina/get?id=8

Retorno:

http://pastebin.com/HzmBDcQ7 

Save

http://localhost:52439/DocenteTurmaDisciplina/Save

Entrada:

http://pastebin.com/Xc1qUnPx

Retorno:

http://pastebin.com/7PD4x8gT 

Edit

(atenção: é preciso preencher os id’s de turma e disciplina dos objetos internos) http://localhost:52439/DocenteTurmaDisciplina/Edit

Entrada:

http://pastebin.com/ERjUT8iJ

Delete

http://localhost:52439/DocenteTurmaDisciplina/delete?id=6

Turma

GetAll

http://localhost:52439/Turma/GetAll

Retorno:

http://pastebin.com/QGBCs6iA 

GetAllWithEscola

Retorna todas as turmas com os dados da Escola do CoreSSO

http://localhost:52439/Turma/GetAllWithEscola

Retorno:

http://pastebin.com/i3rsn7r2 

Get

http://localhost:52439/Turma/Get?id=2010

Retorno:

http://pastebin.com/0f89jF7N 

GetByEscola

http://localhost:52439/Turma/GetByEscola?id=2 http://pastebin.com/KkkNSTvZ

GetByBusca

http://localhost:52439/Turma/GetByBusca?escolaId=2&anoId=1&cursoId=1

Retorno:

http://pastebin.com/qZmzRzx9 

GetByPessoaEscola

Busca tanto por pes_id do Docente quanto pelo uad_id da Escola (o parâmetro aceita ambos)

http://localhost:52439/Turma/GetByPessoaEscola?pes_id=df97ba73-762e-e611-80c9-00155d000d82

http://localhost:52439/Turma/GetByPessoaEscola?uad_id=67e70485-532e-e611-80c9-00155d000d82


Retorno:

http://pastebin.com/pmpDnaDK 

Save

http://localhost:52439/Turma/Save

Entrada:

http://pastebin.com/8gYEjZuB saída: (em correção)

Edit

http://localhost:52439/Turma/Edit

Entrada:

http://pastebin.com/ScXfYkbY

Delete

http://localhost:52439/Turma/Delete?id=2009

TurmaDisciplina

GetAll

http://localhost:52439/TurmaDisciplina/GetAll

Retorno:

http://pastebin.com/gSz0305h 

GetByBusca

Retorna as turmas + Disciplinas com os id’s de turma e disciplina, ambos opcionais

http://localhost:52439/turmadisciplina/GetByBusca?turmaid=1&disciplinaid=2

Retorno:

http://pastebin.com/8kGNEPC5 

Get

http://localhost:52439/TurmaDisciplina/Get?id=2011

Retorno:

http://pastebin.com/v7JHHdRu 

Save

http://localhost:52439/TurmaDisciplina/Save

Entrada:

http://pastebin.com/dnkeCD5H

Retorno:

http://pastebin.com/SbXYYksH 

Edit

http://localhost:52439/TurmaDisciplina/Edit

Entrada:

http://pastebin.com/fLZmpUEV

Delete

http://localhost:52439/TurmaDisciplina/Delete?id=2010