User Tools

Site Tools


api:file:get

API : File Get

Introduction

This request will a single file

Request

URL https://api.telecomx.dk/file/ID
Method GET
Access level Minimum VIEWER.
Param ID Id of the file (24 hex-char string)

Query examples

https://api.telecomx.dk/file/1234567890ABCDEF12345678

Response

File object (JSON)
_id ObjectID Id
filename String Filename
fileId ObjectID Id used to reference to file on file server
size Integer Size of the file in bytes
filetype String Filetype: png, jpg, gif, xls, xlsx, doc, docx, pdf, ppt, pptx, txt, csv
folder ObjectId Reference to the folder which contains this file
employee ObjectID Id of employee who added the file
customer ObjectID Id of the customer the file was added to
type String Type of file: PORTING, INTERNET, AUDIO, IMAGE, DOC, FOLDER, OTHER
width Integer If image, then this is the width in pixels
height Integer If image, then this is the height in pixels
description String Optional description for the file, e.g. 'Porting of 81808888'
date ISODate Date and time when the file was added
lastUpdated ISODate Date and time when the file was last updated/edited
accessLevel Enum Determines who can access the file. “ALL”, “CUSTOMER”, “EMPLOYEE”, “RESELLER”
url String URL to access the file from, if the file is stored on type DOC, IMAGE or AUDIO. Remember to add ?token=<token> if file is protected.

Note that properties holding no value may be omitted from the object.

Example - normal

  {
     "_id": "5ab3c06e0f16d11100f4cd08",
     "filename": "index",
     "size": 12207,
     "filetype": "html",
     "fileId": "cab3c06e0f16d11100f4cd08",
     "employee": "5a9fa770d8211df3274e6545",
     "customer": "54e5f28c741290fc0203b05a",
     "type": "DOC",
     "date": "2018-03-22T14:40:46.286Z",
     "lastUpdated": "2021-04-22T16:40:46.286Z",
     "accessLevel": "CUSTOMER",
     "url": "https://image.telecomx.dk/12345678901234567890ABCD/filename.pdf"
   }

Errors

Error code Message Description
404 id Not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/file/get.txt · Last modified: 2025/11/04 09:53 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki