Table of contents

io.cozy.sharings

This doctype describes a sharing, ie an action made by some user to share some documents and files from her cozy instance to other people.

Example

{
  "_id": "fffe04ebbec335405161f19133a0cd5c",
  "_rev": "7-bb721ae29e74ff2d776d8cbabf1a0bf5",
  "triggers": {
    "track_id": "fffe04ebbec335405161f19133a0fab5",
    "replicate_id": "fffe04ebbec335405161f19133a1172a",
    "upload_id": "fffe04ebbec335405161f19133a133bd"
  },
  "active": true,
  "owner": true,
  "description": "Let's work together!",
  "app_slug": "",
  "created_at": "2018-06-01T16:54:32.677789079+02:00",
  "updated_at": "2018-06-01T16:54:32.677789079+02:00",
  "rules": [
    {
      "title": "labore_adipisci",
      "doctype": "io.cozy.files",
      "values": [
        "fffe04ebbec335405161f19133a0b7b1"
      ],
      "add": "sync",
      "update": "sync",
      "remove": "sync"
    }
  ],
  "members": [
    {
      "status": "owner",
      "name": "Alice",
      "email": "alice+test@cozy.tools",
      "instance": "http://alice.test.cozy.tools:8081"
    },
    {
      "status": "ready",
      "name": "Benjamin Denis",
      "email": "denis@borer.org",
      "instance": "http://bob.test.cozy.tools:8082"
    }
  ],
  "credentials": [
    {
      "state": "OyPayIajZQUUX_KsZY2yaQ",
      "client": {
        "client_id": "fffe04ebbec335405161f19133a0e286",
        "client_secret": "JeOuBosC329bnz1rFK3Yenw8_8TleOa2",
        "client_secret_expires_at": 0,
        "registration_access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZWdpc3RyYXRpb24iLCJpYXQiOjE1Mjc4NjQ4ODQsImlzcyI6ImJvYi50ZXN0LmNvenkudG9vbHM6ODA4MiIsInN1YiI6ImZmZmUwNGViYmVjMzM1NDA1MTYxZjE5MTMzYTBlMjg2In0.WsNnnFnnf_vgf2OQyGSaj9XyK2elkaGHyl2vFpjzlCxEfj7ZoE7B2b6_GtRIdmhh42VSawoyGLAXsPh-ml10GQ",
        "redirect_uris": [
          "http://alice.test.cozy.tools:8081/sharings/answer"
        ],
        "client_name": "Sharing Alice",
        "client_kind": "sharing",
        "client_uri": "http://alice.test.cozy.tools:8081/",
        "software_id": "github.com/cozy/cozy-stack"
      },
      "access_token": {
        "token_type": "bearer",
        "access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhY2Nlc3MiLCJpYXQiOjE1Mjc4NjQ4ODQsImlzcyI6ImJvYi50ZXN0LmNvenkudG9vbHM6ODA4MiIsInN1YiI6ImZmZmUwNGViYmVjMzM1NDA1MTYxZjE5MTMzYTBlMjg2Iiwic2NvcGUiOiJpby5jb3p5LnNoYXJpbmdzOkFMTDpmZmZlMDRlYmJlYzMzNTQwNTE2MWYxOTEzM2EwY2Q1YyJ9.ZS0r9KpjrctckigRIELJQryzHrFGo-1dQvRplSNj8N0jyJE1LPgnYuiDedQ8EQN5-1ffeLUf3h_Rygz2ozQvPA",
        "refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZWZyZXNoIiwiaWF0IjoxNTI3ODY0ODg0LCJpc3MiOiJib2IudGVzdC5jb3p5LnRvb2xzOjgwODIiLCJzdWIiOiJmZmZlMDRlYmJlYzMzNTQwNTE2MWYxOTEzM2EwZTI4NiIsInNjb3BlIjoiaW8uY296eS5zaGFyaW5nczpBTEw6ZmZmZTA0ZWJiZWMzMzU0MDUxNjFmMTkxMzNhMGNkNWMifQ.cnH-COVwBIY8zOK51BBkLhb8vRbA96mRJ_W-i3Gg_qZoAISUjmzM3IH69DPQzD99OFnyeGWPhuIkCyWZX7ULQA",
        "scope": "io.cozy.sharings:ALL:fffe04ebbec335405161f19133a0cd5c"
      },
      "xor_key": "CAMHBgkAAgEMCAkMAgsIAw==",
      "inbound_client_id": "fffe04ebbec335405161f19133a0ecc2"
    }
  ]
}

io.cozy.shared

This doctype is an internal one for the stack. It is used to track what documents are shared, and to replicate changes from one Cozy to the others.

Example

{
  "_id": "io.cozy.files/becbd072f742f5444f5d7837b2f4e323",
  "_rev": "1-af3192a67f2bf69e011aa1bda39e6c72",
  "revisions": {
    "rev": "4-4135d4994981c0041e3c89a681542307"
  },
  "infos": {
    "fffe04ebbec335405161f19133a0cd5c": {
      "rule": 0,
      "binary": true
    }
  }
}