# Uploads a reference document for data rules Uploads a reference document used for fingerprint or keyword-based data rules. Allowed file extensions: csv, txt, pdf, doc, docx. Max file size: 76800 bytes. ## Endpoint `POST /endpointdlp/api/data-classification/data-rule/reference-file-upload` ## Request ### Request URL `https://{server-hostname}:8383/endpointdlp/api/data-classification/data-rule/reference-file-upload` ### Scope `EndpointDLP.CREATE` ### Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Accept** `string` — Mandatory: `application/uploadReferenceDocument.v1+json` - **Content-Type** `string` — Mandatory: `multipart/form-data` #### Request Body `multipart/form-data` - `referenceFile` `string` — Mandatory Reference document file to upload. Allowed extensions: csv, txt, pdf, doc, docx. Max size: 76800 bytes. ### Sample Request ```curl curl --request POST \ --url https://appdomain/endpointdlp/api/data-classification/data-rule/reference-file-upload \ --header 'Accept: application/uploadReferenceDocument.v1+json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: multipart/form-data' \ -F 'referenceFile=(binary file content)' ``` ### Sample Request Body Upload a reference document ```text referenceFile = (binary file content) ``` ## Response ### HTTP 200 Response Body: `application/json` - `fileName` `string` Name of the uploaded reference file - `fileLocation` `string` Server-side location of the uploaded file ### Sample Response: HTTP 200 Successful file upload ```json { "fileName": "reference_keywords.csv", "fileLocation": "/referencefiles/reference_keywords.csv" } ``` ### HTTP 500 Response Body: `application/json` - `errorCode` `string` Internal error code returned when reference file upload fails (validation, size, or persistence) - `errorMessage` `string` Reason the reference file upload was unsuccessful ### Sample Response: HTTP 500 File upload failed ```json { "errorMessage": "File upload is not successful", "errorCode": "INTERNAL_ERROR" } ``` ### Possible Response Codes - `200` — HTTP code - `500` — HTTP code ## Rate Limit ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.