Sharing
Sharing and invitations
curl -X GET "https://example.com/sharing/outgoing"fetch("https://example.com/sharing/outgoing")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/sharing/outgoing"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/sharing/outgoing"
response = requests.request("GET", url)
print(response.text)Empty
Get shares for a resource
Path Parameters
resourceTypeRequiredstringresourceIdRequiredstringResponse Body
curl -X GET "https://example.com/sharing/outgoing/string/string"fetch("https://example.com/sharing/outgoing/string/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/sharing/outgoing/string/string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/sharing/outgoing/string/string"
response = requests.request("GET", url)
print(response.text)Empty
Share a resource with a friend
Request Body
application/jsonRequiredrecipientHandleRequiredstringresourceTypeRequiredstringresourceIdRequiredstringencryptedDatastringnoncestringResponse Body
curl -X POST "https://example.com/sharing/" \
-H "Content-Type: application/json" \
-d '{
"recipientHandle": "string",
"resourceType": "collection",
"resourceId": "string",
"encryptedData": "string",
"nonce": "string"
}'const body = JSON.stringify({
"recipientHandle": "string",
"resourceType": "collection",
"resourceId": "string",
"encryptedData": "string",
"nonce": "string"
})
fetch("https://example.com/sharing/", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/sharing/"
body := strings.NewReader(`{
"recipientHandle": "string",
"resourceType": "collection",
"resourceId": "string",
"encryptedData": "string",
"nonce": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/sharing/"
body = {
"recipientHandle": "string",
"resourceType": "collection",
"resourceId": "string",
"encryptedData": "string",
"nonce": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Empty
curl -X POST "https://example.com/sharing/string/revoke"fetch("https://example.com/sharing/string/revoke")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/sharing/string/revoke"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/sharing/string/revoke"
response = requests.request("POST", url)
print(response.text)Empty
curl -X DELETE "https://example.com/sharing/string"fetch("https://example.com/sharing/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/sharing/string"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/sharing/string"
response = requests.request("DELETE", url)
print(response.text)Empty
curl -X GET "https://example.com/sharing/incoming"fetch("https://example.com/sharing/incoming")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/sharing/incoming"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/sharing/incoming"
response = requests.request("GET", url)
print(response.text)Empty
curl -X GET "https://example.com/sharing/incoming/pending"fetch("https://example.com/sharing/incoming/pending")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/sharing/incoming/pending"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/sharing/incoming/pending"
response = requests.request("GET", url)
print(response.text)Empty
curl -X POST "https://example.com/sharing/incoming/string/accept"fetch("https://example.com/sharing/incoming/string/accept")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/sharing/incoming/string/accept"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/sharing/incoming/string/accept"
response = requests.request("POST", url)
print(response.text)Empty
curl -X POST "https://example.com/sharing/incoming/string/reject"fetch("https://example.com/sharing/incoming/string/reject")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/sharing/incoming/string/reject"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/sharing/incoming/string/reject"
response = requests.request("POST", url)
print(response.text)Empty
curl -X DELETE "https://example.com/sharing/incoming/string"fetch("https://example.com/sharing/incoming/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/sharing/incoming/string"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/sharing/incoming/string"
response = requests.request("DELETE", url)
print(response.text)Empty