Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

What is a valid AtlasRelationshipDef?

What is a valid AtlasRelationshipDef?

Rising Star

Attempting to create a relationship between 2 entities in atlas via

```bash

[hph_etl@HW03 atlas]$ curl -vv -u admin:admin -X POST --header 'Content-Type: application/json;charset=UTF-8' --header 'Accept: application/json' -d '{ \
    "end1": {\
        "guid": "2ddcda5b-2489-4636-a9ab-12b199c02422"\
     }, \
     "end2": {\
         "guid": "a33f45de-13d0-4a30-9df7-b0e02eb0dfd5"\
      }, \
      "typeName": "AtlasRelationshipDef" \
}' 'http://HW03.co.local:21000/api/atlas/v2/relationship'

```

and seeing the expected error...

```bash

* About to connect() to HW03.co.local port 21000 (#0)
*   Trying 172.18.4.48...
* Connected to HW03.co.local (172.18.4.48) port 21000 (#0)
* Server auth using Basic with user 'admin'
> POST /api/atlas/v2/relationship HTTP/1.1
> Authorization: Basic xxxxxx=
....
< Server: Jetty(9.3.14.v20161028)
<
* Connection #0 to host HW03.co.local left intact
{"errorCode":"ATLAS-400-00-028","errorMessage":"invalid value: unknown relationship type'AtlasRelationshipDef'"}

```

From other dicussions, I know the typeName needs to be a AtlasRelationshipDef, but not sure what that means / looks like. Looking at the docs, not really clear on what exactly I can enter as a valid AtlasRelationshipDef. The logic almost seems circular wherein I need to reference an existing AtlasRelationship 'object' to create an atlas relationship.


I highly suspect I'm am misinterpreting something here, but not sure how to proceed. Can anyone let me know what a valid AtlasRelationshipDef is or any docs on where I can get more clarity on what exactly I need to be entering as one in the relationship contruction API request I'm trying to do?

Don't have an account?
Coming from Hortonworks? Activate your account here