# Files

This is a resource representing a binary file hosted on Navarik's servers. A file can be uploaded to a specific job using the create file request of media type multipart/form-data.

# Data Model

Field Type Description
caption string File name
location string Uploaded file's internal identifier for Navarik infrastructure
body.format string File type

# API

# List files

Returns all files for a specified job within a specified workspace.

GET /workspaces/{workspace_id}/jobs/{job_id}/files

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference

# Query parameters

​ Parameter Description Format Default
limit Maximum number of records to return integer
offset The number of records to skip integer 0
sort List of comma-separated ordering criteria field:asc|desc

# Create a file

Creates a file for a job.

POST /workspaces/{workspace_id}/jobs/{jobs_id}/files

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference

# Query parameters

​ Parameter Description Format Default
limit Maximum number of records to return integer
offset The number of records to skip integer 0
sort List of comma-separated ordering criteria field:asc|desc

# Request example:

hide code
form = {
    file: < path to the local file>
}

# Response example:

hide code
{
    "id": "f05670b2-5a0c-4ad8-8a9d-44125b46061c",
    "body": {
        "caption": "SampleInspectionResult-Final.pdf",
        "location": "upload_05e8e39d0737dc2a8e8e6624bf85d045",
        "format": "application/pdf"
    }
}

# Get a file descriptor

Retrieves the details of a specific file that was attached to a job.

GET /workspaces/{workspace_id}/jobs/{jobs_id}id/files/{files_id}

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference
file_id File id reference

# Response example

hide code
{
    "caption": "SampleInspectionResult-Final.pdf",
    "location": "upload_05e8e39d0737dc2a8e8e6624bf85d045",
    "format": "application/pdf"
}

# Download a file

Downloads a copy of specific file that was attached to a job.

GET workspaces/{workspace_id}/jobs/{job_id}/files/{file_id}/content

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference
file_id File id reference

# Delete a file

Deletes a file from a job.

DELETE /workspaces/{workspace_id}/jobs/{job_id}/files/{file_id}

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference
file_id File id reference

# Response example

hide code
{
    "caption": "SampleInspectionResult-Final.pdf",
    "location": "upload_05e8e39d0737dc2a8e8e6624bf85d045",
    "format": "application/pdf"
}
Last Updated: 8/24/2021, 7:59:53 PM