SAP Open Connectors

Files Connector Supported API Methods and Limits

GET /objectName

After you upload a file with an objectName, the file is added as a resource. You can then use GET /objectName method to GET data rows. For example, if you entered myContacts as the objectName, it gets added as a resource.

Performing a GET /mycontacts will therefore give you results as shown below; hence, you get the data you required.

You can also set the pageSize and nextPage while making this API call. The pageSize is set to 200 by default, and the nextPage token can be taken from the response body.

GET /files

Using this method you can get all the metadata related to your file. The response will look as shown below.

You can modify the metadata to change the file data type depending on your requirements. 

Edit the "typeName" field shown in the above image. 

This field is set to "string" by default, but CE also supports "number", "boolean" and "date" as valid entries. 

GET /files/{id}

You can make this API call to download the current version of the file.

1. Use GET /files for the file id.
2. Enter this id in the required field while using the GET /files/{id} method.

3. Download the file.

The downloaded file will be in the same format as that of the file you uploaded and have the same name. 

POST /objectName

Append data rows using the POST /objectName method. 

For example, for a resource named /myContacts, perform POST /myContacts and provide the information that needs to be added as the object body, as shown below.

Click 'Execute' to see the data that you added in the response body.

Note: POST/object created from the POST/files API accepts extra fields apart from the ones defined in the model for that specific object though they are not present in the response body for the GET/object call.

PUT /files/{id}/metadata

This method can be used to update the metadata of your file. As of now, you can only modify the "typeName" field to change the data type from its default type - "string" to other data types supported by CE such as "number", "boolean" or "date".

In the example shown below,  we are modifying the "typeName" field from "string" to "integer" for the resource 'myContacts'.

You have now updated the metadata of your file such that the data type is set to "number".

Files Connector Limits

The maximum file size for an individual file used with the Files connector is 100 MB; however, there is no limit to the number of files a given connector instance can support.