Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

exchangeInstance  -- the EIExchangeInstance JSON of the primary resource and secondary resources to be created/updated (no instance URI indicates that the resource should be created). Note that for updates, the API user must have claim permission over the resources (current user is hardcoded in the backend)

pretty -- true | false, return prettified JSON (useful for debugging)

Result:

InstanceUpdateResponse in JSON, indicating successes and failures

...

No Format
cat json.txt | curl -v -u eagle-i-user:password -F 'exchangeInstance=@-;type=application/json'  https://montana.dev.eagle-i.net/sweet/api/externalResource


ei-x examples

...

Sample New instance:

Code Block

{
   "source":"OfficialSourceString",
   "foreignKey":"OfficialForeignKey123",
   "linkedResources":{
      "http://purl.obolibrary.org/obo/ERO_0000022":[
         {
            "source":"OfficialSourceString",
            "foreignKey":"OfficialForeignKey456",
            "linkedResources":{

            },
            "instanceEntity":{
               "uri":{
                  ""
               },
               "label":"Frog, Kermit, Ph.D."
            },
            "specificTypeUri":{
               "id":"http://xmlns.com/foaf/0.1/Person"
            },
            "textProperties":{
               "http://purl.obolibrary.org/obo/ERO_0000052":[
                  "Professor",
                  "Specialist in CRCH"
               ],
               "http://purl.obolibrary.org/obo/ERO_0000042":[
                  "Kermit"
               ],
               "http://purl.obolibrary.org/obo/ERO_0000041":[
                  "kermit@hawaii.edu"
               ],
               "http://purl.obolibrary.org/obo/ERO_0000051":[
                  "(123) 456-3008"
               ],
               "http://purl.obolibrary.org/obo/ERO_0000049":[
                  "Frog"
               ],
               "http://purl.obolibrary.org/obo/ERO_0000040":[
                  "Cancer Research Center\n12345 Lauhala St.\nR504c\nHonolulu, HI 96813"
               ]
            },
            "rootType":{
               "id":"http://xmlns.com/foaf/0.1/Person"
            }
         }
      ],

      "http://purl.obolibrary.org/obo/ERO_0000066":[
         {
            "source":"OfficialSourceString",
            "foreignKey":"OfficialForeignKey789",
            "linkedResources":{

            },
            "instanceEntity":{
               "uri":{
                  "id":""
               },
               "label":"University of Hawaii at Manoa Organized Research Units"
            },
            "specificTypeUri":{
               "id":"http://vivoweb.org/ontology/core#Consortium"
            },
            "textProperties":{

            },
            "rootType":{
               "id":"http://xmlns.com/foaf/0.1/Organization"
            }
         },
         {
            "source":"OfficialSourceString",
            "foreignKey":"OfficialForeignKey101112",
            "linkedResources":{

            },
            "instanceEntity":{
               "uri":{
                  "id":""
               },
               "label":"University of Hawai'i Cancer Center"
            },
            "specificTypeUri":{
               "id":"http://vivoweb.org/ontology/core#Center"
            },
            "textProperties":{
               "http://purl.obolibrary.org/obo/ERO_0000480":[
                  "http://www.kermitcancercenter.org/"
               ],
               "http://purl.obolibrary.org/obo/ERO_0000051":[
                  "678-910-1112"
               ],
               "http://eagle-i.org/ont/app/1.0/synonym":[
                  "KCC"
               ],
               "http://purl.obolibrary.org/obo/ERO_0000040":[
                  "123 Ala Moana Blvd.\nHonolulu, Hawai‘i 96813"
               ]
            },
            "rootType":{
               "id":"http://xmlns.com/foaf/0.1/Organization"
            }
         }
      ],

   "instanceEntity":{
      "uri":{
         "id":""
      },
      "label":"Kermit Analytical Laboratory"
   },
   "specificTypeUri":{
      "id":"http://vivoweb.org/ontology/core#CoreLaboratory"
   },
   "textProperties":{
      "http://purl.obolibrary.org/obo/ERO_0000055":[
         "Kermit Cancer Research Center, 1234 Lauhala St. R504c, Honolulu, HI 96813"
      ],
      "http://eagle-i.org/ont/app/1.0/resource_description":[
         "\"Awesome facility.\""
      ],
      "http://purl.obolibrary.org/obo/ERO_0000054":[
         "Excel"
      ],
      "http://purl.obolibrary.org/obo/ERO_0000041":[
         "kermit@hawaii.edu"
      ],
      "http://purl.obolibrary.org/obo/ERO_0000480":[
         "http://www.kermit.org/"
      ],
      "http://eagle-i.org/ont/app/1.0/synonym":[
         "Small molecule analysis lab"
      ],
      "http://purl.obolibrary.org/obo/ERO_0000040":[
         "Kermit Cancer Research Center, 1236 Lauhala St. R504c, Honolulu, HI 96813"
      ]
   },
   "rootType":{
      "id":"http://xmlns.com/foaf/0.1/Organization"
   }
}