API do Cadastro de Participantes - Método GET
- URL:
http://localhost:8080/rest/fwmodel/TAFA053/
- Método:
GET
- Descrição: Este endpoint retorna uma lista do cadastro de participantes no sistema.
Exemplo de Resposta em Caso de Sucesso
{ "total": 10, "count": 10, "startindex": 1, "resources": [ { "id": "TAFA053", "operation": 1, "pk": "RCBNRyAwMSBDTElFTlRFLVRFU1RFLUFQSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=", "models": [ { "id": "MODEL_C1H", "modeltype": "FIELDS", "fields": [ { "id": "C1H_FILIAL", "order": 1, "value": "D MG 01" }, { "id": "C1H_ID", "order": 2, "value": "c4a89a27-3b86-db80-ce12-2bdf92ea8cc7" }, { "id": "C1H_CODPAR", "order": 3, "value": "CLIENTE-TESTE-API" }, { "id": "C1H_PPES", "order": 4, "value": "1" }, { "id": "C1H_NOME", "order": 5, "value": "COMANDO PUT REALIZADO COM SUCESSO" }, { "id": "C1H_END", "order": 8, "value": "RUA DOIS" }, { "id": "C1H_NUM", "order": 9, "value": "SN" }, { "id": "C1H_CODPAI", "order": 15, "value": "000001" }, { "id": "C1H_UF", "order": 17, "value": "000027" }, { "id": "C1H_CODMUN", "order": 19, "value": "003293" }, { "id": "C1H_CPF", "order": 27, "value": "33915531707" }, { "id": "C1H_DTINCL", "order": 30, "value": "20240514" }, { "id": "C1H_INDDES", "order": 53, "value": "2" }, { "id": "C1H_CPRB", "order": 54, "value": "0" }, { "id": "C1H_INDNIF", "order": 61, "value": "2" }, { "id": "C1H_NEWCAD", "order": 67, "value": "1" } ] } ] } ] }
API do Cadastro de Participantes - Método GET[pk]
- URL:
http://localhost:8080/rest/fwmodel/TAFA053/RCBNRyAwMSBDTElFTlRFLVRFU1RFLUFQSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=
- Método:
GET/[pk]
- Descrição: Este endpoint retorna um registro filtrado por uma chave do cadastro de participantes no sistema.
Exemplo de Resposta em Caso de Sucesso
{ "id": "TAFA053", "operation": 1, "pk": "RCBNRyAwMSBEIE1HIDAxIENGNDAxMDMwMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA==", "models": [ { "id": "MODEL_C1H", "modeltype": "FIELDS", "fields": [ { "id": "C1H_FILIAL", "order": 1, "value": "D MG 01" }, { "id": "C1H_ID", "order": 2, "value": "0dc2e70e-8430-3c8c-0753-30912d762d7f" }, { "id": "C1H_CODPAR", "order": 3, "value": "CF4010301" }, { "id": "C1H_PPES", "order": 4, "value": "1" }, { "id": "C1H_NOME", "order": 5, "value": "CLIENTE R-4010 03" }, { "id": "C1H_END", "order": 8, "value": "RUA DOIS" }, { "id": "C1H_NUM", "order": 9, "value": "SN" }, { "id": "C1H_CODPAI", "order": 15, "value": "000001" }, { "id": "C1H_UF", "order": 17, "value": "000027" }, { "id": "C1H_CODMUN", "order": 19, "value": "003293" }, { "id": "C1H_CPF", "order": 27, "value": "33915531707" }, { "id": "C1H_INDDES", "order": 53, "value": "2" }, { "id": "C1H_CPRB", "order": 54, "value": "0" }, { "id": "C1H_INDNIF", "order": 61, "value": "2" } ], "models": [ { "id": "MODEL_C1I", "modeltype": "GRID", "optional": 1, "struct": [ { "id": "C1I_FILIAL", "order": 1 }, { "id": "C1I_DTALT", "order": 2 }, { "id": "C1I_HRALT", "order": 3 }, { "id": "C1I_NRCAMP", "order": 4 }, { "id": "C1I_CTDANT", "order": 6 } ] }, { "id": "MODEL_V3R", "modeltype": "GRID", "optional": 1, "struct": [ { "id": "V3R_FILIAL", "order": 1 }, { "id": "V3R_ID", "order": 2 }, { "id": "V3R_CODIGO", "order": 3 }, { "id": "V3R_CPF", "order": 4 }, { "id": "V3R_NOME", "order": 5 }, { "id": "V3R_DESCDP", "order": 8 }, { "id": "V3R_CREDEP", "order": 9 } ] } ] } ] }
API do Cadastro de Participantes - Método POST
- URL:
http://localhost:8080/rest/fwmodel/TAFA053/
- Método:
POST
- Descrição: Este endpoint inclui um registro no cadastro de participantes.
No método POST não deve ser passado uma PK no parâmetro e nem no body.
Remover chave
"pk": "RCBNRyAwMSBDTElFTlRFLVRFU1RFLUFQSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=",
Os campos de controle interno do TAF devem ser removidos do body, por exemplo o campo C1H_ID, pois são campos gravados internamente
Remover campo
{
"id": "C1H_ID",
"order": 2,
"value": "c4a89a27-3b86-db80-ce12-2bdf92ea8cc7"
},
Exemplo de Envio Esperado
{ "id": "TAFA053", "operation": 1, "models": [ { "id": "MODEL_C1H", "modeltype": "FIELDS", "fields": [ { "id": "C1H_FILIAL", "order": 1, "value": "D MG 01" }, { "id": "C1H_CODPAR", "order": 3, "value": "INCLUSAO VIA POST 001" }, { "id": "C1H_PPES", "order": 4, "value": "1" }, { "id": "C1H_NOME", "order": 5, "value": "INCLUSAO VIA POST 001" }, { "id": "C1H_END", "order": 8, "value": "RUA DOIS" }, { "id": "C1H_NUM", "order": 9, "value": "SN" }, { "id": "C1H_CODPAI", "order": 15, "value": "000001" }, { "id": "C1H_UF", "order": 17, "value": "000027" }, { "id": "C1H_CODMUN", "order": 19, "value": "003293" }, { "id": "C1H_CPF", "order": 27, "value": "33915531707" }, { "id": "C1H_DTINCL", "order": 30, "value": "20240514" }, { "id": "C1H_INDDES", "order": 53, "value": "2" }, { "id": "C1H_CPRB", "order": 54, "value": "0" }, { "id": "C1H_INDNIF", "order": 61, "value": "2" }, { "id": "C1H_NEWCAD", "order": 67, "value": "1" } ], "models": [ { "id": "MODEL_C1I", "modeltype": "GRID", "optional": 1, "struct": [ { "id": "C1I_FILIAL", "order": 1 }, { "id": "C1I_DTALT", "order": 2 }, { "id": "C1I_HRALT", "order": 3 }, { "id": "C1I_NRCAMP", "order": 4 }, { "id": "C1I_CTDANT", "order": 6 } ] }, { "id": "MODEL_V3R", "modeltype": "GRID", "optional": 1, "struct": [ { "id": "V3R_FILIAL", "order": 1 }, { "id": "V3R_ID", "order": 2 }, { "id": "V3R_CODIGO", "order": 3 }, { "id": "V3R_CPF", "order": 4 }, { "id": "V3R_NOME", "order": 5 }, { "id": "V3R_DESCDP", "order": 8 }, { "id": "V3R_CREDEP", "order": 9 } ] } ] } ] }
Exemplo de Resposta em Caso de Sucesso
Essa será a resposta logo após o POST. É devolvido apenas um GET do registro que foi incluído.
{ "id": "TAFA053", "operation": 1, "pk": "RCBNRyAwMiBEIE1HIDAyIElOQ0xVU0FPIFZJQSBQT1NUIDAwMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA==", "models": [ { "id": "MODEL_C1H", "modeltype": "FIELDS", "fields": [ { "id": "C1H_FILIAL", "order": 1, "value": "D MG 02" }, { "id": "C1H_ID", "order": 2, "value": "9e694068-bbf0-6c07-e7cd-7b4fd2bbed7e" }, { "id": "C1H_CODPAR", "order": 3, "value": "INCLUSAO VIA POST 001" }, { "id": "C1H_PPES", "order": 4, "value": "1" }, { "id": "C1H_NOME", "order": 5, "value": "INCLUSAO VIA POST 001" }, { "id": "C1H_END", "order": 8, "value": "RUA DOIS" }, { "id": "C1H_NUM", "order": 9, "value": "SN" }, { "id": "C1H_CODPAI", "order": 15, "value": "000001" }, { "id": "C1H_UF", "order": 17, "value": "000027" }, { "id": "C1H_CODMUN", "order": 19, "value": "003293" }, { "id": "C1H_CPF", "order": 27, "value": "33915531707" }, { "id": "C1H_DTINCL", "order": 30, "value": "20240514" }, { "id": "C1H_INDDES", "order": 53, "value": "2" }, { "id": "C1H_CPRB", "order": 54, "value": "0" }, { "id": "C1H_INDNIF", "order": 61, "value": "2" }, { "id": "C1H_NEWCAD", "order": 67, "value": "1" } ], "models": [ { "id": "MODEL_C1I", "modeltype": "GRID", "optional": 1, "struct": [ { "id": "C1I_FILIAL", "order": 1 }, { "id": "C1I_DTALT", "order": 2 }, { "id": "C1I_HRALT", "order": 3 }, { "id": "C1I_NRCAMP", "order": 4 }, { "id": "C1I_CTDANT", "order": 6 } ] }, { "id": "MODEL_V3R", "modeltype": "GRID", "optional": 1, "struct": [ { "id": "V3R_FILIAL", "order": 1 }, { "id": "V3R_ID", "order": 2 }, { "id": "V3R_CODIGO", "order": 3 }, { "id": "V3R_CPF", "order": 4 }, { "id": "V3R_NOME", "order": 5 }, { "id": "V3R_DESCDP", "order": 8 }, { "id": "V3R_CREDEP", "order": 9 } ] } ] } ] }
API do Cadastro de Participantes - Método PUT[pk]
- URL:
http://localhost:8080/rest/fwmodel/TAFA053/RCBNRyAwMSBJTkNMVVNBTyBWSUEgUE9TVCAwMDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=
- Método:
PUT[pk]
- Descrição: Este endpoint Altera um registro no cadastro de participantes.
Observação
No método PUT deve ser passado um PK no parâmetro.
Esta chave deve ser removida ao enviar um PUT
"pk": "RCBNRyAwMSBJTkNMVVNBTyBWSUEgUE9TVCAwMDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=",
Os campos de controle interno do TAF devem ser removidos do body, por exemplo o campo C1H_ID, pois são campos gravados internamente
Exemplo de Envio Esperado
Neste arquivo, o campo alteardo foi C1H_NOME
{ "id": "TAFA053", "operation": 1, "models": [ { "id": "MODEL_C1H", "modeltype": "FIELDS", "fields": [ { "id": "C1H_FILIAL", "order": 1, "value": "D MG 01" }, { "id": "C1H_CODPAR", "order": 3, "value": "INCLUSAO VIA POST 001" }, { "id": "C1H_PPES", "order": 4, "value": "1" }, { "id": "C1H_NOME", "order": 5, "value": "ALTERACAO VIA PUT 001" }, { "id": "C1H_END", "order": 8, "value": "RUA DOIS" }, { "id": "C1H_NUM", "order": 9, "value": "SN" }, { "id": "C1H_CODPAI", "order": 15, "value": "000001" }, { "id": "C1H_UF", "order": 17, "value": "000027" }, { "id": "C1H_CODMUN", "order": 19, "value": "003293" }, { "id": "C1H_CPF", "order": 27, "value": "33915531707" }, { "id": "C1H_DTINCL", "order": 30, "value": "20240514" }, { "id": "C1H_INDDES", "order": 53, "value": "2" }, { "id": "C1H_CPRB", "order": 54, "value": "0" }, { "id": "C1H_INDNIF", "order": 61, "value": "2" }, { "id": "C1H_NEWCAD", "order": 67, "value": "1" } ], "models": [ { "id": "MODEL_C1I", "modeltype": "GRID", "optional": 1, "struct": [ { "id": "C1I_FILIAL", "order": 1 }, { "id": "C1I_DTALT", "order": 2 }, { "id": "C1I_HRALT", "order": 3 }, { "id": "C1I_NRCAMP", "order": 4 }, { "id": "C1I_CTDANT", "order": 6 } ] }, { "id": "MODEL_V3R", "modeltype": "GRID", "optional": 1, "struct": [ { "id": "V3R_FILIAL", "order": 1 }, { "id": "V3R_ID", "order": 2 }, { "id": "V3R_CODIGO", "order": 3 }, { "id": "V3R_CPF", "order": 4 }, { "id": "V3R_NOME", "order": 5 }, { "id": "V3R_DESCDP", "order": 8 }, { "id": "V3R_CREDEP", "order": 9 } ] } ] } ] }
Exemplo de Resposta em Caso de Sucesso
{ "id": "TAFA053", "operation": 1, "pk": "RCBNRyAwMSBJTkNMVVNBTyBWSUEgUE9TVCAwMDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=", "models": [ { "id": "MODEL_C1H", "modeltype": "FIELDS", "fields": [ { "id": "C1H_FILIAL", "order": 1, "value": "D MG 01" }, { "id": "C1H_ID", "order": 2, "value": "86754139-0a03-d989-71f7-6d16b6120f55" }, { "id": "C1H_CODPAR", "order": 3, "value": "INCLUSAO VIA POST 001" }, { "id": "C1H_PPES", "order": 4, "value": "1" }, { "id": "C1H_NOME", "order": 5, "value": "ALTERACAO VIA PUT 001" }, { "id": "C1H_END", "order": 8, "value": "RUA DOIS" }, { "id": "C1H_NUM", "order": 9, "value": "SN" }, { "id": "C1H_CODPAI", "order": 15, "value": "000001" }, { "id": "C1H_UF", "order": 17, "value": "000027" }, { "id": "C1H_CODMUN", "order": 19, "value": "003293" }, { "id": "C1H_CPF", "order": 27, "value": "33915531707" }, { "id": "C1H_DTINCL", "order": 30, "value": "20240514" }, { "id": "C1H_INDDES", "order": 53, "value": "2" }, { "id": "C1H_CPRB", "order": 54, "value": "0" }, { "id": "C1H_INDNIF", "order": 61, "value": "2" }, { "id": "C1H_NEWCAD", "order": 67, "value": "1" } ], "models": [ { "id": "MODEL_C1I", "modeltype": "GRID", "optional": 1, "struct": [ { "id": "C1I_FILIAL", "order": 1 }, { "id": "C1I_DTALT", "order": 2 }, { "id": "C1I_HRALT", "order": 3 }, { "id": "C1I_NRCAMP", "order": 4 }, { "id": "C1I_CTDANT", "order": 6 } ] }, { "id": "MODEL_V3R", "modeltype": "GRID", "optional": 1, "struct": [ { "id": "V3R_FILIAL", "order": 1 }, { "id": "V3R_ID", "order": 2 }, { "id": "V3R_CODIGO", "order": 3 }, { "id": "V3R_CPF", "order": 4 }, { "id": "V3R_NOME", "order": 5 }, { "id": "V3R_DESCDP", "order": 8 }, { "id": "V3R_CREDEP", "order": 9 } ] } ] } ] }
API do Cadastro de Participantes - Método DELETE
- URL:
http://localhost:8080/rest/fwmodel/TAFA053/RCBNRyAwMSBJTkNMVVNBTyBWSUEgUE9TVCAwMDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=
- Método:
DELETE[pk]
- Descrição: Este endpoint deleta um registro no cadastro de participantes.
Observação
Diferente do POST e PUT, para realizar o delete, basta passar o ID do registro que será deletado no parâmetro
URL: http://localhost:8080/rest/fwmodel/TAFA053/RCBNRyAwMSBJTkNMVVNBTyBWSUEgUE9TVCAwMDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA=
true