Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Esri Developer

ArcGIS API for PythonAPI Reference

arcgis.graph module

Thearcgis.graph module contains classes and functions for working with ArcGIS Knowledge graphs. The availablefunctions allow for searching and querying the graph data, and viewing the data model of the graph database.

Knowledge graphs consist of entities and the relationships between them, each of which can contain properties which describetheir attributes. The data model of the knowledge graph can show you which entities, relationships, and properties are inyour database, along with other information about the graph. Performing a search or openCypher query on the graph willreturn results from the database based on the search or query terms provided.

Note

Applications based on ArcGIS API for Python version 2.0.1 can only communicate with knowledge graphs in an ArcGIS Enterprise10.9.1 or 11.0 deployment. ArcGIS Enterprise 11.1 includes breaking changes for knowledge graphs. Only applications based onArcGIS API for Python version 2.1.0 or later will be able to communicate with knowledge graphs in an Enterprise 11.1 deployment.See the ArcGIS Enterprise Knowledge Server documentation for more details.

KnowledgeGraph

classarcgis.graph.KnowledgeGraph(url:str,*,gis=None)

Provides access to the Knowledge Graph service data model and properties, as well asmethods to search and query the graph.

Parameter

Description

url

Knowledge Graph service URL

gis

an authenticatedGIS object.

# Connect to a Knowledge Graph service:gis=GIS(url="url",username="username",password="password")knowledge_graph=KnowledgeGraph(url,gis=gis)
apply_edits(adds:Sequence[dict[str,Any]|Entity|Relationship]=[],updates:Sequence[dict[str,Any]|Entity|Relationship]=[],deletes:Sequence[dict[str,Any]|EntityDelete|RelationshipDelete]=[],input_transform:dict[str,Any]|Transform|None=None,cascade_delete:bool=False,cascade_delete_provenance:bool=False,as_dict:bool=True)dict|ApplyEditsResponse

Allows users to add, update, and deleteEntity andRelationship.

Note

objectid values are not supported in dictionaries for apply_edits

Parameter

Description

adds

Optional list ofEntity orRelationship. The list ofobjects to add to the graph, represented in dictionary format.

updates

Optional list ofEntity orRelationship. The list ofexistent graph objects that are to be updated, representedin dictionary format.

deletes

Optional list ofEntityDelete orRelationshipDelete. The listof existent objects to remove from the graph, represented indictionary format.

input_transform

OptionalTransform.Allows a user to specify custom quantization parameters for inputgeometry, which dictate how geometries are compressed andtransferred to the server. Defaults to lossless WGS84 quantization.

cascade_delete

Optional boolean. WhenTrue, relationships connected toentities that are being deleted will automatically be deletedas well. WhenFalse, these relationships must be deletedmanually first. Defaults toFalse.

cascade_delete_provenance

Optional boolean. WhenTrue, deleting entities/relationshipsor setting their property values to null will result inautomatic deletion of associated provenance records. WhenFalse,apply_edits() will fail if there are provenancerecords connected to entities/relationships intended fordeletion or having their properties set to null.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

fromarcgis.graphimportEntity,Relationshipadd_entity=Entity(type_name="Company",properties={"name":"Esri"})delete_relationship=DeleteRelationship(type_name="WorksAt",ids=[UUID("783bd422-3hfp-45c7-87aa-8adbbdac0a3d")])graph.apply_edits(adds=[add_entity],deletes=[delete_relationship],as_dict=False)
Returns:

ApplyEditsResponse

constraint_rule_adds(rules:Sequence[dict[str,Any]|ConstraintRule],as_dict:bool=True)dict|ConstraintRuleAddsResponse

Adds constraint rules for entities & relationships to the data model.RelationshipExclusionRule is a constraint rule.

Parameter

Description

rules

Required Sequence ofRelationshipExclusionRule.Defines the constraint rules to be added.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

fromarcgis.graphimportRelationshipExclusionRulegraph.constraint_rule_adds(rules=[RelationshipExclusionRule(name="OnlyPersonCanWorkAtCompany",origin_entity_types=SetOfNamedTypes(set_complement=["Person"]),relationship_types=SetOfNamedTypes(set=["WorksAt"]),destination_entity_types=SetOfNamedTypes(set=["Company"]))],as_dict=False)
Returns:

ConstraintRuleAddsResponse

constraint_rule_deletes(rule_names:Sequence[str],as_dict:bool=True)dict|ConstraintRuleDeletesResponse

Deletes existing constraint rules for entities & relationships from the data model.RelationshipExclusionRule is a constraint rule.

Parameter

Description

rule_names

Required Sequence of strings. The names of the constraint rules tobe deleted, as defined in a rule’s ‘name’ attribute.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

# Delete a constraint rule from the Knowledge Graph's data model.graph.constraint_rule_deletes(["constraint_rule_1"],as_dict=False)
Returns:

ConstraintRuleDeletesResponse

constraint_rule_updates(rules:Sequence[dict[str,Any]|ConstraintRuleUpdate],as_dict:bool=True)dict|ConstraintRuleUpdatesResponse

UpdateConstraintRule for entities & relationships in the data model.RelationshipExclusionRule is a type of constraint rule.

Parameter

Description

rules

Required Sequence ofRelationshipExclusionRuleUpdate.Defines the constraint rules to be updated.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

fromarcgis.graphimportRelationshipExclusionRuleUpdate,ConstraintRule,ConstraintRuleMask,UpdateSetOfNamedTypesgraph.constraint_rule_updates(rules=[RelationshipExclusionRuleUpdate(rule_name="OnlyPersonCanWorkForCompany",mask=ConstraintRuleMask(update_name=True,update_alias=True),constraint_rule=ConstraintRule(name="PersonCanWorkForCompanyOrPark",alias="Person Can Work For Company or Park"))],as_dict=False)
Returns:

ConstraintRuleUpdatesResponse

propertydatamodel:dict

Returns the datamodel for the Knowledge Graph service

Returns:

dict

classmethodfromitem(item)

Returns the Knowledge Graph service from an Item

graph_property_adds(type_name:str,graph_properties:Sequence[dict[str,Any]|GraphProperty],as_dict:bool=True)dict|PropertyAddsResponse

Adds set ofGraphProperty to a named type in the data model

Learn more about adding properties in a knowledge graph

Parameter

Description

type_name

Required string. The entity or relationship type to which theproperties will be added.

graph_properties

Required Sequence ofGraphProperty.The Sequence of properties to add to the named type.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

fromarcgis.graphimportGraphPropertygraph.graph_property_adds(type_name="Vehicle",graph_properties=[GraphProperty(name="year")])
Returns:

PropertyAddsResponse

graph_property_delete(type_name:str,property_name:str,as_dict:bool=True)dict|PropertyDeleteResponse

Delete aGraphProperty for a named type in the data model

Learn more about deleting properties in a knowledge graph

Parameter

Description

type_name

Required string. The entity or relationship type containingthe property to be deleted.

property_name

Required string. The property to be deleted.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

# Delete a named type's property in the data modeldelete_result=knowledge_graph.graph_property_delete("Person","Address",as_dict=False)
Returns:

PropertyDeleteResponse

graph_property_index_adds(type_name:str,field_indexes:Sequence[dict[str,Any]|FieldIndex],as_dict:bool=True)dict|IndexAddsResponse

Adds one or moreFieldIndex to a field or multiple fieldsassociated with a named type in the data model.

Learn more about adding graph property indexes in a knowledge graph

Parameter

Description

type_name

Required string. The entity or relationship type to add theindexes to.

field_indexes

Required list of dicts. The indexes to add for the type.See below for an example of the structure.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

fromarcgis.graphimportFieldIndexgraph.graph_property_index_adds(type_name="Person",field_indexes=[FieldIndex(name="name_index",is_ascending=True,is_unique=False,fields=["name"])],as_dict=False)
Returns:

IndexAddsResponse

graph_property_index_deletes(type_name:str,field_indexes:Sequence[str],as_dict:bool=True)dict|IndexDeletesResponse

Deletes one or moreFieldIndex from fieldsassociated with a named type in the data model.

Learn more about deleting graph property indexes from a knowledge graph

Parameter

Description

type_name

Required string. The entity or relationship type to delete thefield indexes from.

field_indexes

Required Sequence of strings. The field indexes to delete from thetype.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

# Delete field indexes from a Knowledge Graph typedelete_result=graph.graph_property_index_deletes("Project",["title"],as_dict=False)
Returns:

IndexDeletesResponse

graph_property_update(type_name:str,property_name:str,graph_property:dict[str,Any]|GraphProperty,mask:dict[str,Any]|GraphPropertyMask,as_dict:bool=True)dict|PropertyUpdateResponse

Updates aGraphProperty for a named type in the data model

Learn more about updating properties in a knowledge graph

Parameter

Description

type_name

Required string. The entity or relationship type containingthe property to be updated.

property_name

Required string. The property to be updated.

graph_property

RequiredGraphProperty.The graph property to be updated.

mask

RequiredGraphPropertyMask.The properties of the field to be updated.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

fromarcgis.graphimportGraphProperty,GraphPropertyMaskgraph.graph_property_update(type_name="Vehicle",property_name="year",graph_property=GraphProperty(name="year",alias="year_made"),mask=GraphPropertyMask(update_alias=True),as_dict=False)
Returns:

PropertyUpdateResponse

named_object_type_adds(entity_types:Sequence[dict[str,Any]|EntityType]=[],relationship_types:Sequence[dict[str,Any]|RelationshipType]=[],as_dict:bool=True)dict|NamedObjectTypeAddsResponse

AddsEntityType andRelationshipTypeto the data model

Learn more about adding named types to a knowledge graph

Parameter

Description

entity_types

Optional list of EntityTypes. The list of entity typesto add to the data model, represented in dictionary format.

relationship_types

Optional list of RelationshipTypes. The list ofrelationship types to add to the data model, represented indictionary format.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

fromarcgis.graphimportEntityType,RelationshipType,GraphPropertyentity_type_add=EntityType(name="Vehicle",properties={"make":GraphProperty(name="make")})relationship_type_add=RelationshipType(name="Drives")graph.named_object_type_adds(entity_types=[entity_type_add],relationship_types=[relationship_type_add],as_dict=False)
Returns:

NamedObjectTypeAddsResponse

named_object_type_delete(type_name:str,as_dict:bool=True)dict|NamedObjectTypeDeleteResponse

Deletes anEntityType orRelationshipType in the data model

Learn more about deleting named types in a knowledge graph

Parameter

Description

type_name

Required string. The named type to be deleted.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

# Delete a named type in the data modeldelete_result=graph.named_object_type_delete("Person")
Returns:

NamedObjectTypeDeleteResponse

named_object_type_update(type_name:str,named_type_update:dict[str,Any]|EntityType|RelationshipType,mask:dict[str,Any]|NamedObjectTypeMask,as_dict:bool=True)dict|NamedObjectTypeUpdateResponse

Updates anEntityType orRelationshipType in the data model

Learn more about updating named types in a knowledge graph

Parameter

Description

type_name

Required string. The named type to be updated.

named_type_update

Required Union[EntityType,RelationshipType]. The entity orrelationship type to be updated.

mask

RequiredNamedObjectTypeMask.The properties of the named type to be updated.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

fromarcgis.graphimportEntityType,NamedObjectTypeMasktype_update=EntityType(name="Vehicle",alias="Car")graph.named_object_type_update(type_name="Vehicle",named_type_update=type_update,mask=NamedObjectTypeMask(update_alias=True),as_dict=False)
Returns:

NamedObjectTypeUpdateResponse

propertyproperties:InsensitiveDict

Returns the properties of the Knowledge Graph service

query(query:str)List[dict]

Deprecated since version 2.4.1:Removed in: 3.0.0. Use query_streaming instead.

Deprecated since version 2.4.1:Removed in: 3.0.0. Use query_streaming instead.

Queries the Knowledge Graph using openCypher

Learn more about querying a knowledge graph

Parameter

Description

query

Required String. Allows you to return the entities andrelationships in a graph, as well as the properties of thoseentities and relationships, by providing an openCypher query.

# Perform an openCypher query on the knowledge graphquery_result=knowledge_graph.query("MATCH path = (n)-[r]-(n2) RETURN path LIMIT 5")
Returns:

List[list]

query_data_model(as_dict:bool=True)dict|GraphDataModel

Returns the datamodel for the Knowledge Graph service

Parameter

Description

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

# Query knowledge graph data modelknowledge_graph.query_data_model(as_dict=False)
Returns:

GraphDataModel

query_streaming(query:str,input_transform:dict[str,Any]|Transform|None=None,bind_param:dict[str,Any]={},include_provenance:bool=False,as_dict:bool=True)Generator[Sequence[Any],None,None]

Query the graph using an openCypher query. Allows for more customization than the basequery() function. Creates a generator of the queryresults, from which users can access each row or add them to a list.See below for example usage.

Parameter

Description

query

Required String. Allows you to return the entities andrelationships in a graph, as well as the properties of thoseentities and relationships, by providing an openCypher query.

input_transform

Optional dict or Transform. Allows a user to specify custom quantizationparameters for input geometry, which dictate how geometries arecompressed and transferred to the server. Defaults to losslessWGS84 quantization.

bind_param

Optional dict. The bind parameters used to filterquery results. Key of each pair is the string name for it,which is how the parameter can be referenced in the query. Thevalue can be any “primitive” type value that may be found asan attribute of an entity or relationship (e.g., string,double, boolean, etc.), a list, an anonymous object (a dict),or a geometry.

Anonymous objects and geometries can be passedin as either their normal Python forms, or following theformat found in Knowledge Graph entries (containing an“_objectType” key, and “_properties” for anonymous objects).

Note: Including bind parameters not used in the query willcause queries to yield nothing on ArangoDB based services,while Neo4j based services will still produce results.

include_provenance

Optional boolean. WhenTrue, provenance entities (metadata)will be included in the query results. Defaults toFalse.

# Get a list of all query resultsquery_gen=knowledge_graph.query_streaming("MATCH path = (n)-[r]-(n2) RETURN path LIMIT 5")results=list(gen)# Grab one result at a timequery_gen=knowledge_graph.query_streaming("MATCH path = (n)-[r]-(n2) RETURN path LIMIT 5")first_result=next(query_gen)second_result=next(query_gen)
Returns:

Generator[Sequence[Any], None, None]

search(search:str,category:str='both',as_dict:bool=True)List[Sequence[Any]]

Allows for the searching of the properties of entities,relationships, or both in the graph using a full-text index.

Learn more about searching a knowledge graph

Parameter

Description

search

Required String. The search to perform on the Knowledge Graph.

category

Optional String. The category is the location of the fulltext search. This can be isolated to either theentities ortherelationships. The default is to look inboth.

The allowed values are: both, entities, relationships,both_entity_relationship, and meta_entity_provenance. Both andboth_entity_relationship are functionally the same.

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

Note

Check theservice definition for the Knowledge Graph servicefor valid values of category. Not all services support both and both_entity_relationship.

#Perform a search on the knowledge graphforsearch_resultinknowledge_graph.search("cat",as_dict=False):print(search_result)# Perform a search on only entities in the knowledge graphforsearchentities_resultinknowledge_graph.search("cat","entities",as_dict=False):print(searchentities_result)
Returns:

Generator[Sequence[Any], None, None]

sync_data_model(as_dict:bool=True)dict|SyncDataModelResponse

Synchronizes the Knowledge Graph Service’s data model with any changes madein the database. Will return any errors or warnings from the sync.

Parameter

Description

as_dict

Optional Boolean. Determines whether the result is returned asa dictionary or an object. The default is True. False is recommended.

# Synchronize the data modelsync_result=knowledge_graph.sync_data_model(as_dict=False)
Returns:

SyncDataModelResponse

update_search_index(adds:dict[str,dict|SearchIndexProperties]={},deletes:dict[str,dict|SearchIndexProperties]={},as_dict:bool=True)dict|UpdateSearchIndexResponse

Allows users to add or deleteSearchIndexProperties for differentEntityType andRelationshipTypefrom theGraphDataModel. Can only be existent properties for a givenentity/relationship type.

fromarcgis.graphimportSearchIndexPropertiesgraph.update_search_index(adds={"Person":SearchIndexProperties(property_names=["name"])},as_dict=False)
Returns:

UpdateSearchIndexResponse

Data Model Types

ConstraintRule

pydanticmodelarcgis.graph.data_model_types.ConstraintRule

Represents an constraint rule to define how data can be created inthe knowledge graph.

Parameter

Description

name

Required String. Name for the exclusion rule.

alias

Optional String. The default value is “”.

disabled

Optional Boolean. The default value is False.

role

OptionalesriGraphConstraintRuleRole. The default value is “esriGraphConstraintRuleRoleRegular”..

fromarcgis.graphimportConstraintRule# Example 1: Update a constraint ruleperson_company_constraint=ConstraintRule(name="PersonCanWorkForCompanyOrPark",alias="Person Can Work For Company or Park")graph.constraint_rule_updates(rules=[RelationshipExclusionRuleUpdate(rule_name="OnlyPersonCanWorkForCompany",mask=ConstraintRuleMask(update_name=True,update_alias=True),constraint_rule=person_company_constraint)],as_dict=False)# Example 2: Access an exclusion rule from the data modeldata_model=graph.query_data_model()data_model.constraint_rules
fieldalias:str=''

The constraint rule alias.

fielddisabled:bool=False

Whether the constraint rule is disabled.

fieldname:str[Required]

The constraint rule name.

fieldrole:Literal['esriGraphConstraintRuleRoleUNSPECIFIED','esriGraphConstraintRuleRoleRegular','esriGraphConstraintRuleRoleHasDocument','esriGraphConstraintRuleRoleNoProvenanceOrigin','esriGraphConstraintRuleRoleNoProvenanceDestination']='esriGraphConstraintRuleRoleRegular'

The constraint rule role.

fieldtype:Literal['esriGraphConstraintRuleTypeUNSPECIFIED']='esriGraphConstraintRuleTypeUNSPECIFIED'

The constraint rule type.

ConstraintRuleMask

pydanticmodelarcgis.graph.data_model_types.ConstraintRuleMask

Allows users to define which settings to update for a contraint rule

Parameter

Description

update_name

Optional Boolean. The default value is False.

update_alias

Optional Boolean. The default value is False.

update_disabled

Optional Boolean. The default value is False.

fromarcgis.graphimportConstraintRuleMaskConstraintRuleMask(update_name=True,update_alias=True,update_disabled=True)
fieldupdate_alias:bool=False

Whether to update the alias in the constraint rule.

fieldupdate_disabled:bool=False

Whether to update if the constraint rule is disabled.

fieldupdate_name:bool=False

Whether to update the name in the constraint rule.

EndPoint

pydanticmodelarcgis.graph.data_model_types.EndPoint

Represents a set of origin and destination entity types for a relationship type

Parameter

Description

origin_enity_type

Required String. Name of origin entity type.

destination_entity_type

Required String. Name of destination entity type.

fromarcgis.graphimportEndPointEndPoint("Person","Company")
fielddestination_entity_type:str[Required]

The destination entity type for the relationship type.

fieldorigin_entity_type:str[Required]

The origin entity type for the relationship type.

ser_model()dict[str,Any]

EntityType

pydanticmodelarcgis.graph.data_model_types.EntityType

Represents an entity named object type for a Knowledge Graph.

Parameter

Description

name

Required String. Name for the Entity Type.

alias

Optional String. The default value is “”.

role

OptionalesriGraphNamedObjectRole String. The default value is “esriGraphNamedObjectRegular”.

strict

Optional Boolean. The default value is False.

properties

Optional Dict(String,GraphProperty). The default value is {}.

field_indexes

Optional Dict(String,FieldIndex). The default value is {}.

fromarcgis.graphimportEntityType# Example 1: Define an entity typeEntityType(name="Person",properties={"name":GraphProperty(name="name")},field_indexes={"name_index":FieldIndex(name="name_index",is_ascending=True,is_unique=False,fields=["name"])})# Example 2: Access information about an entity type from the data modeldata_model=graph.query_data_model()data_model.entity_types['Person'].properties

FieldIndex

pydanticmodelarcgis.graph.data_model_types.FieldIndex

Represents a field index to be used ingraph_property_index_adds().

Parameter

Description

name

Required String. Name for the field index.

is_ascending

Required Boolean.

is_unique

Required Boolean.

fields

Required List(String). List of field names for the index.

fromarcgis.graphimportFieldIndex# Example 1: create a FieldIndex to useFieldIndex(name="name_index",is_ascending=True,is_unique=False,fields=["name"])# Example 2: access FieldIndex in the data modeldata_model=graph.query_data_model()data_model.entity_types["Person"].field_indexes['name_index'].fields
fieldfields:list[str][Required]

The list of fields participating in the index.

fieldis_ascending:bool[Required]

Whether the index is ascending.

fieldis_unique:bool[Required]

Whether the index is unique.

fieldname:str[Required]

The index name.

classConfig
alias_generator()str

Convert a snake_case string to camelCase.

Args:

snake: The string to convert.

Returns:

The converted camelCase string.

GraphDataModel

pydanticmodelarcgis.graph.data_model_types.GraphDataModel

Allows users to access information about the knowledge graph’s data model.

fromarcgis.gisimportGISfromarcgis.graphimportKnowledgeGraph,GraphDataModelgraph=KnowledgeGraph("URL to Knowledge Graph Service",gis=GIS("home"))data_model=graph.query_data_model()# Access the timestamp the data model was last update. The response will be an integer timestamp.data_model.data_model_timestamp# Access the spatial reference. The response will be a dictionary containing the spatial reference information.data_model.spatial_reference# Access entity types. The response will be a dictionary of string names and EntityType objects.data_model.entity_types# Access relationship types. The response will be a dictionary of string names and RelationshipType objects.data_model.relationship_types# Access meta entity types (example: Provenance). The response will be a dictionary of string names and EntityType objects.data_model.meta_entity_types# Access the boolean value of whether the data model is strictdata_model.strict# Access the object id property name. The response will be a string.data_model.objectid_property# Access the global id property name. The response will be a string.data_model.globalid_property# Access the boolean value of whether the knowledge graph is ArcGIS managed.data_model.arcgis_managed# Access the identifier info. The response will be a IdentifierInfo object.data_model.identifier_info# Access the search indexes. The response will be a list of SearchIndex objects.data_model.search_indexes# Access the provenance source type valuesdata_model.provenance_source_type_values# Access the constraint rulesdata_model.constraint_rules
fieldarcgis_managed:bool[Required]

Whether the Knowledge Graph is ArcGIS managed.

fieldconstraint_rules:list[Annotated[ConstraintRule|RelationshipExclusionRule,Discriminator(discriminator=type,custom_error_type=None,custom_error_message=None,custom_error_context=None)]]=[]

The list of constraint rules.

fielddata_model_timestamp:int[Required]

The timestamp of the last change to the data model.

fieldentity_types:list[EntityType]=[]

The list of entity types in the data model.

fieldglobalid_property:str[Required]

The name of the GlobalID property.

fieldidentifier_info:IdentifierInfo[Required]

Contains information about the unique identifier.

fieldmeta_entity_types:list[EntityType]=[]

The list of meta entity types in the data model.

fieldobjectid_property:str[Required]

The name of the ObjectID property.

fieldprovenance_source_type_values:ProvenanceSourceTypeValues=ProvenanceSourceTypeValues(value_behavior_array=[])

The Provenance source type values.

fieldrelationship_types:list[RelationshipType]=[]

The list of relationship types in the data model.

fieldsearch_indexes:list[SearchIndex]=[]

The list of search indexes.

fieldspatial_reference:dict[str,Any][Required]

The spatial reference of the Knowledge Graph.

fieldstrict:bool[Required]

If True, the data model can only be edited by admins or owners.

ser_model()dict[str,Any]

GraphProperty

pydanticmodelarcgis.graph.data_model_types.GraphProperty

Represents a property of anEntityType orRelationshipType in the Knowledge Graph.

Parameter

Description

name

Required String. Name for the property. The default value is “”.

alias

Optional String. Alias for the property. The default value is “”.

domain

Optional String. Name of domain for the property. The default value is “”.

field_type

OptionalesriFieldType string. The default value is “esriFieldTypeString”.

geometry_type

OptionalesriGeometryType string. The default is None.

has_z

Optional Boolean. The default value is False.

has_m

Optional Boolean. The default value is False.

default_value

Optional Any value. The default value is None.

nullable

Optional Boolean. The default value is True.

visible

Optional Boolean. The default value is True.

editable

Optional Boolean. The default value is True.

required

Optional Boolean. The default value is False.

role

OptionalesriGraphPropertyRole string. The default value is “esriGraphPropertyRegular”.

fromarcgis.graphimportGraphProperty# Example 1: simple string propertyGraphProperty(name="name",alias="name",required=True)# Example 2: geometry propertyGraphProperty(name="shape",field_type="esriFieldTypeGeoemtry",geometry_type="esriGeometryPolygon")# Example 3: get GraphProperty information from data modeldata_model=graph.query_data_model()data_model.entity_types['Person'].properties['name'].required# accesses the required property on the GraphProperty 'name'.
fieldalias:str=''

The alias of the property.

fielddefault_value:Any=None

The default property value, or None if there is no default.

fielddomain:str=''

The domain of the property.

fieldeditable:bool=True

Whether the property is editable.

fieldfield_type:Literal['esriFieldTypeSmallInteger','esriFieldTypeInteger','esriFieldTypeSingle','esriFieldTypeDouble','esriFieldTypeString','esriFieldTypeDate','esriFieldTypeDateOnly','esriFieldTypeTimeOnly','esriFieldTypeTimestampOffset','esriFieldTypeOID','esriFieldTypeGeometry','esriFieldTypeBlob','esriFieldTypeRaster','esriFieldTypeGUID','esriFieldTypeGlobalID','esriFieldTypeXML','esriFieldTypeBigInteger']='esriFieldTypeString'

The type of the property.

fieldgeometry_type:Literal['esriGeometryPoint','esriGeometryMultipoint','esriGeometryPolyline','esriGeometryPolygon','esriGeometryEnvelope']|None=None

The geometry type, or None if not a geometry property.

fieldhas_m:bool=False

Whether the geometry has M values.

fieldhas_z:bool=False

Whether the geometry has Z values.

fieldis_system_maintained:bool=False

Whether the property is system maintained.

fieldname:str[Required]

The name of the property.

fieldnullable:bool=True

Whether the property is nullable.

fieldrequired:bool=False

Whether the property is required.

fieldrole:Literal['esriGraphPropertyUNSPECIFIED','esriGraphPropertyRegular','esriGraphPropertyDocumentName','esriGraphPropertyDocumentTitle','esriGraphPropertyDocumentUrl','esriGraphPropertyDocumentText','esriGraphPropertyDocumentKeywords','esriGraphPropertyDocumentContentType','esriGraphPropertyDocumentMetadata','esriGraphPropertyDocumentFileExtension','esriGraphPropertyProvenanceInstanceId','esriGraphPropertyProvenanceSourceType','esriGraphPropertyProvenanceSourceName','esriGraphPropertyProvenanceSource','esriGraphPropertyProvenanceComment','esriGraphPropertyProvenanceTypeName','esriGraphPropertyProvenancePropertyName']='esriGraphPropertyRegular'

The role of the property.

fieldvisible:bool=True

Whether the property is visible.

classConfig
alias_generator()str

Convert a snake_case string to camelCase.

Args:

snake: The string to convert.

Returns:

The converted camelCase string.

ser_model()dict[str,Any]

GraphPropertyMask

pydanticmodelarcgis.graph.data_model_types.GraphPropertyMask

Allows users to define which settings should be updated for aGraphPropertyduring agraph_property_update().

Parameter

Description

update_name

Optional Boolean. The default value is False.

update_alias

Optional Boolean. The default value is False.

update_domain

Optional Boolean. The default value is False.

update_field_type

Optional Boolean. The default value is False.

update_geometry_type

Optional Boolean. The default value is False.

update_has_z

Optional Boolean. The default value is False.

update_has_m

Optional Boolean. The default value is False.

update_default_value

Optional Boolean. The default value is False.

update_nullable

Optional Boolean. The default value is False.

update_visible

Optional Boolean. The default value is False.

update_editable

Optional Boolean. The default value is False.

update_required

Optional Boolean. The default value is False.

fromarcgis.graphimportGraphPropertyMaskGraphPropertyMask(update_name=True,update_visible=True,update_editable=True)
fieldupdate_alias:bool=False

Whether to update the property alias.

fieldupdate_default_value:bool=False

Whether to update the property default value.

fieldupdate_domain:bool=False

Whether to update the property domain.

fieldupdate_editable:bool=False

Whether to update if the property is editable.

fieldupdate_field_type:bool=False

Whether to update the property field type.

fieldupdate_geometry_type:bool=False

Whether to update the property geometry type.

fieldupdate_has_m:bool=False

Whether to update if the property has M values.

fieldupdate_has_z:bool=False

Whether to update if the property has Z values.

fieldupdate_name:bool=False

Whether to update the property name.

fieldupdate_nullable:bool=False

Whether to update if the property is nullable.

fieldupdate_required:bool=False

Whether to update if the property is required.

fieldupdate_visible:bool=False

Whether to update if the property is visible.

NamedObjectTypeMask

pydanticmodelarcgis.graph.data_model_types.NamedObjectTypeMask

Allows user to define what should be updated when performing anamed_object_type_update().

Parameter

Description

update_name

Optional Boolean. The default value is False.

update_alias

Optional Boolean. The default value is False.

update_role

Optional Boolean. The default value is False.

update_strict

Optional Boolean. The default value is False.

fromarcgis.graphimportNamedObjectTypeMaskNamedObjectTypeMask(update_name=True,update_alias=True,update_strict=True)
fieldupdate_alias:bool=False

Whether to update the alias in the entity or relationship type.

fieldupdate_name:bool=False

Whether to update the name in the entity or relationship type.

fieldupdate_role:bool=False

Whether to update the role in the entity or relationship type.

fieldupdate_strict:bool=False

Whether to update if the entity or relationship type is strict.

RelationshipExclusionRule

pydanticmodelarcgis.graph.data_model_types.RelationshipExclusionRule

Represents an exclusion rule to define how relationships can be created inthe knowledge graph between defined entity types.

Parameter

Description

name

Required String. Name for the exclusion rule.

alias

Optional String. The default value is “”.

disabled

Optional Boolean. The default value is False.

role

OptionalesriGraphConstraintRuleRole. The default value is “esriGraphConstraintRuleRoleRegular”.

origin_entity_types

RequiredSetOfNamedTypes.

relationship_types

RequiredSetOfNamedTypes.

destination_entity_types

RequiredSetOfNamedTypes.

fromarcgis.graphimportRelationshipExclusionRule,SetOfNamedTypes# Example 1: Define an exclusion ruleRelationshipExclusionRule(name="OnlyPersonCanWorkAtCompany",origin_entity_types=SetOfNamedTypes(set_complement=["Person"]),relationship_types=SetOfNamedTypes(set=["WorksAt"]),destination_entity_types=SetOfNamedTypes(set=["Company"]))# Example 2: Access an exclusion rule from the data modeldata_model=graph.query_data_model()data_model.constraint_rules
fielddestination_entity_types:SetOfNamedTypes[Required]

The destination entity types in the rule.

fieldorigin_entity_types:SetOfNamedTypes[Required]

The origin entity types in the rule.

fieldrelationship_types:SetOfNamedTypes[Required]

The relationship types in the rule.

fieldtype:Literal['esriGraphRelationshipExclusionRuleType']='esriGraphRelationshipExclusionRuleType'

The constraint rule type.

ser_model()dict[str,Any]

RelationshipExclusionRuleUpdate

pydanticmodelarcgis.graph.data_model_types.RelationshipExclusionRuleUpdate

Allows a user to provide information for updating a relationship exclusion rule

Parameter

Description

rule_name

Required String. Name of the constraint rule to update

mask

RequiredConstraintRuleMask.

constraint_rule

RequiredRelationshipExclusionRule.

update_origin_entity_types

RequiredUpdateSetOfNamedTypes.

update_relationship_types

RequiredUpdateSetOfNamedTypes.

update_destination_entity_types

RequiredUpdateSetOfNamedTypes.

fromarcgis.graphimportRelationshipExclusionRuleUpdate,RelationshipExclusionRule,ConstraintRuleMaskRelationshipExclusionRuleUpdate(rule_name="OnlyPersonCanWorkForCompany",mask=ConstraintRuleMask(update_name=True,update_alias=True),constraint_rule=RelationshipExclusionRule(name="PersonCanOnlyWorkAtCompany",alais="Person Works At Company",origin_entity_types=SetOfNamedTypes(set_complement=["Person"]),relationship_types=SetOfNamedTypes(set=["WorksAt"]),destination_entity_types=SetOfNamedTypes(set=["Company"])),update_origin_entity_types=UpdateSetOfNamedTypes(add_named_types=["Employee"],remove_named_types=[]),update_relationship_types=UpdateSetOfNamedTypes(add_named_types=["WorksFor"],remove_named_types=["WorksAt"]),update_destination_entity_types=UpdateSetOfNamedTypes(add_named_types=["Park"],remove_named_types=[]))
fieldupdate_destination_entity_types:UpdateSetOfNamedTypes[Required]

Updates to the set of destination entity types.

fieldupdate_origin_entity_types:UpdateSetOfNamedTypes[Required]

Updates to the set of origin entity types.

fieldupdate_relationship_types:UpdateSetOfNamedTypes[Required]

Updates to the set of relationship types.

ser_model()dict[str,Any]

RelationshipType

pydanticmodelarcgis.graph.data_model_types.RelationshipType

Represents a relationship named object type for a Knowledge Graph.

Parameter

Description

name

Required String. Name for the Entity Type.

alias

Optional String. The default value is “”.

role

OptionalesriGraphNamedObjectRole String. The default value is “esriGraphNamedObjectRegular”.

strict

Optional Boolean. The default value is False.

properties

Optional Dict(String,GraphProperty). The default value is {}.

field_indexes

Optional Dict(String,FieldIndex). The default value is {}.

end_points

Optional List[EndPoint]. The default value is [].

fromarcgis.graphimportRelationshipType# Example 1: Define a relationship typeRelationshipType(name="WorksAt",properties={"name":GraphProperty(name="name")},field_indexes={"name_index":FieldIndex(name="name_index",is_ascending=True,is_unique=False,fields=["name"])})# Example 2: Access a relationship type from the data modeldata_model=graph.query_data_model()data_model.relationship_types['WorksAt'].properties
fieldobserved_end_points:list[EndPoint]=[]

The observed origin and destination entity type pairs in the database for the relationship type.

ser_model()dict[str,Any]

SetOfNamedTypes

pydanticmodelarcgis.graph.data_model_types.SetOfNamedTypes

Allows users to define the set of named types for aRelationshipExclusionRule.

Defining aset will exclude the set of named type names from being created in the graphonce the exclusion rule is applied.Defining aset_complement will exclude anything other than the set of named type namesfrom being created in the graph once the exclusion rule is applied.

Parameter

Description

set

Optional List of Strings. The default value is [].

set_complement

Optional List of Strings. The default value is [].

fromarcgis.graphimportSetOfNamedTypes# Example 1: setSetOfNamedTypes(set=["Person","Animal"])# Example 2: set_complementSetOfNamedTypes(set_complement=["Company"])
fieldset:list[str]=[]

The set of types.

fieldset_complement:list[str]=[]

The complement of the set of types.

ser_model()dict[str,Any]
type_of_set()TypeOfSet

UpdateSetOfNamedTypes

pydanticmodelarcgis.graph.data_model_types.UpdateSetOfNamedTypes

Allows a user to define named types to add or remove from aRelationshipExclusionRule.

Parameter

Description

add_named_types

Required List of Strings. Names of types to add to rule.

remove_named_types

Required List of Strings. Names of types to remove from rule.

fromarcgis.graphimportUpdateSetOfNamedTypesUpdateSetOfNamedTypes(add_named_types=["Individual"],remove_named_types=["Person"])
fieldadd_named_types:list[str][Required]

The named types to add to the set.

fieldremove_named_types:list[str][Required]

The named types to remove from the set.

Graph Types

Entity

pydanticmodelarcgis.graph.graph_types.Entity

Represents an entity instance in the knowledge graph

Parameter

Description

type_name

Required String. Name of theEntityType

id

Optional UUID. The default value is None. If not provided, an id willbe assigned to the entity when it is created.

properties

Required Dictionary of Strings and Any values. String is the propertyname and Any value is the value for that property.

fromarcgis.graphimportEntity# Example 1: Define an entityEntity(type_name="Company",properties={"name":"Esri"})# Example 2: Access an entity in a query responsequery_result=graph.query("MATCH (n) RETURN n")next(query_result)[0].properties
ser_model()dict[str,Any]

EntityDelete

pydanticmodelarcgis.graph.graph_types.EntityDelete

Allows a user to define which entities to delete from aEntityType.

Parameter

Description

type_name

Required String. Name of theEntityType

ids

Required List of UUID or Strings. Ids of the entities to delete.

fromarcgis.graphimportEntityDelete# Example 1: Provide entity id values manuallyEntityDelete(type_name="Person",ids=[UUID("783bd422-3hfp-45c7-87aa-8adbbdac0a3d")])# Example 2: Delete from results of a queryresults=graph.query("MATCH (n:Person) WHERE n.name CONTAINS "delete" RETURN n.globalid")EntityDelete(type_name="Person",ids=list(results)[0])
ser_model()dict[str,Any]

Path

pydanticmodelarcgis.graph.graph_types.Path

A list ofEntity andRelationshipobjects required to traverse a graph from one entity to another.

graph.query("MATCH path=()-[]-() RETURN path LIMIT 1")path=list(result)[0][0]path.path[0]# first entity in pathpath.path[1]# first relationship in pathpath.path[-1]# last entity in path
fieldpath:list[Entity|Relationship][Required]

The list of entities and relationships in the path.

ser_model()dict[str,Any]

Relationship

pydanticmodelarcgis.graph.graph_types.Relationship

Represents a relationship instance in the knowledge graph

Parameter

Description

type_name

Required String. Name of theEntityType

id

Optional UUID or String. The default value is None. If not provided, an id willbe assigned to the entity when it is created.

origin_entity_id

Required UUID or String. The id of the originEntity in the graph.

destiation_entity_id

Required UUID or String. The id of the destinationEntity in the graph.

properties

Optional Dictionary of Strings and Any values. String is the propertyname and Any value is the value for that property.

fromarcgis.graphimportRelationshipfromdatetimeimportdatetimefromuuidimportUUID# Example 1: Define a relationshipRelationship(type_name="WorksAt",origin_entity_id=UUID("488bd414-3afd-4547-89aa-4adbbdac0a8d"),destination_entity_id=UUID("783bd422-3hfp-45c7-87aa-8adbbdac0a3d"),properties={"start_date":datetime.fromtimestamp(1578247200000)})# Example 2: Access an relationship in a query responsequery_result=graph.query("MATCH ()-[n]-() RETURN n")next(query_result)[0].properties
fielddestination_entity_id:Any[Required]

The unique identifier of the relationship’s destination entity.

fieldorigin_entity_id:Any[Required]

The unique identifier of the relationship’s origin entity.

ser_model()dict[str,Any]

RelationshipDelete

pydanticmodelarcgis.graph.graph_types.RelationshipDelete

Allows a user to define which relationships to delete from aRelationshipType.

Parameter

Description

type_name

Required String. Name of theRelationshipType

ids

Required List of UUID or Strings. Ids of the relationships to delete.

fromarcgis.graphimportRelationshipDelete# Example 1: Provide relationship id values manuallyRelationshipDelete(type_name="WorksAt",ids=[UUID("783bd422-3hfp-45c7-87aa-8adbbdac0a3d")])# Example 2: Delete from results of a queryresults=graph.query("MATCH ()-[n:WorksAt]-() WHERE n.name CONTAINS "delete" RETURN n.globalid")RelationshipDelete(type_name="WorksAt",ids=list(results)[0])
ser_model()dict[str,Any]

Transform

pydanticmodelarcgis.graph.graph_types.Transform

Allows a user to specify custom quantization parameters for input geometry,which dictate how geometries are compressed and transferred to the server.

Parameter

Description

xy_resolution

Required float.

x_false_origin

Required float.

y_false_origin

Required float.

z_resolution

Required float.

z_false_origin

Required float.

m_resolution

Required float.

m_false_origin

Required float.

fieldm_false_origin:float[Required]

The M false origin.

fieldm_resolution:float[Required]

The M resolution.

fieldx_false_origin:float[Required]

The X false origin.

fieldxy_resolution:float[Required]

The XY resolution.

fieldy_false_origin:float[Required]

The Y false origin.

fieldz_false_origin:float[Required]

The Z false origin.

fieldz_resolution:float[Required]

The Z resolution.

classConfig
alias_generator()str

Convert a snake_case string to camelCase.

Args:

snake: The string to convert.

Returns:

The converted camelCase string.

Search Types

SearchIndex

pydanticmodelarcgis.graph.search_types.SearchIndex

Allows full-text search capability on the graph for a set of properties for each entity or relationship type.Search indexes can be accessed in theGraphDataModel.

data_model=graph.query_data_model()data_model.search_indexes
fieldanalyzers:list[SearchAnalyzer][Required]

The list of search analyzers.

fieldname:str[Required]

The name of the search index.

fieldsearch_properties:dict[str,SearchIndexProperties][Required]

The search properties, grouped by type name.

fieldsupported_category:Literal['unspecified','both','both_entity_relationship','relationships','entities','meta_entity_provenance'][Required]

The supported category of the search index.

ser_model()dict[str,Any]

SearchIndexProperties

pydanticmodelarcgis.graph.search_types.SearchIndexProperties

List of properties for search index

Parameter

Description

property_names

Required List of Strings. Names of properties.

fromarcgis.graphimportSearchIndexPropertiesSearchIndexProperties(property_names=["name","comment"])
fieldproperty_names:list[str][Required]

The properties in the search index.

Response Types

ApplyEditsResponse

pydanticmodelarcgis.graph.response_types.ApplyEditsResponse

Response for applying edits toEntityorRelationship in the graph.

# Example of a response without errorsApplyEditsResponse(error=None,edits_result={'Person':EditResults(add_results=[EditResult(id=UUID('ab913bcb-1781-4137-9513-b3c942c23bc2'),error=None)],update_results=[],delete_results=[]),'Company':EditResults(add_results=[EditResult(id=UUID('26419c98-5521-4611-b2c2-196c35acc06d'),error=None)],update_results=[],delete_results=[]),'WorksAt':EditResults(add_results=[EditResult(id=UUID('1da2f6fc-e407-4561-97db-bba4745bd803'),error=None)],update_results=[],delete_results=[])},cascaded_deletes={},relationship_schema_changes={},cascaded_provenance_deletes=[])# Example of a response with errorsApplyEditsResponse(error=Error(error_code=111188,error_message="The destination identifier '{6F445050-0037-4308-8EE4-4B52C83763DC}' was not found."),edits_result={},cascaded_deletes={},relationship_schema_changes={},cascaded_provenance_deletes=[])
fieldcascaded_deletes:dict[str,list[CascadingRelationshipDelete]][Required]

The cascade deleted relationships, grouped by type name.

fieldcascaded_provenance_deletes:list[CascadingProvenanceDelete]=[]

The cascade deleted Provenance entities.

fieldedits_result:dict[str,EditResults][Required]

The edit results, grouped by type name.

fielderror:Error|None=None

The error, or None if the operation was successful.

fieldrelationship_schema_changes:dict[str,RelationshipTypeSchemaChanges][Required]

The relationship type schema changes, grouped by type name.

classConfig
alias_generator()str

Convert a snake_case string to camelCase.

Args:

snake: The string to convert.

Returns:

The converted camelCase string.

ser_model()dict[str,Any]

ConstraintRuleAddsResponse

pydanticmodelarcgis.graph.response_types.ConstraintRuleAddsResponse

Response for adding aRelationshipExclusionRule constraint rule.

# Example of successful add resultConstraintRuleAddsResponse(error=None,constraint_rule_add_results=[ConstraintRuleAddResult(name='PersonCanOnlyWorkAtCompany',error=None,warnings=[])])# Example of a response with errorsConstraintRuleAddsResponse(error=None,constraint_rule_add_results=[ConstraintRuleAddResult(name='PersonCanOnlyWorkAtCompany',error=Error(error_code=112237,error_message="Error adding the constraint rule, 'PersonCanOnlyWorkAtCompany', to the data model."),warnings=[])])
fieldconstraint_rule_add_results:list[ConstraintRuleAddResult][Required]

The list of results for the added constraint rules.

fielderror:Error|None=None

The error, or None if the operation was successful.

ser_model()dict[str,Any]

ConstraintRuleDeletesResponse

pydanticmodelarcgis.graph.response_types.ConstraintRuleDeletesResponse

Response for deleting aRelationshipExclusionRule.

# Example of a response without errorsConstraintRuleDeletesResponse(error=None,constraint_rule_delete_results=[ConstraintRuleDeleteResult(name='PersonCanOnlyWorkAtCompany',error=None)])# Example of a response with errorsConstraintRuleDeletesResponse(error=None,constraint_rule_delete_results=[ConstraintRuleDeleteResult(name='PersonCanOnlyWorkAtCompany2',error=Error(error_code=112242,error_message="The constraint rule 'PersonCanOnlyWorkAtCompany2' with role 'REGULAR' does not exist in the data model."))])
fieldconstraint_rule_delete_results:list[ConstraintRuleDeleteResult][Required]

The list of results from deleting the constraint rules.

fielderror:Error|None=None

The error, or None if the operation was successful.

ser_model()dict[str,Any]

ConstraintRuleUpdatesResponse

pydanticmodelarcgis.graph.response_types.ConstraintRuleUpdatesResponse

Response for updating aRelationshipExclusionRule.

# Example of a response without errorsConstraintRuleUpdatesResponse(error=None,constraint_rule_update_results=[ConstraintRuleUpdateResult(name='PersonCanOnlyWorkAtCompany',error=None,warnings=[])])# Example of a response with errorsConstraintRuleUpdatesResponse(error=None,constraint_rule_update_results=[ConstraintRuleUpdateResult(name='PersonCanOnlyWorkAtCompany',error=None,warnings=[Error(error_code=112225,error_message="A relationship with origin entity type 'Employee', relationship type 'WorksFor', and destination entity type 'Park' is explicitly allowed by relationship exclusion rule 'PersonCanOnlyWorkAtCompany', but not allowed by relationship exclusion rule 'PersonCanOnlyWorkAtCompany3'."),Error(error_code=112244,error_message='The following entity types do not exist in the data model: [Employee, Park].'),Error(error_code=112245,error_message='The following relationship types do not exist in the data model: [WorksFor].')])])
fieldconstraint_rule_update_results:list[ConstraintRuleUpdateResult][Required]

The list of results from updating the constraint rule.

fielderror:Error|None=None

The error, or None if the operation was successful.

ser_model()dict[str,Any]

IndexAddsResponse

pydanticmodelarcgis.graph.response_types.IndexAddsResponse

Response for adding aFieldIndex to aGraphProperty.

# Example of a successful responseIndexAddsResponse(error=None,index_add_results=[IndexAddResult(name='name_index',error=None)])# Example of a response with errorsIndexAddsResponse(error=None,index_add_results=[IndexAddResult(name='name_index',error=Error(error_code=112047,error_message="Graph Index, 'name_index', already exists."))])
fielderror:Error|None=None

The error, or None if the operation was successful.

fieldindex_add_results:list[IndexAddResult][Required]

The list of results for the added indexes.

classConfig
ser_model()dict[str,Any]

IndexDeletesResponse

pydanticmodelarcgis.graph.response_types.IndexDeletesResponse

Response for deleting aFieldIndex from aGraphProperty.

# Example of a successful responseIndexDeletesResponse(error=None,index_delete_results=[IndexDeleteResult(name='name_index',error=None)])# Example of a response with errorsIndexDeletesResponse(error=None,index_delete_results=[IndexDeleteResult(name='name_index',error=Error(error_code=112051,error_message="Graph Index, 'name_index', does not exist in the data model."))])
fielderror:Error|None=None

The error, or None if the operation was successful.

fieldindex_delete_results:list[IndexDeleteResult][Required]

The list of results for the deleted indexes.

classConfig
ser_model()dict[str,Any]

NamedObjectTypeAddsResponse

pydanticmodelarcgis.graph.response_types.NamedObjectTypeAddsResponse

Response for adding a named object type to the graph.

# Example of a successful responseNamedObjectTypeAddsResponse(error=None,entity_add_results=[NamedObjectTypeAddResult(name='Vehicle',error=None)],relationship_add_results=[NamedObjectTypeAddResult(name='Drives',error=None)])# Example of a response with errorsNamedObjectTypeAddsResponse(error=None,entity_add_results=[NamedObjectTypeAddResult(name='Vehicle',error=Error(error_code=112092,error_message="The entity or relationship type, 'Vehicle', already exists, please provide a new type name."))],relationship_add_results=[NamedObjectTypeAddResult(name='Drives',error=Error(error_code=112092,error_message="The entity or relationship type, 'Drives', already exists, please provide a new type name."))])
fieldentity_add_results:list[NamedObjectTypeAddResult][Required]

The list of results for added entity types.

fielderror:Error|None=None

The error, or None if the operation was successful.

fieldrelationship_add_results:list[NamedObjectTypeAddResult][Required]

The list of results for added relationship types.

classConfig
alias_generator()str

Convert a snake_case string to camelCase.

Args:

snake: The string to convert.

Returns:

The converted camelCase string.

ser_model()dict[str,Any]

NamedObjectTypeUpdateResponse

pydanticmodelarcgis.graph.response_types.NamedObjectTypeUpdateResponse

Response for updating a named object type in the graph.

# Example of a successful responseNamedObjectTypeUpdateResponse(error=None)# Example of a response with errorsNamedObjectTypeUpdateResponse(error=Error(error_code=112075,error_message='Updating the name of an entity or relationship type is not allowed.'))
fielderror:Error|None=None

The error, or None if the operation was successful.

ser_model()dict[str,Any]

NamedObjectTypeDeleteResponse

pydanticmodelarcgis.graph.response_types.NamedObjectTypeDeleteResponse

Response for deleting a named object type in the graph.

# Example of a successful responseNamedObjectTypeDeleteResponse(error=None)# Example of a response with errorsNamedObjectTypeDeleteResponse(error=Error(error_code=112020,error_message="The entity or relationship type definition, 'Vehicle', was not found."))
fielderror:Error|None=None

The error, or None if the operation was successful.

ser_model()dict[str,Any]

PropertyAddsResponse

pydanticmodelarcgis.graph.response_types.PropertyAddsResponse

Response for adding aGraphProperty to anEntityType orRelationshipType in the graph.

# Example of a successful responsePropertyAddsResponse(error=None,property_add_results=[PropertyAddResult(name='age',error=None)])# Example of a response with errorsPropertyAddsResponse(error=None,property_add_results=[PropertyAddResult(name='age',error=Error(error_code=112043,error_message="Graph property, 'age', already exists in data model."))])
fielderror:Error|None=None

The error, or None if the operation was successful.

fieldproperty_add_results:list[PropertyAddResult][Required]

The list of results for the added properties.

classConfig
alias_generator()str

Convert a snake_case string to camelCase.

Args:

snake: The string to convert.

Returns:

The converted camelCase string.

ser_model()dict[str,Any]

PropertyUpdateResponse

pydanticmodelarcgis.graph.response_types.PropertyUpdateResponse

Response for updating aGraphProperty in the graph.

# Example of a successful responsePropertyUpdateResponse(error=None)# Example of a response with errorsPropertyUpdateResponse(error=Error(error_code=112068,error_message="Graph property, 'current_age', does not exist in data model."))
fielderror:Error|None=None

The error, or None if the operation was successful.

ser_model()dict[str,Any]

PropertyDeleteResponse

pydanticmodelarcgis.graph.response_types.PropertyDeleteResponse

Response for deleting aGraphProperty in the graph.

# Example of a successful responsePropertyDeleteResponse(error=None)# Example of a response with errorsPropertyDeleteResponse(error=Error(error_code=112068,error_message="Graph property, 'age', does not exist in data model."))
fielderror:Error|None=None

The error, or None if the operation was successful.

ser_model()dict[str,Any]

SyncDataModelResponse

pydanticmodelarcgis.graph.response_types.SyncDataModelResponse

Response for syncing theGraphDataModel usingsync_data_model().

# Example of a successful responseSyncDataModelResponse(error=None)# Example of a response with errorsSyncDataModelResponse(error=Error(error_code=113005,error_message="The service's graph data source does not support the operation."))
fielderror:Error|None=None

The error, or None if the operation was successful.

fieldnamed_type_sync_results:list[SyncDataModelResult]=[]

The list of results for each named type.

fieldwarnings:list[Error]=[]

The list of warnings returned for the operation.

ser_model()dict[str,Any]

UpdateSearchIndexResponse

pydanticmodelarcgis.graph.response_types.UpdateSearchIndexResponse

Response for updating aSearchIndex usingupdate_search_index().

# Example of a successful responseUpdateSearchIndexResponse(error=None)# Example of a response with errorsUpdateSearchIndexResponse(error=Error(error_code=112093,error_message="The entity or relationship type, 'NotAType', does not exist."))
fielderror:Error|None=None

The error, or None if the operation was successful.

ser_model()dict[str,Any]

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


[8]ページ先頭

©2009-2025 Movatter.jp