[Developers] Blurb Upload Difficulties

James Taylor jame0taylor at gmail.com
Fri Nov 14 04:52:27 UTC 2008


Hello,

I've been having difficulties successfully uploading and linking text blurbs
to topics and I'm hoping someone can help out.  Specifically, I'm trying to
edit 'overview' text blurbs for a topic from using mql writes from my site.
It's my understanding that to do this I need to: 1) upload my text blurb to
freebase; 2) create a document topic to hold the blurb; 3) link the newly
created document topic to the original topic.  All of my mql's appear to be
working, but the new text does not show up indicating something failed.
I've placed an example of my mql read and writes for this below.  I'm able
to create and link topics, but the over text does not show up, which is
unexpected.

So, if I am updating the text on the topic:
http://www.sandbox.freebase.com/view/guid/9202a8c04000641f80000000098e3c0b

The response from my upload is:
mqlwrite response:
{
  "status":"200 OK",
  "code":"/api/status/ok",
  "result":{
    "/type/content/length":64,

"/type/content/blob_id":"1656ec44144062ec182ea7d6179446c0f194ecd4445d5e381ef518fab8283203",
    "/type/content/language":"/lang/en",
    "/type/content/text_encoding":"utf-8",
    "/type/content/media_type":"text/plain",
    "type":"/type/content",
    "id":"/guid/9202a8c04000641f8000000009a34b55"
  },

"transaction_id":"cache;cache01.sandbox.sjc1:8101;2008-11-14T04:34:01Z;0002"
}

My write and response from my document create is:
mqlwrite query:
{
    "q1": {
        "query": {
            "create":"unless_exists",
            "type":"/common/topic",
            "name":"/guid/9202a8c04000641f8000000009a34b55",
            "id":null,
            "article" : {
                "create":"unless_exists",
                "type":"/common/document",
                "id":null,
                "content":"/guid/9202a8c04000641f8000000009a34b55"
             }
         }
    }
}
mqlwrite response:
{
  "q1":{
    "code":"/api/status/ok",
    "result":{
      "article":{
        "content":"/guid/9202a8c04000641f8000000009a34b55",
        "create":"created",
        "type":"/common/document",
        "id":"/guid/9202a8c04000641f8000000009a34b60"
      },
      "create":"created",
      "type":"/common/topic",
      "name":"/guid/9202a8c04000641f8000000009a34b55",
      "id":"/guid/9202a8c04000641f8000000009a34b5c"
    }
  },
  "status":"200 OK",
  "code":"/api/status/ok",

"transaction_id":"cache;cache01.sandbox.sjc1:8101;2008-11-14T04:34:02Z;0004"
}

And my link to the original document is:
mqlwrite query:
{
       "q1": {
               "query": {
                       "id" : "/guid/9202a8c04000641f80000000098e3c0b",
                         "/common/topic/article" : {
                           "id" : "/guid/9202a8c04000641f8000000009a34b5c",
                           "connect" : "insert"
                         },
                         "type" : "/common/topic"
                 }
       }
}
mqlwrite response:
{
  "q1":{
    "code":"/api/status/ok",
    "result":{
      "type":"/common/topic",
      "id":"/guid/9202a8c04000641f80000000098e3c0b",
      "/common/topic/article":{
        "id":"/guid/9202a8c04000641f8000000009a34b5c",
        "connect":"inserted"
      }
    }
  },
  "status":"200 OK",
  "code":"/api/status/ok",

"transaction_id":"cache;cache01.sandbox.sjc1:8101;2008-11-14T04:34:02Z;0014"
}


Thanks,
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20081113/e4c8f99a/attachment.htm 


More information about the Developers mailing list