Hello team, i'm trying to ingest Groups via curl, ...
# ingestion
n
Hello team, i'm trying to ingest Groups via curl, but i'm facing an error... Can anybody help me? šŸ˜ž • Ingestion user works fine in the same condition • When i try the code below, it says "`No root resource defined for path '/corpGroups'`"
Copy code
curl '<http://localhost:8080/corpGroups?action=ingest>' -X POST -H 'X-RestLi-Protocol-Version:2.0.0' --data '{
"snapshot": {
	"aspects": [
		{
			"com.linkedin.identity.CorpGroupInfo":{
					"email": "", 
					"admins": ["urn:li:corpUser:test_user1"], 
					"members": ["urn:li:corpUser:test_user1", "urn:li:corpUser:test_user2"], "groups": []}}], "urn": "urn:li:corpGroup:dev"}}'
when i changed to
/corpGroups?action=ingest
to
/entities?action=ingest
, it says
"Cannot parse request entity"
āœ”ļø 1
this is the code to ingest user, which works fine
Copy code
curl '<http://localhost:8080/entities?action=ingest>' -X POST --data '{
   "entity":{
      "value":{
         "com.linkedin.metadata.snapshot.CorpUserSnapshot":{
            "aspects":[
               {
                  "com.linkedin.identity.CorpUserInfo":{
                     "active":true,
                     "displayName":"Admin",
                     "fullName":"Admin",
                     "email":"None"
                  }
               }
            ],
            "urn":"urn:li:corpuser:admin"
         }
      }
   }
}'
v
Your url is wrong. It is `
Copy code
<http://localhost:8080/entities?action=ingest>
not
Copy code
<http://localhost:8080/corpGroups?action=ingest>
n
I already tried entities.. šŸ™‚ However, i found the reason. For anyone who's trying later.. 1) url endpoint should be entities, 2) corpUser (x) -> corpuser (O) 3) aspect architecture should be like this.
Copy code
curl '<http://localhost:8080/entities?action=ingest>' -X POST --data '{           "entity":{
      "value":{
         "com.linkedin.metadata.snapshot.CorpGroupSnapshot":{
            "aspects":[
               {
                  "com.linkedin.identity.CorpGroupInfo":{
                        "groups": [],
                        "description": "description via curl",
                        "admins": [],
                         "displayName": "groupviaCurl",
                         "members": []
                  }
               }
            ],
            "urn":"urn:li:corpGroup:groupviacurl"
         }
      }
   }
}'
šŸ‘ 1
b
@nice-planet-17111! Thanks for following up. Glad you were able to get this working
ā¤ļø 1