İçeriğe geç
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Dosyalar

Bu doküman aşağıdaki uç noktalarını içerir: 1. Dosyaları uygulamanın farklı bölümlerine yükleme — Dosya yükle 2. Projelerde dosyalar özelliği Yükleme ve indirme Dosyalar görevlere, görev aktivitelerine, sohbet mesajlarına, müşterilere ve dosyalar sayfasına yüklenebilir. Önce Dosya yükle ile dosyayı yükleyin; sunucu dosya ID'sini döner. Bu ID'yi diğer uç noktalarda kullanın. Dosya sayfası uç noktaları Bu uç noktalar, bir projenin ve bir müşterinin Dosyalar sayfasındaki dosya ve klasörleri görüntülemenize, oluşturmanıza, düzenlemenize ve silmenize olanak tanır. Dosyalar sayfasının yapısı bir bilgisayardaki veya Google Drive gibi diğer dosya depolama hizmetlerindeki dosya sistemine benzer. İç içe geçmiş dosya ve dizin düğümlerinden oluşur. En üstte bir kök dizin düğümü bulunur. Dizinler alt dosya ve dizin düğümlerini tutar. Dosya düğümleri, Dosya yükle uç noktasından dönen dosya kaydıyla aynı değildir. Dosya düğümü kayıtları, dosya kayıtlarına işaret eder.

Dosya yükle

post

Dosya yükler ve kaydı döner. multipart/form-data. En fazla 4 GB.

Authorizations
AuthorizationstringRequired

Entegrasyonlar sayfasından alınan erişim jetonu. Header: Authorization: Bearer ERİŞİM_JETONUNUZ.

Body
filestring · binaryOptional

Dosya içeriği ve dosya adı

Responses
200

Dosya ayrıntıları

application/json
_idstringOptional
namestringOptional
thumbnailstringOptional
post/files/upload
POST /api/v1/files/upload HTTP/1.1
Host: cubicl.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}
{
  "_id": "text",
  "name": "text",
  "thumbnail": "text",
  "google": {
    "id": "text",
    "extension": "text",
    "webViewLink": "text",
    "mimeType": "text"
  },
  "dropbox": {
    "id": "text",
    "webViewLink": "text"
  }
}

İndirme bağlantısı al

get

Cubicl'e yüklenen dosyalara izinsiz erişim sağlanamaz. Bir dosyayı indirmek için bir indirme bağlantısı istemeniz gerekir. Ardından, dosyayı indirmek için döndürülen bağlantıya bir HTTP isteği gönderebilirsiniz. Linklerin süresi 5 dakikadır. Bundan sonra başka bir bağlantı almanız gerekir.

Authorizations
AuthorizationstringRequired

Entegrasyonlar sayfasından alınan erişim jetonu. Header: Authorization: Bearer ERİŞİM_JETONUNUZ.

Path parameters
idstringRequired

MongoDB ObjectId

Example: 627fd586f8b23768c7261a63
Responses
200

İndirme URL'si

application/json
stringOptional
get/files/{id}/url
GET /api/v1/files/{id}/url HTTP/1.1
Host: cubicl.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
text

Düğümleri getir

get

Bir dizindeki dosya ve dizin düğümlerini alır. İstek, group veya customer parametreleri ile gönderilmelidir.

Authorizations
AuthorizationstringRequired

Entegrasyonlar sayfasından alınan erişim jetonu. Header: Authorization: Bearer ERİŞİM_JETONUNUZ.

Query parameters
groupstringOptional

MongoDB ObjectId

Example: 627fd586f8b23768c7261a63
customerstringOptional

MongoDB ObjectId

Example: 627fd586f8b23768c7261a63
parentall ofOptional

Dizin ID'si. Kök için null. Belirtilmezse tüm dizinlerde arar.

stringOptional

MongoDB ObjectId

Example: 627fd586f8b23768c7261a63
and
any · nullableOptional
searchstringOptional

Dosya ve dizin adlarında aranacak metin

Responses
200

Dosya sistemi düğümleri

application/json
_idstringOptional
parentstring · nullableOptional
groupstringOptional
customerstringOptional
typestring · enumOptional

f: dosya, d: dizin

Possible values:
namestringOptional
createdAtnumberOptional

Unix zaman damgası (saniye)

get/file-system-nodes
GET /api/v1/file-system-nodes HTTP/1.1
Host: cubicl.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "_id": "text",
    "parent": "text",
    "group": "text",
    "customer": "text",
    "type": "f",
    "file": {
      "_id": "text",
      "name": "text",
      "thumbnail": "text",
      "google": {
        "id": "text",
        "extension": "text",
        "webViewLink": "text",
        "mimeType": "text"
      },
      "dropbox": {
        "id": "text",
        "webViewLink": "text"
      }
    },
    "name": "text",
    "createdAt": 1
  }
]

Düğümleri sil

delete

Bir projeden veya müşteriden dosya ve dizin düğümlerini siler. Dosya düğümleri, dosya kayıtları ve yüklenen dosya ile birlikte silinir. Farklı projelerden veya müşterilerden birden çok düğüm, tek bir istekte silinemez.

Authorizations
AuthorizationstringRequired

Entegrasyonlar sayfasından alınan erişim jetonu. Header: Authorization: Bearer ERİŞİM_JETONUNUZ.

Body
nodesstring[]Required

Silinecek düğüm ID listesi

Responses
204

İçerik yok

No content

delete/file-system-nodes
DELETE /api/v1/file-system-nodes HTTP/1.1
Host: cubicl.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "nodes": [
    "text"
  ]
}

No content

Dosya ekle

post

Yüklenen dosyalar için dosya düğümleri oluşturur. group veya customer parametresi ayarlanmalıdır. Dosyaları önce Dosya yükle ile yükleyin.

Authorizations
AuthorizationstringRequired

Entegrasyonlar sayfasından alınan erişim jetonu. Header: Authorization: Bearer ERİŞİM_JETONUNUZ.

Body
groupstringOptional

Proje dosyalar sayfasındaysa proje ID'si

customerstringOptional

Müşteri dosyalar sayfasındaysa müşteri ID'si

parentstring · nullableRequired

Üst dizin ID'si. Kök dizin ise null.

filesone ofRequired

Dosya ID listesi

stringOptional
or
string[]Optional
Responses
200

Dosya sistemi düğüm listesi

application/json
_idstringOptional
parentstring · nullableOptional
groupstringOptional
customerstringOptional
typestring · enumOptional

f: dosya, d: dizin

Possible values:
namestringOptional
createdAtnumberOptional

Unix zaman damgası (saniye)

post/file-system-nodes/files
POST /api/v1/file-system-nodes/files HTTP/1.1
Host: cubicl.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "group": "text",
  "customer": "text",
  "parent": "text",
  "files": "text"
}
[
  {
    "_id": "text",
    "parent": "text",
    "group": "text",
    "customer": "text",
    "type": "f",
    "file": {
      "_id": "text",
      "name": "text",
      "thumbnail": "text",
      "google": {
        "id": "text",
        "extension": "text",
        "webViewLink": "text",
        "mimeType": "text"
      },
      "dropbox": {
        "id": "text",
        "webViewLink": "text"
      }
    },
    "name": "text",
    "createdAt": 1
  }
]

Dizin ekle

post

Bir dizin düğümü oluşturur. group veya customer parametresi ayarlanmalıdır. Üst dizin kök dizin ise parent null olmalı.

Authorizations
AuthorizationstringRequired

Entegrasyonlar sayfasından alınan erişim jetonu. Header: Authorization: Bearer ERİŞİM_JETONUNUZ.

Body
groupstringOptional

Proje dosyalar sayfasındaysa proje ID'si

customerstringOptional

Müşteri dosyalar sayfasındaysa müşteri ID'si

parentstring · nullableOptional

Üst dizin ID'si. Kök dizin ise null.

namestringRequired

Dizin adı

Responses
200

Dosya sistemi düğümü

application/json
_idstringOptional
parentstring · nullableOptional
groupstringOptional
customerstringOptional
typestring · enumOptional

f: dosya, d: dizin

Possible values:
namestringOptional
createdAtnumberOptional

Unix zaman damgası (saniye)

post/file-system-nodes/directories
POST /api/v1/file-system-nodes/directories HTTP/1.1
Host: cubicl.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 64

{
  "group": "text",
  "customer": "text",
  "parent": "text",
  "name": "text"
}
{
  "_id": "text",
  "parent": "text",
  "group": "text",
  "customer": "text",
  "type": "f",
  "file": {
    "_id": "text",
    "name": "text",
    "thumbnail": "text",
    "google": {
      "id": "text",
      "extension": "text",
      "webViewLink": "text",
      "mimeType": "text"
    },
    "dropbox": {
      "id": "text",
      "webViewLink": "text"
    }
  },
  "name": "text",
  "createdAt": 1
}

Son güncelleme

Bu yararlı oldu mu?