File Service REST Endpoints
GET /api/files/user
Description:
- 
                                                    
Returns JSON representations of files and download links created by the authenticating user
 
Returns:
{
  "success": true,
  "results": {
    "files": [
      {
        "fileName": "1597844691188_1600106243782_audits_all.csv",
        "expires": 0,
        "createdDate": 1645628164187,
        "size": 1846,
        "createdBy": "admin",
        "ready": true,
        "id": "62164b01fb466944464611d4",
        "mimeType": "text/csv",
        "type": "audit"
      },
      {
        "fileName": "SIMFLOFY_METADATA_EXPORT_1646664394935.xml",
        "expires": 0,
        "createdDate": 1646664399500,
        "size": 247720,
        "createdBy": "admin",
        "ready": true,
        "id": "62261acabaadee4a665812b6",
        "mimeType": "text/xml",
        "type": "audit"
      }
    ],
    "links": [
      {
        "internal": true,
        "expires": 1646759539873,
        "fileName": "",
        "createdBy": "admin",
        "connectorId": "3Sixty Admin",
        "docId": "6213e0f0f7558f0cc7458e5e",
        "created": 0,
        "id": "$2a$04$5G23b6YRC4eBc9XP5haUTuz5G4zjgSaKHxzmfhyDvOUfkfD4WRINS",
        "used": 0
      },
      {
        "internal": false,
        "expires": 1646759571044,
        "fileName": "Testdoc.txt",
        "createdBy": "admin",
        "connectorId": "box",
        "docId": "851131887027",
        "created": 0,
        "id": "$2a$04$3vXhjvIAX7lQZY4OSUa8L.tY6263QBw61eye9OYaEiAGp9enNX.lW",
        "used": 2
      }
    ]
  }
}
                                                With CURL
curl -u admin:admin -X GET "localhost:8081/3sixty-admin/api/files/user" | json_pp
                                                GET /api/files/user
Description:
- 
                                                    
Downloads a file stored by 3Sixty
 
Parameter
- 
                                                    
id: The id of the file handle, as retrieved from the /files/user endpoint
 
Returns:
A Byte Array containing the document
With CURL
curl -u admin:admin -X GET "localhost:8081/3sixty-admin/api/files/user/download?id=6213e0e4f7558f0cc7458e5a" | json_pp
                                                DELETE /api/files/user/delete
Description:
- 
                                                    
Deletes a file stored by 3Sixty
 
Parameter
- 
                                                    
id: The id of the file handle, as retrieved from the /files/user endpoint
 
Returns:
A JSON Representation of the deleted handle
{
  "success": true,
  "results": {
    "fileName": "SIMFLOFY_EDRM_EXPORT_1646666824612.zip",
    "expires": 0,
    "createdDate": 1646666829615,
    "size": 1258,
    "createdBy": "admin",
    "ready": true,
    "id": "62262448564e6c4058126148",
    "mimeType": "application/zip",
    "type": "audit"
  }
}
                                                With CURL
curl -u admin:admin -X GET "localhost:8081/3sixty-admin/api/files/user/delete?id=6213e0e4f7558f0cc7458e5a" | json_pp
                                                DELETE /api/files/user/stop
Description:
- 
                                                    
Stops an export in progress. Will return an error if the export of the file is ready for download.
 
Returns:
The file size of the completed file, or 0 if the process was successfully stopped
{
  "success": true,
  "results": 0
}
                                                GET /api/files/external/link
Query Parameters:
- 
                                                    
docId: The id of the document. If this file is managed by 3Sixty, use the id from the /files/user endpoint
 - 
                                                    
internal: Lets 3Sixty know whether this file is internally managed or exists in an external source connectorId: (optional) If the files is externally managed, the connectorId of a Content Service Connector that can access it.
 - 
                                                    
fileName: The name of the file, required if connectorId is not supplied
 - 
                                                    
lifeSpan: (optional, default 3) The number of days the link will be valid for.
 
Returns:
A JSON representation of the download link. The key of this object can be use with the /public/download endpoint
{
  "success": true,
  "results": {
    "internal": true,
    "expires": 1646759539873,
    "fileName": "SIMFLOFY_EDRM_EXPORT_1646666824612.zip",
    "createdBy": "admin",
    "connectorId": "3Sixty Admin",
    "docId": "6213e0f0f7558f0cc7458e5e",
    "created": 0,
    "key": "$2a$04$5G23b6YRC4eBc9XP5haUTuz5G4zjgSaKHxzmfhyDvOUfkfD4WRINS",
    "used": 0
  }
}
                                                With CURL
curl -u admin:admin -X GET  "http://localhost:8081/3sixty-admin/api/files/external/link?docId=851131887027&connectorId=box" | json_pp
                                                DELETE /api/files/external/link
Query Parameters:
- 
                                                    
key: The key of the download link
 
Returns:
A json representation of the deleted download link
{
  "success": true,
  "results": {
    "internal": true,
    "expires": 1646759539873,
    "fileName": "SIMFLOFY_EDRM_EXPORT_1646666824612.zip",
    "createdBy": "admin",
    "connectorId": "3Sixty Admin",
    "docId": "6213e0f0f7558f0cc7458e5e",
    "created": 0,
    "key": "$2a$04$5G23b6YRC4eBc9XP5haUTuz5G4zjgSaKHxzmfhyDvOUfkfD4WRINS",
    "used": 0
  }
}
                                                With CURL
curl -u admin:admin -X DELETE  "http://localhost:8081/3sixty-admin/api/files/external/link?key=$2a$04$5G23b6YRC4eBc9XP5haUTuz5G4zjgSaKHxzmfhyDvOUfkfD4WRINS" | json_pp
                                                GET /api/public/download/ready
Query Parameters:
- 
                                                    
key: The key of the download link
 
Returns:
{
  "success": true,
  "results": true
}
                                                With CURL
curl -u admin:admin -X GET  "http://localhost:8081/3sixty-admin/api/public/download/ready?key=$2a$04$5G23b6YRC4eBc9XP5haUTuz5G4zjgSaKHxzmfhyDvOUfkfD4WRINS" | json_pp
                                                GET /api/public/download
Query Parameters:
- 
                                                    
key: The key of the download link
 
Returns:
Triggers a download of the file