Update (Type)

Description

The update operation is available for a knowledge graph service data model's administrative named types resource. With this operation, an administrative client can update an entity type or relationship type in the data model. Identify the type you want to update by specifying the type name. Use the data model query operation to learn about the item types that are defined in the schema.

You must have sufficient privileges to edit content and editing must be enabled for the knowledge graph service for this operation to be successful. You can enable editing for a knowledge graph service in the same way that you enable it for a hosted feature layer. The knowledge graph service's strict property must not be set to true, which indicates the data model cannot be modified.

If the knowledge graph service's data model can be updated, you can use this operation to set the strict property for a specific type. For example, making this change would mean only the owner of the service or the service administrator can add or remove properties for this type. The strict property can be set for both entity types and relationship types.

For relationship types, you can additionally set properties to indicate whether the types that can participate in a relationship are flexible. If a HasVehicle relationship type should only be used to connect a Person entity with a Vehicle entity, you can set both the strictOrigin property and strictDest properties to true. In contrast, the default HasDocument relationship type has the strictDest property set to true because the destination of any HasDocument relationship must have a Document entity type. However, any type of entity can have a HasDocument relationship, so the HasDocument relationship type has its strictOrigin property set to false.

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "strict": <boolean>,
  "strictOrigin": <boolean>,
  "strictDest": <boolean>
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "strict": true,
  "strictOrigin": false,
  "strictDest": true
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.