Create a relationship

post

/crmRestApi/resources/11.13.18.05/objectMetadata/{ObjectCode}/child/relationships

Request

Path Parameters
  • The value of this parameter could be a hash of the key that is used to uniquely identify the resource item. The client should not generate the hash key value. Instead, the client should query on the collection resource with a filter to navigate to a specific resource item. For example: products?q=InventoryItemId=
Header Parameters
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
  • Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : Attribute Properties
Type: array
Title: Attribute Properties
The attribute properties resource is used to view, create, update, and delete attribute properties. It represents custom attribute properties.
Show Source
Nested Schema : objectMetadata-relationships-relationshipProperties-item-post-request
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Body ()
Root Schema : objectMetadata-relationships-item-response
Type: object
Show Source
  • Title: Created By
    Read Only: true
    Maximum Length: 64
    The user who created the relationship of the child object metadata record.
  • Title: Creation Date
    Read Only: true
    The date when the relationship of the child object metadata record was created.
  • Title: Intersection Object Code
    Maximum Length: 128
    The language independent code of the intersection object, which uniquely identifies the object.
  • Title: Intersection Object
    Read Only: true
    Maximum Length: 255
    The display name of the intersection object.
  • Title: Intersection Source Attribute
    Maximum Length: 128
    The attribute of the intersection object which is associated with the relationship between source object and intersection object.
  • Title: Intersection Source View Link Accessor Name
    Maximum Length: 300
    The name of the View Link Accessor, which is between source object and intersection object.
  • Title: Intersection Target Attribute
    Maximum Length: 100
    The attribute of the intersection object which is associated with the relationship between intersection object and target object.
  • Title: Intersection Target View Link Accessor Name
    Maximum Length: 300
    The name of the View Link Accessor, which is between intersection object and target object.
  • Title: Custom Relation
    Maximum Length: 1
    Default Value: false
    Indicates whether the relationship is custom.
  • Title: Last Update Date
    Read Only: true
    The date when the child object metadata relationships record was last updated.
  • Title: Last Updated By
    Read Only: true
    Maximum Length: 64
    The user who last updated the child object metadata relationships record.
  • Links
  • Title: Source Object Code
    Maximum Length: 128
    The language independent code of the source object of the relation.
  • Title: Relation Name
    Maximum Length: 500
    The language independent code of the relation which uniquely identifies the relation.
  • Title: Relationship Cardinality
    Maximum Length: 30
    The cardinality of the relationship, such as OneToOne or ManyToMany.
  • Title: Relationship Display Name
    Maximum Length: 100
    The display name of the relationship.
  • Attribute Properties
    Title: Attribute Properties
    The attribute properties resource is used to view, create, update, and delete attribute properties. It represents custom attribute properties.
  • Title: Relationship Type
    Maximum Length: 100
    The type of the relationship.
  • Title: Source Object Attributes
    Read Only: true
    The attributes of the source object which is associated with the relationship.
  • Title: Source Object
    Read Only: true
    Maximum Length: 255
    The display name of the source object.
  • Title: Source Object View Link Accessor Name
    Maximum Length: 300
    The View Link Accessor name of the source object.
  • Title: Target Object Attributes
    Read Only: true
    The attributes of the target object which is associated with the relationship.
  • Title: Target Object Code
    Maximum Length: 128
    The language independent code of the target object, which uniquely identifies the object.
  • Title: Target Object
    Read Only: true
    Maximum Length: 255
    The display name of the target object.
  • Title: Target Object View Link Accessor Name
    Maximum Length: 300
    The View Link Accessor name of the child object metadata source object.
  • Title: View Link Definition
    Maximum Length: 600
    The fully qualified name of the view link related to relationship.
Nested Schema : Attribute Properties
Type: array
Title: Attribute Properties
The attribute properties resource is used to view, create, update, and delete attribute properties. It represents custom attribute properties.
Show Source
Nested Schema : objectMetadata-relationships-relationshipProperties-item-response
Type: object
Show Source
Back to Top