API संदर्भ

साझा

सुविधा समर्थन के लिए app.capabilities और प्राधिकरण के लिए app.access तथा होस्ट अनुमतियाँ जाँचें। उदाहरण कृत्रिम मान उपयोग करते हैं; कॉल करने से पहले पथ, ID, इनपुट और फ़िल्टर बदलें।

प्रकार परिभाषाएँ

graphql
type Mutation {
  createShare(input: ShareInput!): Share!
  deleteShare(id: ID!): Boolean!
  updateShare(id: ID!, input: ShareInput!): Share!
}

type Query {
  share(id: ID!): Share
  shares: [Share!]!
}

scalar Instant

type Share {
	id: ID!
	name: String!
	password: String!
	expiresAt: Instant
	readOnly: Boolean!
	data: [SharePath!]!
	url: String!
}

input ShareInput {
	name: String!
	password: String!
	expiresAt: Instant
	readOnly: Boolean!
	data: [SharePathInput!]!
}

type SharePath {
	virtualPath: String!
	realPath: String!
	isDir: Boolean!
}

input SharePathInput {
	virtualPath: String!
	realPath: String!
	isDir: Boolean!
}

ऑपरेशन

mutation

createShare

चुने पथ, केवल-पढ़ने की नीति और वैकल्पिक समाप्ति समय वाला साझा बनाएँ।

graphql
mutation createShare($input: ShareInput!) {
  createShare(input: $input) { id name password expiresAt readOnly url }
}
mutation

deleteShare

साझा मिटाएँ और उससे होने वाली पहुँच निरस्त करें।

graphql
mutation deleteShare($id: ID!) {
  deleteShare(id: $id)
}
mutation

updateShare

साझा का नाम, समाप्ति समय या चुने फ़ाइलसिस्टम रूट अपडेट करें।

graphql
mutation updateShare($id: ID!, $input: ShareInput!) {
  updateShare(id: $id, input: $input) { id name password expiresAt readOnly url }
}
query

share

टाइप किए गए पथ मानचित्र और उपयोगी URL सहित एक साझा आइटम पढ़ें; न मिलने पर null लौटाएँ।

graphql
query share($id: ID!) {
  share(id: $id) { id name password expiresAt readOnly url }
}
query

shares

सहेजे गए साझा आइटम सूचीबद्ध करें, जिनमें संपादन योग्य समाप्त आइटम भी शामिल हैं।

graphql
query shares {
  shares { id name password expiresAt readOnly url }
}