UserClouds logo
Authz/Edgetypes

Create Edge Type

This endpoint creates a new edge type, complete with name, source object type and target object type. Edges of a given type can only link source objects and target objects of the specified types.

POST
/authz/edgetypes
edge_type?object

Response Body

curl -X POST "https://your-tenant-name.tenant.userclouds.com/authz/edgetypes" \
  -H "Content-Type: application/json" \
  -d '{}'
const body = JSON.stringify({})

fetch("https://your-tenant-name.tenant.userclouds.com/authz/edgetypes", {
  body
})
package main

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

func main() {
  url := "https://your-tenant-name.tenant.userclouds.com/authz/edgetypes"
  body := strings.NewReader(`{}`)
  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://your-tenant-name.tenant.userclouds.com/authz/edgetypes"
body = {}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "attributes": [
    {
      "direct": true,
      "inherit": true,
      "name": "string",
      "propagate": true
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "deleted": "2019-08-24T14:15:22Z",
  "id": "248df4b7-aa70-47b8-a036-33ac447e668d",
  "organization_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
  "source_object_type_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
  "target_object_type_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
  "type_name": "string",
  "updated": "2019-08-24T14:15:22Z"
}
Empty
Empty
Empty
Empty