CONTEÚDO

  1. Visão Geral
  2. Definições de Serviços
    1. POST - WSPfsApi/legaldesk/anexo/upload
    2. GET - WSPfsApi/legaldesk/anexo/download/{key}
  3. Assuntos Relacionados


01. VISÃO GERAL

Os serviço especificados neste documento tem por objetivo:

02. DEFINIÇÕES DE SERVIÇOS

 

POST - WSPfsApi/legaldesk/anexo/upload

Recebe os dados do arquivo que será criado na pasta do Protheus, no formato indicado abaixo:

LEGALDESK: TRUE
TENANTID: T1,M SP 01
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: multipart/form-data; boundary=--------------------------126713368602627514962789
Content-Length: 1149
----------------------------126713368602627514962789
Content-Disposition: form-data; name=""; filename="arquivo.txt"

<arquivo.txt>
----------------------------126713368602627514962789--
{
    "result": "Anexo copiado com sucesso."
}

Obs: A transferência do arquivo deve ser realizada via multipart/form-data conforme o header acima.


GET - WSPfsApi/legaldesk/anexo/download/{key}

Parâmetro:

key - Chave do Registro de Anexo (NUM_FILIAL+NUM_COD em base 64)


Exibe o conteúdo do arquivo que foi anexado no Protheus:

LEGALDESK: TRUE
TENANTID: T1,M SP 01
Content-Type: application/json
Content-Disposition: attachment; filename="arquivo.txt"
Content-Length: 51
Content-Type: Application/octet-stream
{
    <arquivo.txt>
}

Obs: A transferência do arquivo é realizada via octet-stream e attachment conforme o response acima.

03. ASSUNTOS RELACIONADOS


<!-- esconder o menu --> 


<style>
div.theme-default .ia-splitter #main {
    margin-left: 0px;
}
.ia-fixed-sidebar, .ia-splitter-left {
    display: none;
}
#main {
    padding-left: 10px;
    padding-right: 10px;
    overflow-x: hidden;
}

.aui-header-primary .aui-nav,  .aui-page-panel {
    margin-left: 0px !important;
}
.aui-header-primary .aui-nav {
    margin-left: 0px !important;
}
</style>