What about this?
(note the use of POST and the register/notices feed)

curl --silent --data-binary "@file.xml" --request POST --header
"Content-Type: application/atom+xml" --header "Authorization:
GoogleLogin auth=TOKEN" "https://www.google.com/h9/feeds/register/ui/
PROFILEID"

where file.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom";>
  <atom:title type="text">test</atom:title>
  <atom:content type="text">here</atom:content>
  <category term='CONDITION' />
    <title type='text'></title>
    <ContinuityOfCareRecord xmlns='urn:astm-org:CCR'>
      <Language />
      <DateTime>
        <Type />
      </DateTime>
      <Body>
        <Problems>
          <Problem>
            <DateTime>
              <Type>
                <Text>Start date</Text>
              </Type>
              <ExactDateTime>2008-12-04</ExactDateTime>
            </DateTime>
            <DateTime>
              <Type>
                <Text>Stop date</Text>
              </Type>
              <ExactDateTime>2008-12-04</ExactDateTime>
            </DateTime>
            <Type />
            <Description>
              <Text>Bowel Movements</Text>
            </Description>
            <Status>
              <Text>ACTIVE</Text>
            </Status>
          </Problem>
        </Problems>
      </Body>
    </ContinuityOfCareRecord>
</atom:entry>

Eric

On Jun 1, 1:04 pm, resplug <[email protected]> wrote:
> Hello;
>
> I am stepping through the API using curl on a new device that runs
> Linux.  Curl is an easy way to do that with the example Ryan put on
> the web:
>
> http://code.google.com/support/bin/answer.py?answer=78451#authenticat...
>
> After getting done with pulling down info and editing info, I now
> having
> trouble adding info using the recommendation using curl.  I keep
> getting
> an invalid URI error.  I suspect this is because of my improper XML
> for the LABTEST addition, which is where I am trying to add data.
>
> Here is the command and the XML info -- any suggestions?
>
> curl --silent --data "@new_bp_template.xml" --request PUT --header
> "Content-Type: application/atom+xml" --header "Authorization:
> GoogleLogin auth=ABCDEFG" "https://www.google.com/h9/feeds/profile/ui/
> 123456"
>
> I retrieved the URL from the only "post" link in the profile info I
> pulled
> down.  Assuming I am supposed to use that "post" link, Here is the
> XML,
> where I edited the CCR ID manually and just made one up.
> My name and email are correct on the real file, new_bp_template.xml
> (see
> reference above in curl command).
>
> <entry xmlns='http://www.w3.org/2005/Atom'xmlns:ccr='urn:astm-
> org:CCR' xmlns:batch='http://schemas.google.com/gdata/batch'
> xmlns:h9m='http://schemas.google.com/health/metadata'><category
> scheme='http://schemas.google.com/health/item'term='Blood 
> Pressure'/><category 
> scheme='http://schemas.google.com/g/2005#kind'term='http://
>
> schemas.google.com/health/kinds#profile'/><category term='LABTEST'/><title 
> type='text'></title><content type='html'></
>
> content><author><name>My Name</name><email>[email protected]</email></
> author><contributor><name>My Name</name><email>[email protected]</
> email></contributor><ContinuityOfCareRecord xmlns='urn:astm-
> org:CCR'><CCRDocumentObjectID>ZXoeIGinPYk</
> CCRDocumentObjectID><Language><Text>English</Text><Code><Value>en</
> Value><CodingSystem>ISO-639-1</CodingSystem></Code></
> Language><Version>V1.0</
> Version><DateTime><ExactDateTime>2009-06-01T18:03:47.093Z</
> ExactDateTime></DateTime><Patient><ActorID>Google Health Profile</
> ActorID></Patient><From><ActorLink><ActorID>Google Health</
> ActorID><ActorRole><Text>PHR</Text></ActorRole></ActorLink></
> From><Body><Results><Result><CCRDataObjectID>ZXoeIGinPYk-1</
> CCRDataObjectID><Source><Actor><ActorID>[email protected]</
> ActorID><ActorRole><Text>Patient</Text></ActorRole></
> Actor><Actor><ActorID>[email protected]</
> ActorID><ActorRole><Text>Patient</Text></ActorRole></Actor></
> Source><Test><CCRDataObjectID>ZXoeIGinPYk-0</
> CCRDataObjectID><DateTime><Type><Text>Collection start date</Text></
> Type><ExactDateTime>2009-05-31</ExactDateTime></
> DateTime><Description><Text>Blood Pressure</Text><Code><Value>36.1870</
> Value><CodingSystem>Google</CodingSystem></Code></
> Description><Source><Actor><ActorID>[email protected]</
> ActorID><ActorRole><Text>Patient</Text></ActorRole></Actor></
> Source><TestResult><Value>X/Y</Value><Units><Unit>mm/Hg</Unit></
> Units><ResultSequencePosition>0</ResultSequencePosition></TestResult></
> Test></Result></Results></Body><Actors><Actor><ActorObjectID>Google
> Health Profile</
> ActorObjectID><Source><Actor><ActorID>[email protected]</
> ActorID><ActorRole><Text>Patient</Text></ActorRole></
> Actor><Actor><ActorID>[email protected]</
> ActorID><ActorRole><Text>Patient</Text></ActorRole></
> Actor><Actor><ActorID>[email protected]</
> ActorID><ActorRole><Text>Patient</Text></ActorRole></Actor></Source></
> Actor></Actors></ContinuityOfCareRecord><ProfileMetaData xmlns='http://
> schemas.google.com/health/metadata'><UserComment type='text'
> src='IRI'>Measurement: 3</UserComment></ProfileMetaData></entry>
>
> thank you!
> Scott
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Health Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/googlehealthdevelopers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to