Created
December 12, 2023 14:49
-
-
Save evertramos/9748bcaba0f63fe17a254673846d39b5 to your computer and use it in GitHub Desktop.
eagendas-postma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "6ea0a93e-2fa4-4e5e-9d14-a96a7c935d16", | |
"name": "e-Agendas - v2 - Consulta", | |
"description": "### Maiores informações favor acessar:\n\n### [https://github.com/cgugovbr/eagendas-publico/](https://github.com/cgugovbr/eagendas-publico/)", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | |
"_exporter_id": "454997", | |
"_collection_link": "https://evertramos.postman.co/workspace/CGU~e84f8774-c95b-4307-be9f-9aefff261bc8/collection/454997-6ea0a93e-2fa4-4e5e-9d14-a96a7c935d16?action=share&source=collection_link&creator=454997" | |
}, | |
"item": [ | |
{ | |
"name": "Orgão", | |
"item": [ | |
{ | |
"name": "OgaoPorID", | |
"request": { | |
"method": "GET", | |
"header": [] | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "OrgaosPorFiltros", | |
"request": { | |
"method": "GET", | |
"header": [] | |
}, | |
"response": [] | |
} | |
] | |
}, | |
{ | |
"name": "Cargos Efetivos", | |
"item": [ | |
{ | |
"name": "CargosEfetivosPorID", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.response.to.have.status(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'resposta' object is present and not empty\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta).to.exist.and.to.not.be.empty;", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'cargos_efetivos' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['cargos_efetivos']).to.exist.and.to.be.an('array').with.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disableBodyPruning": true | |
}, | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "", | |
"options": { | |
"raw": { | |
"language": "json" | |
} | |
} | |
}, | |
"url": { | |
"raw": "{{url}}/api/v2/cargos-efetivos/238?orgao_id=832", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"cargos-efetivos", | |
"238" | |
], | |
"query": [ | |
{ | |
"key": "orgao_id", | |
"value": "832" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "CargosEfetivos", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.response.to.have.status(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'resposta' object is present and not empty\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta).to.exist.and.to.not.be.empty;", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'cargos_efetivos' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['cargos_efetivos']).to.exist.and.to.be.an('array').with.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"request": { | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "{{url}}/api/v2/cargos-efetivos?orgao_id=832&descricao=AUDITOR&situacao=ativo", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"cargos-efetivos" | |
], | |
"query": [ | |
{ | |
"key": "orgao_id", | |
"value": "832" | |
}, | |
{ | |
"key": "descricao", | |
"value": "AUDITOR" | |
}, | |
{ | |
"key": "situacao", | |
"value": "ativo" | |
}, | |
{ | |
"key": "situacao", | |
"value": "inativo", | |
"disabled": true | |
} | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
}, | |
{ | |
"name": "Cargos Comissionados", | |
"item": [ | |
{ | |
"name": "CargosComissionadosPorID", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.response.to.have.status(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"pm.test(\"Validate the 'resposta' object is present and not empty\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta).to.exist.and.to.not.be.empty;", | |
"});", | |
"", | |
"pm.test(\"Verify that the 'cargos_comissionados' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['cargos_comissionados']).to.exist.and.to.be.an('array').with.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"request": { | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "{{url}}/api/v2/cargos-comissionados/1045?orgao_id=832", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"cargos-comissionados", | |
"1045" | |
], | |
"query": [ | |
{ | |
"key": "orgao_id", | |
"value": "832" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "CargosComissionados", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.response.to.have.status(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'resposta' object is present and not empty\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta).to.exist.and.to.not.be.empty;", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'cargos_comissionados' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['cargos_comissionados']).to.exist.and.to.be.an('array').with.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"request": { | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "{{url}}/api/v2/cargos-comissionados?orgao_id=832&descricao=Ministro", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"cargos-comissionados" | |
], | |
"query": [ | |
{ | |
"key": "orgao_id", | |
"value": "832" | |
}, | |
{ | |
"key": "descricao", | |
"value": "Ministro" | |
}, | |
{ | |
"key": "situacao", | |
"value": "Ativo", | |
"disabled": true | |
}, | |
{ | |
"key": "situacao", | |
"value": "Inativo", | |
"disabled": true | |
} | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
}, | |
{ | |
"name": "Codigos Cargos Comissionados", | |
"item": [ | |
{ | |
"name": "CodigosCargosComissionadosPorID", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.response.to.have.status(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'resposta' object is present and not empty\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta).to.exist.and.to.not.be.empty;", | |
"});", | |
"", | |
"pm.test(\"Verify that the 'codigos_cargos_comissionados' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['codigos_cargos_comissionados']).to.exist.and.to.be.an('array').with.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"request": { | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "{{url}}/api/v2/codigos-cargos-comissionados/170?orgao_id=832", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"codigos-cargos-comissionados", | |
"170" | |
], | |
"query": [ | |
{ | |
"key": "orgao_id", | |
"value": "832" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "CodigosCargosComissionados", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.response.to.have.status(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"pm.test(\"Validate the 'resposta' object is present and not empty\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta).to.exist.and.to.not.be.empty;", | |
"});", | |
"", | |
"pm.test(\"Verify that the 'codigos_cargos_comissionados' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['codigos_cargos_comissionados']).to.exist.and.to.be.an('array').with.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"request": { | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "{{url}}/api/v2/codigos-cargos-comissionados/?orgao_id=832&codigo=me", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"codigos-cargos-comissionados", | |
"" | |
], | |
"query": [ | |
{ | |
"key": "orgao_id", | |
"value": "832" | |
}, | |
{ | |
"key": "codigo", | |
"value": "me" | |
}, | |
{ | |
"key": "descricao", | |
"value": "ministro", | |
"disabled": true | |
}, | |
{ | |
"key": "situacao", | |
"value": "Ativo", | |
"disabled": true | |
}, | |
{ | |
"key": "situacao", | |
"value": "Inativo", | |
"disabled": true | |
} | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
}, | |
{ | |
"name": "Agentes Públicos Obrigados", | |
"item": [ | |
{ | |
"name": "AgentesPublicosObrigadosPorID", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"pm.test(\"Validate the 'resposta' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.resposta).to.be.an('object');", | |
"});", | |
"", | |
"pm.test(\"Verify that the 'agentes-publicos-obrigados' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['agentes-publicos-obrigados']).to.exist.and.to.be.an('array').and.to.have.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"accept": true | |
} | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Accept", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{url}}/api/v2/agentes-publicos-obrigados/1219", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"agentes-publicos-obrigados", | |
"1219" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "AgentesPublicosObrigadosPorOrgao", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"pm.test(\"Validate the 'resposta' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.resposta).to.be.an('object');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'agentes-publicos-obrigados' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['agentes-publicos-obrigados']).to.exist.and.to.be.an('array').and.to.have.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"accept": true | |
} | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Accept", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{url}}/api/v2/agentes-publicos-obrigados?orgao_id=832&situacao=ativo", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"agentes-publicos-obrigados" | |
], | |
"query": [ | |
{ | |
"key": "orgao_id", | |
"value": "832" | |
}, | |
{ | |
"key": "cargo_efetivo_id", | |
"value": "238", | |
"disabled": true | |
}, | |
{ | |
"key": "codigo_comissao_id", | |
"value": "171", | |
"disabled": true | |
}, | |
{ | |
"key": "nome_apo", | |
"value": "Marcelo pontes", | |
"disabled": true | |
}, | |
{ | |
"key": "situacao", | |
"value": "inativo", | |
"disabled": true | |
}, | |
{ | |
"key": "situacao", | |
"value": "ativo" | |
} | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
}, | |
{ | |
"name": "Compromissos", | |
"item": [ | |
{ | |
"name": "CompromissosPorID", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"pm.test(\"Validate the 'resposta' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.resposta).to.be.an('object');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'compromissos' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['compromissos']).to.exist.and.to.be.an('array').and.to.have.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"accept": true | |
} | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Accept", | |
"value": "application/json", | |
"type": "text" | |
}, | |
{ | |
"key": "Content-Type", | |
"value": "application/json", | |
"type": "text", | |
"disabled": true | |
} | |
], | |
"url": { | |
"raw": "{{url}}/api/v2/compromissos/111799", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"compromissos", | |
"111799" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "CompromissosPorApo", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field in the response\", function () {", | |
" const responseData = pm.response.json();", | |
"", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.sucesso).to.exist.and.to.be.a('boolean');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'compromissos' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['compromissos']).to.exist.and.to.be.an('array').and.to.have.lengthOf.at.least(1);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the id field in compromissos array\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData[\"resposta\"][\"compromissos\"]).to.be.an('array');", | |
" ", | |
" responseData[\"resposta\"][\"compromissos\"].forEach(function (item) {", | |
" pm.expect(item[\"id\"]).to.be.a('number');", | |
" pm.expect(item[\"id\"]).to.be.at.least(0);", | |
" });", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"accept": true | |
} | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Accept", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{url}}/api/v2/compromissos?apo_id=1219&data_inicio=19-06-2023&data_termino=19-06-2023", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"compromissos" | |
], | |
"query": [ | |
{ | |
"key": "apo_id", | |
"value": "1219" | |
}, | |
{ | |
"key": "orgao_id", | |
"value": "832", | |
"disabled": true | |
}, | |
{ | |
"key": "data_inicio", | |
"value": "19-06-2023" | |
}, | |
{ | |
"key": "data_termino", | |
"value": "19-06-2023" | |
}, | |
{ | |
"key": "cargo_efetivo_id", | |
"value": "238", | |
"disabled": true | |
}, | |
{ | |
"key": "cargo_comissao_id", | |
"value": "1131", | |
"disabled": true | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "CompromissosPorOrgaoCargo", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field in the response\", function () {", | |
" const responseData = pm.response.json();", | |
"", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.sucesso).to.exist.and.to.be.a('boolean');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'compromissos' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['compromissos']).to.exist.and.to.be.an('array').with.lengthOf.at.least(1);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the id field in compromissos array\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData[\"resposta\"][\"compromissos\"]).to.be.an('array');", | |
" ", | |
" responseData[\"resposta\"][\"compromissos\"].forEach(function (item) {", | |
" pm.expect(item[\"id\"]).to.be.a('number');", | |
" pm.expect(item[\"id\"]).to.be.at.least(0);", | |
" });", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"accept": true | |
} | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Accept", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{url}}/api/v2/compromissos?orgao_id=832&data_inicio=19-06-2023&data_termino=19-06-2023&cargo_efetivo_id=238", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"compromissos" | |
], | |
"query": [ | |
{ | |
"key": "apo_id", | |
"value": "1219", | |
"disabled": true | |
}, | |
{ | |
"key": "orgao_id", | |
"value": "832" | |
}, | |
{ | |
"key": "data_inicio", | |
"value": "19-06-2023" | |
}, | |
{ | |
"key": "data_termino", | |
"value": "19-06-2023" | |
}, | |
{ | |
"key": "cargo_efetivo_id", | |
"value": "238" | |
}, | |
{ | |
"key": "cargo_comissao_id", | |
"value": "1131", | |
"disabled": true | |
} | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
}, | |
{ | |
"name": "Afastamentos e Substituições", | |
"item": [ | |
{ | |
"name": "AfastamentosPorID", | |
"request": { | |
"method": "GET", | |
"header": [] | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "AfastamentosPorPeriodoApo", | |
"request": { | |
"method": "GET", | |
"header": [] | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "SubstituicaoPorID", | |
"request": { | |
"method": "GET", | |
"header": [] | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "SubstituicoesPorPeriodoApo", | |
"request": { | |
"method": "GET", | |
"header": [] | |
}, | |
"response": [] | |
} | |
] | |
}, | |
{ | |
"name": "Presentes e Hospitalidades", | |
"item": [ | |
{ | |
"name": "PresenteHospitalidadePorID", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"pm.test(\"Validate the 'resposta' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.resposta).to.be.an('object');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'presentes-hospitalidades' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['presentes-hospitalidades']).to.exist.and.to.be.an('array').and.to.have.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"accept": true | |
} | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Accept", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{url}}/api/v2/presentes-hospitalidades/36", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"presentes-hospitalidades", | |
"36" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "PresentesHospitalidadesPorApo", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field in the response\", function () {", | |
" const responseData = pm.response.json();", | |
"", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.sucesso).to.exist.and.to.be.a('boolean');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'presentes-hospitalidades' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['presentes-hospitalidades']).to.exist.and.to.be.an('array').and.to.have.lengthOf.at.least(1);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the id field in presentes-hospitalidades array\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData[\"resposta\"][\"presentes-hospitalidades\"]).to.be.an('array');", | |
" ", | |
" responseData[\"resposta\"][\"presentes-hospitalidades\"].forEach(function (item) {", | |
" pm.expect(item[\"id\"]).to.be.a('number');", | |
" pm.expect(item[\"id\"]).to.be.at.least(0);", | |
" });", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"accept": true | |
} | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Accept", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{url}}/api/v2/presentes-hospitalidades?data_inicio=01-01-2022&data_termino=16-12-2023&apo_id=3917", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"presentes-hospitalidades" | |
], | |
"query": [ | |
{ | |
"key": "data_inicio", | |
"value": "01-01-2022" | |
}, | |
{ | |
"key": "data_termino", | |
"value": "16-12-2023" | |
}, | |
{ | |
"key": "apo_id", | |
"value": "3917" | |
}, | |
{ | |
"key": "orgao_id", | |
"value": "1442", | |
"disabled": true | |
}, | |
{ | |
"key": "cargo_comissao_id", | |
"value": "4493", | |
"disabled": true | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "PresentesHospitalidadesPorOrgaoCargo", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field in the response\", function () {", | |
" const responseData = pm.response.json();", | |
"", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.sucesso).to.exist.and.to.be.a('boolean');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'presentes-hospitalidades' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['presentes-hospitalidades']).to.exist.and.to.be.an('array').with.lengthOf.at.least(1);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the id field in presentes-hospitalidades array\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData[\"resposta\"][\"presentes-hospitalidades\"]).to.be.an('array');", | |
" ", | |
" responseData[\"resposta\"][\"presentes-hospitalidades\"].forEach(function (item) {", | |
" pm.expect(item[\"id\"]).to.be.a('number');", | |
" pm.expect(item[\"id\"]).to.be.at.least(0);", | |
" });", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"accept": true | |
} | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Accept", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{url}}/api/v2/presentes-hospitalidades?data_inicio=01-01-2023&data_termino=16-02-2023&orgao_id=1442&cargo_comissao_id=4493", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"presentes-hospitalidades" | |
], | |
"query": [ | |
{ | |
"key": "data_inicio", | |
"value": "01-01-2023" | |
}, | |
{ | |
"key": "data_termino", | |
"value": "16-02-2023" | |
}, | |
{ | |
"key": "apo_id", | |
"value": "14365", | |
"disabled": true | |
}, | |
{ | |
"key": "orgao_id", | |
"value": "1442" | |
}, | |
{ | |
"key": "cargo_comissao_id", | |
"value": "4493" | |
} | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
}, | |
{ | |
"name": "Viagens", | |
"item": [ | |
{ | |
"name": "ViagemPorID", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.response.to.have.status(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'resposta' object is present and not empty\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta).to.exist.and.to.not.be.empty;", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'viagens' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData['viagens']).to.exist.and.to.be.an('array').with.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"request": { | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "{{url}}/api/v2/viagens/985", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"viagens", | |
"985" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "ViagensPorApo", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field in the response\", function () {", | |
" const responseData = pm.response.json();", | |
"", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.sucesso).to.exist.and.to.be.a('boolean');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'presentes-hospitalidades' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData['presentes-hospitalidades']).to.exist.and.to.be.an('array').with.lengthOf.at.least(1);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the id field in presentes-hospitalidades array\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData[\"resposta\"][\"presentes-hospitalidades\"]).to.be.an('array');", | |
" ", | |
" responseData[\"resposta\"][\"presentes-hospitalidades\"].forEach(function (item) {", | |
" pm.expect(item[\"id\"]).to.be.a('number');", | |
" pm.expect(item[\"id\"]).to.be.at.least(0);", | |
" });", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"request": { | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "{{url}}/api/v2/viagens?data_inicio=01-01-2022&data_termino=04-10-2024&apo_id=3091", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"viagens" | |
], | |
"query": [ | |
{ | |
"key": "data_inicio", | |
"value": "01-01-2022" | |
}, | |
{ | |
"key": "data_termino", | |
"value": "04-10-2024" | |
}, | |
{ | |
"key": "apo_id", | |
"value": "3091" | |
}, | |
{ | |
"key": "orgao_id", | |
"value": "1442", | |
"disabled": true | |
}, | |
{ | |
"key": "cargo_comissao_id", | |
"value": "4493", | |
"disabled": true | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "ViagensPorOrgaoCargo", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field in the response\", function () {", | |
" const responseData = pm.response.json();", | |
"", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.sucesso).to.exist.and.to.be.a('boolean');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'presentes-hospitalidades' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData['presentes-hospitalidades']).to.exist.and.to.be.an('array').with.lengthOf.at.least(1);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the id field in presentes-hospitalidades array\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData[\"resposta\"][\"presentes-hospitalidades\"]).to.be.an('array');", | |
" ", | |
" responseData[\"resposta\"][\"presentes-hospitalidades\"].forEach(function (item) {", | |
" pm.expect(item[\"id\"]).to.be.a('number');", | |
" pm.expect(item[\"id\"]).to.be.at.least(0);", | |
" });", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"request": { | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "{{url}}/api/v2/viagens?data_inicio=01-01-2023&data_termino=16-02-2023&apo_id=1", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"viagens" | |
], | |
"query": [ | |
{ | |
"key": "data_inicio", | |
"value": "01-01-2023" | |
}, | |
{ | |
"key": "data_termino", | |
"value": "16-02-2023" | |
}, | |
{ | |
"key": "apo_id", | |
"value": "1" | |
}, | |
{ | |
"key": "orgao_id", | |
"value": "1442", | |
"disabled": true | |
}, | |
{ | |
"key": "cargo_comissao_id", | |
"value": "4493", | |
"disabled": true | |
} | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
}, | |
{ | |
"name": "Objetivos", | |
"item": [ | |
{ | |
"name": "ObjetivosCompromisso", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"pm.test(\"Validate the 'resposta' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.resposta).to.be.an('object');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'presentes-hospitalidades' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['presentes-hospitalidades']).to.exist.and.to.be.an('array').and.to.have.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"accept": true | |
} | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Accept", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{url}}/api/v2/objetivos-compromissos", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"objetivos-compromissos" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "ObjetivoByID", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"pm.test(\"Validate the 'resposta' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.resposta).to.be.an('object');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'presentes-hospitalidades' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['presentes-hospitalidades']).to.exist.and.to.be.an('array').and.to.have.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"accept": true | |
} | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Accept", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{url}}/api/v2/objetivos/9", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"objetivos", | |
"9" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Objetivos", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"", | |
"pm.test(\"Response status code is 200\", function () {", | |
" pm.expect(pm.response.code).to.equal(200);", | |
"});", | |
"", | |
"", | |
"pm.test(\"Validate the 'sucesso' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.sucesso).to.be.true;", | |
"});", | |
"", | |
"pm.test(\"Validate the 'resposta' field is true\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData.resposta).to.be.an('object');", | |
"});", | |
"", | |
"", | |
"pm.test(\"Verify that the 'presentes-hospitalidades' array is present and contains at least one element\", function () {", | |
" const responseData = pm.response.json();", | |
" ", | |
" pm.expect(responseData).to.be.an('object');", | |
" pm.expect(responseData.resposta['presentes-hospitalidades']).to.exist.and.to.be.an('array').and.to.have.lengthOf.at.least(1);", | |
"});" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"accept": true | |
} | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Accept", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{url}}/api/v2/objetivos", | |
"host": [ | |
"{{url}}" | |
], | |
"path": [ | |
"api", | |
"v2", | |
"objetivos" | |
], | |
"query": [ | |
{ | |
"key": "tipo_compromisso", | |
"value": "reuniao", | |
"disabled": true | |
} | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
} | |
], | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "{{tokenv2}}", | |
"type": "string" | |
} | |
] | |
}, | |
"event": [ | |
{ | |
"listen": "prerequest", | |
"script": { | |
"type": "text/javascript", | |
"exec": [ | |
"" | |
] | |
} | |
}, | |
{ | |
"listen": "test", | |
"script": { | |
"type": "text/javascript", | |
"exec": [ | |
"" | |
] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment