Job Files
Get a list of files associated with a job or delete them.
Use the Job Files resource to list the files associated with a job or delete them.
Syntax
- Resource
-
1/datamanager/datatools/apiVersion/jobs/jobId/files - Availability
- v1.0
- Formats
- REST
- HTTP methods
-
GET
Gets a list of files associated with a job using the job ID.
DELETE
Deletes all export and log files associated with a job using the job ID.
- Authentication
- OAuth
- Request parameters
-
Parameter Description baseURI baseURI for the API gateway. Different regions have different values. Call the Data Job API lists the values.
For example: na.api-salesforce.com/datamanager/
apiVersion Version of the DJ API to use. The current version is v1.0.
For example: v1.0
jobId Job ID for the job. The job ID is unique per Customer 360 Data Manager environment. This ID identifies the job if you want to get information about status or files associated with the job.
For example: core%2fstmfpba44ice1%2f00DRM000000D1or2BC
- Query parameters
-
- resultsPerPage
- Number of results per page to return.
- fileType
- Filters files by file type. Valid values are configuration, data, datasets, or logs.
- page
- The page of results to return. The page value index starts at 1. If you request page=1, you get results 1–10. If you request page=2, you get results 11–20.
- Request headers
-
- x-sfdc-domain
- Specifies the instance_url returned in the authentication token.
- accept
- Specifies the type. For this resource, application/json is required.
- authorization
- Specifies the authorization token.
- Request and Response Bodies
- Consult the appropriate version of the Data Jobs RAML Spec.
Examples
- GET Request
- Gets the files associated with job ID 5a2a8a6d-970a-3706-b57a-d4e8f598f87e.
-
1curl -vL -X GET \ 2 https://na.api-salesforce.com/datamanager/datatools/v1.0/jobs/5a2a8a6d-970a-3706-b57a-d4e8f598f87e/files \ 3 -H 'accept: application/json' \ 4 -H 'authorization: Bearer 00DRM000000IeI2!AR4AQC1OYYUuPpKu_8ciEb1pIG4v.Dk_F8og22qkSC4.9nu71ZVtShocTlojXK.fFApWCR_cyklulapwgT85bbHt7IR5jNUq' \ 5 -H 'x-sfdc-domain: shdworg.salesforce.com' - GET Response
-
1[ 2 { 3 "documentName": "5a2a8a6d-970a-3706-b57a-d4e8f598f87e_audit_log_row_details-1.csv", 4 "documentId": "069RM00000062WOYAY", 5 "lastModifiedDate": "2020-07-02T20:31:31.000+0000", 6 "ownerEmail": "noreply@00drm000000iei22ak", 7 "title": "5a2a8a6d-970a-3706-b57a-d4e8f598f87e_audit_log_row_details-1", 8 "fileExtension": "csv", 9 "ownerId": "005RM000001yVi2YAE", 10 "size": 110 11 }, 12 { 13 "documentName": "5a2a8a6d-970a-3706-b57a-d4e8f598f87e_audit_log_summary", 14 "documentId": "069RM00000062WJYAY", 15 "lastModifiedDate": "2020-07-02T20:31:30.000+0000", 16 "ownerEmail": "noreply@00drm000000iei22ak", 17 "title": "5a2a8a6d-970a-3706-b57a-d4e8f598f87e_audit_log_summary", 18 "fileExtension": "log", 19 "ownerId": "005RM000001yVi2YAE", 20 "size": 1392 21 }, 22 { 23 "documentName": "MyCompanyBetaOrg-BetaObject-Records.csv", 24 "documentId": "069RM00000062W5YAI", 25 "lastModifiedDate": "2020-07-02T20:27:06.000+0000", 26 "ownerEmail": "admin@shadow-336ee3c9-b55f-40f7-a4b7-f3e130b8bc29.org", 27 "title": "MyCompanyBetaOrg-BetaObject-Records", 28 "fileExtension": "csv", 29 "ownerId": "005RM000001yVhvYAE", 30 "size": 329 31 }, 32 { 33 "documentName": "MyCompanyAlpha_Beta_Orgs_Records.conf", 34 "documentId": "069RM00000062SgYAI", 35 "lastModifiedDate": "2020-07-02T19:18:13.000+0000", 36 "ownerEmail": "admin@shadow-336ee3c9-b55f-40f7-a4b7-f3e130b8bc29.org", 37 "title": "MyCompanyAlpha_Beta_Orgs_Records", 38 "fileExtension": "conf", 39 "ownerId": "005RM000001yVhvYAE", 40 "size": 5390 41 } 42]
- DELETE Request
- Deletes all the files associated with job 5a2a8a6d-970a-3706-b57a-d4e8f598f87e.
-
1curl -vL -X DELETE \ 2 https://na.api-salesforce.com/datamanager/datatools/v1.0/jobs/5a2a8a6d-970a-3706-b57a-d4e8f598f87e/files \ 3 -H 'accept: application/json' \ 4 -H 'authorization: Bearer 00DRM000000IeI2!AR4AQC1OYYUuPpKu_8ciEb1pIG4v.Dk_F8og22qkSC4.9nu71ZVtShocTlojXK.fFApWCR_cyklulapwgT85bbHt7IR5jNUq' \ 5 -H 'x-sfdc-domain: shdworg.salesforce.com' - DELETE Response
- The files are deleted. Returns a list of documentIds for the files that were deleted.
1["069111111111111YAI", "069111111111111YAB"]