# File

## Upload file to the platform storage.

> This endpoint allows users to upload files to the platform storage.

```json
{"openapi":"3.0.4","info":{"title":"API","version":"v1.0"},"tags":[],"servers":[{"url":"https://api.probe.splx.ai","description":"EU Server"},{"url":"https://us.api.probe.splx.ai","description":"US Server"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","description":"API Key for authentication","name":"X-Api-Key","in":"header"}},"schemas":{"FileUploadDto":{"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"additionalProperties":false},"ErrorResponse":{"required":["error"],"type":"object","properties":{"error":{"oneOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"},{"$ref":"#/components/schemas/BadRequestErrorDetailsDto"}],"description":"Error object."}},"additionalProperties":false,"description":"Response payload for error."},"ErrorDetailsDto":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Error detailed message."},"code":{"type":"string","description":"Error code."}},"additionalProperties":false},"BadRequestErrorDetailsDto":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"}],"properties":{"validationErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Specific validation errors.","nullable":true}},"additionalProperties":false},"UnauthorizedError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"UnauthorizedWithLogoutError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"ForbiddenError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Forbidden access error."},"InternalServerError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Internal Server error."},"NotFoundExampleError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Not Found error."}}},"paths":{"/api/workspaces/{workspaceId}/file/upload":{"post":{"tags":["File"],"summary":"Upload file to the platform storage.","description":"This endpoint allows users to upload files to the platform storage.","parameters":[{"name":"workspaceId","in":"path","description":"Workspace Id.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["File"],"type":"object","properties":{"File":{"type":"string","description":"File that will to be uploaded to the platform storage.","format":"binary"}}},"encoding":{"File":{"style":"form"}}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/FileUploadDto"}},"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/FileUploadDto"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}},"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}},"text/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}},"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}},"text/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"Internal Server Error","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/InternalServerError"}},"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}},"text/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}}}
```

## Upload CSV file for Custom Dataset

> This endpoint allows users to upload a CSV file containing custom dataset information for probes. The uploaded file will be validated and return fileId, fileName and rowsCount information.

```json
{"openapi":"3.0.4","info":{"title":"API","version":"v1.0"},"tags":[],"servers":[{"url":"https://api.probe.splx.ai","description":"EU Server"},{"url":"https://us.api.probe.splx.ai","description":"US Server"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","description":"API Key for authentication","name":"X-Api-Key","in":"header"}},"schemas":{"CustomDatasetFileDto":{"required":["fileId","fileName"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"},"entriesRowCount":{"type":"integer","format":"int32"},"fileName":{"type":"string","nullable":true}},"additionalProperties":false},"ErrorResponse":{"required":["error"],"type":"object","properties":{"error":{"oneOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"},{"$ref":"#/components/schemas/BadRequestErrorDetailsDto"}],"description":"Error object."}},"additionalProperties":false,"description":"Response payload for error."},"ErrorDetailsDto":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Error detailed message."},"code":{"type":"string","description":"Error code."}},"additionalProperties":false},"BadRequestErrorDetailsDto":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"}],"properties":{"validationErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Specific validation errors.","nullable":true}},"additionalProperties":false},"UnauthorizedError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"UnauthorizedWithLogoutError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"ForbiddenError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Forbidden access error."},"InternalServerError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Internal Server error."},"NotFoundExampleError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Not Found error."}}},"paths":{"/api/workspaces/{workspaceId}/probe/custom/dataset/upload":{"post":{"tags":["CustomProbe"],"summary":"Upload CSV file for Custom Dataset","description":"This endpoint allows users to upload a CSV file containing custom dataset information for probes. The uploaded file will be validated and return fileId, fileName and rowsCount information.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["File"],"type":"object","properties":{"File":{"type":"string","description":"File that will to be uploaded to the platform storage.","format":"binary"}}},"encoding":{"File":{"style":"form"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDatasetFileDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}}}
```
