[Developers] Adding a webpage to a topic.

Arthur van Hoff AVH at zing.net
Thu Jun 12 16:20:20 UTC 2008


I'm having some trouble adding a web page to a topic using a script, but
it fails because multiple instances of the webpage exist with the same
uri. I want to add http://www.nytimes.com to a topic, but unfortunately
two instances with that uri exist. A third instance with a trailing
slash also exists but it is ignored in this case.

 

How should I handle this case? I really don't care which instance is
linked to since presumably the two instances will eventually be merged
(although I am not sure if that is possible in the current UI).

 

Write query on sandbox:

 

{

    "id": "/guid/9202a8c04000641f8000000006c2cbbd",

    "type": "/common/topic",

    "webpage": [{

        "type": "/common/webpage",

        "uri": "http://www.nytimes.com",

        "connect": "insert",

        "create": "unless_exists"

    }]

}

 

Resulting error:

 

{

  "status": "200 OK", 

  "code": "/api/status/error", 

  "messages": [

    {

      "info": {

        "count": 2, 

        "guids": [

          "#9202a8c04000641f80000000048e4d06", 

          "#9202a8c04000641f80000000080cc9df"

        ]

      }, 

      "query": {

        "webpage": [

          {

            "create": "unless_exists", 

            "type": "/common/webpage", 

            "uri": "http://www.nytimes.com", 

            "error_inside": ".", 

            "connect": "insert"

          }

        ], 

        "type": "/common/topic", 

        "id": "/guid/9202a8c04000641f8000000006c2cbbd"

      }, 

      "message": "Need a unique result to attach here, not 2", 

      "code": "/api/status/error/mql/result", 

      "path": "webpage"

    }

  ]

}

 

___________________________________________

Arthur van Hoff, Dell-ZING, CTO Software and Services.

W: 650-267-2413, F: 650-267-2498, M: 650-283-0842

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20080612/8ec1dc4a/attachment-0001.htm 


More information about the Developers mailing list