Parchment Docs

Integrations

Third-party integrations

curl -X GET "https://example.com/integrations/configured"
fetch("https://example.com/integrations/configured")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/integrations/configured"

  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/integrations/configured"

response = requests.request("GET", url)

print(response.text)
Empty

Get all available integrations (metadata only)

GET
/integrations/available

Response Body

curl -X GET "https://example.com/integrations/available"
fetch("https://example.com/integrations/available")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/integrations/available"

  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/integrations/available"

response = requests.request("GET", url)

print(response.text)
Empty
curl -X GET "https://example.com/integrations/string"
fetch("https://example.com/integrations/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/integrations/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/integrations/string"

response = requests.request("GET", url)

print(response.text)
Empty

Delete an integration

DELETE
/integrations/{id}

Path Parameters

idRequiredstring

Response Body

curl -X DELETE "https://example.com/integrations/string"
fetch("https://example.com/integrations/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/integrations/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/integrations/string"

response = requests.request("DELETE", url)

print(response.text)
Empty

Update an integration

PUT
/integrations/{id}

Request Body

application/jsonRequired
configobject
capabilitiesarray<object>

Path Parameters

idRequiredstring

Response Body

curl -X PUT "https://example.com/integrations/string" \
  -H "Content-Type: application/json" \
  -d '{
    "config": {},
    "capabilities": [
      {
        "id": "string",
        "active": true
      }
    ]
  }'
const body = JSON.stringify({
  "config": {},
  "capabilities": [
    {
      "id": "string",
      "active": true
    }
  ]
})

fetch("https://example.com/integrations/string", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/integrations/string"
  body := strings.NewReader(`{
    "config": {},
    "capabilities": [
      {
        "id": "string",
        "active": true
      }
    ]
  }`)
  req, _ := http.NewRequest("PUT", 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/integrations/string"
body = {
  "config": {},
  "capabilities": [
    {
      "id": "string",
      "active": true
    }
  ]
}
response = requests.request("PUT", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Create a new integration

POST
/integrations

Request Body

application/jsonRequired
integrationIdRequiredstring
configRequiredobject
capabilitiesarray<object>
schemestring

Response Body

curl -X POST "https://example.com/integrations/" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationId": "string",
    "config": {},
    "capabilities": [
      {
        "id": "string",
        "active": true
      }
    ],
    "scheme": "string"
  }'
const body = JSON.stringify({
  "integrationId": "string",
  "config": {},
  "capabilities": [
    {
      "id": "string",
      "active": true
    }
  ],
  "scheme": "string"
})

fetch("https://example.com/integrations/", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/integrations/"
  body := strings.NewReader(`{
    "integrationId": "string",
    "config": {},
    "capabilities": [
      {
        "id": "string",
        "active": true
      }
    ],
    "scheme": "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/integrations/"
body = {
  "integrationId": "string",
  "config": {},
  "capabilities": [
    {
      "id": "string",
      "active": true
    }
  ],
  "scheme": "string"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Get integrations that depend on this one

GET
/integrations/{id}/dependents

Path Parameters

idRequiredstring

Response Body

curl -X GET "https://example.com/integrations/string/dependents"
fetch("https://example.com/integrations/string/dependents")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/integrations/string/dependents"

  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/integrations/string/dependents"

response = requests.request("GET", url)

print(response.text)
Empty

Test an integration configuration

POST
/integrations/test

Request Body

application/jsonRequired
integrationIdRequiredstring
configRequiredobject

Response Body

curl -X POST "https://example.com/integrations/test" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationId": "string",
    "config": {}
  }'
const body = JSON.stringify({
  "integrationId": "string",
  "config": {}
})

fetch("https://example.com/integrations/test", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/integrations/test"
  body := strings.NewReader(`{
    "integrationId": "string",
    "config": {}
  }`)
  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/integrations/test"
body = {
  "integrationId": "string",
  "config": {}
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

OSM OAuth2 callback

GET
/integrations/osm/callback

Query Parameters

codestring
statestring

Response Body

curl -X GET "https://example.com/integrations/osm/callback?code=string&state=string"
fetch("https://example.com/integrations/osm/callback?code=string&state=string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/integrations/osm/callback?code=string&state=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/integrations/osm/callback?code=string&state=string"

response = requests.request("GET", url)

print(response.text)
Empty

Get OSM OAuth2 authorization URL

GET
/integrations/osm/authorize

Response Body

curl -X GET "https://example.com/integrations/osm/authorize"
fetch("https://example.com/integrations/osm/authorize")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/integrations/osm/authorize"

  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/integrations/osm/authorize"

response = requests.request("GET", url)

print(response.text)
Empty

Get fresh OSM profile data

GET
/integrations/osm/profile

Response Body

curl -X GET "https://example.com/integrations/osm/profile"
fetch("https://example.com/integrations/osm/profile")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/integrations/osm/profile"

  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/integrations/osm/profile"

response = requests.request("GET", url)

print(response.text)
Empty

Disconnect OSM account

POST
/integrations/osm/disconnect

Response Body

curl -X POST "https://example.com/integrations/osm/disconnect"
fetch("https://example.com/integrations/osm/disconnect")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/integrations/osm/disconnect"

  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/integrations/osm/disconnect"

response = requests.request("POST", url)

print(response.text)
Empty