GET /op/files/ HTTP/1.1
Parameters
| Name | Type | Decription |
|---|---|---|
| path | string | Diretório do qual serão listados os arquivos e sub diretórios |
Reponse
HTTP/1.1 200
[
".bashrc",
"Downloads",
"Documents"
]Exemplo
watch "curl -s -w '\n' -X GET $BASE_URL'/op/files/?path=/export/shared/arquivos_gerados/CREDENCIADOR/OUT' | python -m json.tool"
GET /op/files/download HTTP/1.1
Parameters
| Name | Type | Decription |
|---|---|---|
| decrypt | boolean | Se deve tentar decriptar o arquivo que irá baixar (default=true) |
| path | string | Nome do arquivo que será baixado |
| configEnviromentId | integer | id do ConfigEnvironment que define os certificados da encriptação |
Reponse
HTTP/1.1 200
<file binary data>Exemplo
FILE_NAME=ASLC027_08561701_20170904_00005_ERR && \
curl -s -X GET "$BASE_URL/op/files/download?decrypt=true&configEnviromentId=1&path=/export/shared/arquivos_gerados/CREDENCIADOR/IN/$FILE_NAME" > $FILE_NAME
POST /op/files HTTP/1.1
Parameters
| Name | Type | Decription |
|---|---|---|
| encrypt | boolean | Se deve encriptar o arquivo (default=true) |
| file | binary | bytes do arquivo a ser upado |
| path | string | Caminho onde será escrito o arquivo |
| charset | string | Charset em que está o arquivo que está sendo upado (default=UTF-8) |
| overwrite | boolean | Sobrescrever o arquivo original caso ja exista (default=false) |
| configEnviromentId | integer | id do ConfigEnvironment que define os certificados da encriptação |
Reponse
HTTP/1.1 201
122605 written to: /export/shared/arquivos_gerados/CREDENCIADOR/OUT/ASLC027_08561701_20170904_00006Exemplo
SOURCE='~/ASLC027_08561701_20170904_00006' && \
TARGET='/export/shared/arquivos_gerados/CREDENCIADOR/OUT/ASLC027_08561701_20170904_00006' && \
curl -v -s -w '\n' -X POST -F "overwrite=false" -F "encrypt=true" -F "configEnviromentId=1" -F "charset=UTF-8" -F "path=$TARGET" -F "file=@$SOURCE" \
"$BASE_URL/op/files"
DELETE /op/files HTTP/1.1
Parameters
| Name | Type | Decription |
|---|---|---|
| path | string | Caminho do arquivo a ser deletado |
Reponse
HTTP/1.1 200
successExemplo
curl -X DELETE "$BASE_URL/op/files/?path=/export/shared/arquivos_gerados/CREDENCIADOR/OUT/ASLC027_08561701_20180427_00039"