Skip to content

gRPC File Connector API

gRPC File Connector API for version 12.429.0.

Package: qlik.filehosting

File Connector Protobuf API specification

Methods

GetCapabilities

No description.

Parameters:

Type Description
CapabilitiesRequest No description.

Response:

Type Description
Capabilities No description.

Download

The Engine will send many DownloadRequest messages.

The first DownloadRequest message is the file name to download. If the file is not available, the connector can return an error immediately.

The following DownloadRequest messages asks for the file content at random offsets. (Though they will often but not always be serial).

The Engine will often ask for a few megabytes of data at the time. But if the Engine knows that it will do a perfectly linear read, it may send one read request for all the file content. That could be a lot of data, which will have to send back in many DownloadResponse messages.

The best bandwidth is achieved if most DownloadResponse messages are 64K or slightly less. But tests show that anywhere from 10K to 120K gives almost as good performance. The size of an DownloadResponse message is the size of the data and a small protocol overhead.

When the Engine will not make any more data requests, it will call WritesDone() and the connector will get no more DownloadRequest messages.

When WritesDone() is called by the Engine, the connector will continue to send the data already requested.

The Engine may call TryCancel() at any time for a variety of reasons. Typically, when analyzing files for the file wizard API or when script errors happen.

When the Connector is streaming back data, it should check often if the rpc is canceled. If canceled, the Connector should stop sending more data and return CANCELLED on the request.

If the connector don't receive a TryCancel() call, it will typically return OK as status code after Engine has called WritesDone() and the Connector returned all requested data.

At the very end, Engine will call Finish() to retrieve the status code for the call. This is used for error handling and trouble shooting.

Parameters:

Type Description
DownloadRequest No description.

Response:

Type Description
DownloadResponse No description.

Upload

The Engine will send many UploadRequest messages.

The first UploadRequest message is the file name to upload. The connector can return an error immediately if not allowed for some reason.

The Engine will send a stream of UploadRequest messages to serially upload a file.

The Engine call WritesDone() when the upload is complete.

The Engine will call Finish() at the end.

Parameters:

Type Description
UploadRequest No description.

Response:

Type Description
UploadResponse No description.

List

List files from directory or from pattern. Only list files in one directory. No recursive listing. If there are no matching files, just return Status::OK.

Parameters:

Type Description
ListRequest No description.

Response:

Type Description
ListItem No description.

Metadata

No description.

Parameters:

Type Description
MetadataRequest No description.

Response:

Type Description
FileMeta No description.

Definitions

Capabilities

No description.

Fields:

Name Description Type Label Default
supportsRandomRead Does the connector support random access read ? bool optional No default value.

CapabilitiesRequest

No description.

Fields:

Name Description Type Label Default
setup No description. Setup optional No default value.

DownloadRequest

No description.

Fields:

Name Description Type Label Default
file Set for the first in a call File optional No default value.
chunk Set for second and following Chunk optional No default value.

Chunk

No description.

Fields:

Name Description Type Label Default
start No description. int64 optional No default value.
length No description. int64 optional No default value.

File

Requires an empty response as acknowledgement.

Fields:

Name Description Type Label Default
setup No description. Setup optional No default value.
name Classic path name or just a hash or anything. string optional No default value.

DownloadResponse

No description.

Fields:

Name Description Type Label Default
response No description. Response optional No default value.
chunk No description. Chunk optional No default value.

Chunk

No description.

Fields:

Name Description Type Label Default
data No description. bytes optional No default value.
last The last chunk for current ByteRange request must have the "last" bool optional No default value.

Response

Used by the server to respond to the File request if successful.

FileMeta

No description.

Fields:

Name Description Type Label Default
size -1 for unknown int64 optional No default value.
lastUpdated Seconds since 1970 (UTC). int64 optional No default value.

ListItem

No description.

Fields:

Name Description Type Label Default
name No description. string optional No default value.
isFolder No description. bool optional No default value.
meta No description. FileMeta optional No default value.

ListRequest

No description.

Fields:

Name Description Type Label Default
setup No description. Setup optional No default value.
pathPattern List all files matching the pattern. string optional No default value.

MetadataRequest

No description.

Fields:

Name Description Type Label Default
setup No description. Setup optional No default value.
fileName No description. string optional No default value.

Setup

No description.

Fields:

Name Description Type Label Default
config Connector attributes and data string optional No default value.
reloadId Helpful information for connector string optional No default value.
appId No description. string optional No default value.
user The user for the connection string optional No default value.
password The password for the connection string optional No default value.
spaceId The space id for the app that is trying to use the connection string optional No default value.

UploadRequest

No description.

Fields:

Name Description Type Label Default
file No description. File optional No default value.
chunk No description. Chunk optional No default value.

Chunk

No description.

Fields:

Name Description Type Label Default
data No description. bytes optional No default value.

File

No description.

Fields:

Name Description Type Label Default
setup No description. Setup optional No default value.
name No description. string optional No default value.

UploadResponse

No description.

Enums

Scalar Value Types

double

cpp cs go java php python ruby
double double float64 double float float Float

float

cpp cs go java php python ruby
float float float32 float float float Float

int32

cpp cs go java php python ruby
int32 int int32 int integer int Bignum or Fixnum (as required)

int64

cpp cs go java php python ruby
int64 long int64 long integer/string int/long Bignum

uint32

cpp cs go java php python ruby
uint32 uint uint32 int integer int/long Bignum or Fixnum (as required)

uint64

cpp cs go java php python ruby
uint64 ulong uint64 long integer/string int/long Bignum or Fixnum (as required)

sint32

cpp cs go java php python ruby
int32 int int32 int integer int Bignum or Fixnum (as required)

sint64

cpp cs go java php python ruby
int64 long int64 long integer/string int/long Bignum

fixed32

cpp cs go java php python ruby
uint32 uint uint32 int integer int Bignum or Fixnum (as required)

fixed64

cpp cs go java php python ruby
uint64 ulong uint64 long integer/string int/long Bignum

sfixed32

cpp cs go java php python ruby
int32 int int32 int integer int Bignum or Fixnum (as required)

sfixed64

cpp cs go java php python ruby
int64 long int64 long integer/string int/long Bignum

bool

cpp cs go java php python ruby
bool bool bool boolean boolean boolean TrueClass/FalseClass

string

cpp cs go java php python ruby
string string string String string str/unicode String (UTF-8)

bytes

cpp cs go java php python ruby
string ByteString []byte ByteString string str String (ASCII-8BIT)