Get Survey Info

From ePrize Developers Wiki

(Difference between revisions)
Jump to: navigation, search

Todd-chapman (Talk | contribs)
(New page: $ curl -i -X GET -H "Accept: text/xml" \ http://127.0.0.1:10001/v1/apps/survey/survey/s14 HTTP 200 (OK) Cache-Control: public Connection: close Date: Wed, 01 Jan 2014 05:00:00 G...)
Next diff →

Current revision

$ curl -i -X GET -H "Accept: text/xml" \
  http://127.0.0.1:10001/v1/apps/survey/survey/s14 

HTTP 200 (OK)
Cache-Control: public
Connection: close
Date: Wed, 01 Jan 2014 05:00:00 GMT
Server: POE HTTPD Component/0.09 (5.008009)
Content-Length: 2188
Content-Type: text/xml; charset=utf-8
Expires: Tue, 21 Sep 2010 18:28:43 GMT

<?xml version="1.0" encoding="UTF-8" ?>
<result>
  <survey>
    <name>4 questions, 1 optional, 1 text</name>
    <id>s14</id>
    <moniker>simple_survey</moniker>
    <questions>
      <name>q1</name>
      <answers>
        <name>a1</name>
        <answer>This is q1a1</answer>
        <id>a1</id>
        <sort>1</sort>
      </answers>
      <answers>
        <name>a2</name>
        <answer>This is q1a2</answer>
        <id>a2</id>
        <sort>2</sort>
      </answers>
      <id>q1</id>
      <question>This is the first question.</question>
      <sort>1</sort>
      <type>radio</type>
    </questions>
    <questions>
      <name>q2</name>
      <answers>
        <name>a1</name>
        <answer>This is the text of the first answer for the second question.</answer>
        <id>a1</id>
        <sort>1</sort>
      </answers>
      <answers>
        <name>a2</name>
        <answer>Second answer for second question</answer>
        <id>a2</id>
        <sort>2</sort>
      </answers>
      <answers>
        <name>a3</name>
        <answer>3rd answer, 2nd question</answer>
        <id>a3</id>
        <sort>3</sort>
      </answers>
      <id>q2</id>
      <optional>1</optional>
      <question>This is the second question?</question>
      <sort>2</sort>
      <type>checkbox</type>
    </questions>
    <questions>
      <name>q3</name>
      <answers>
        <name>a1</name>
        <answer>First answer</answer>
        <id>a1</id>
        <sort>1</sort>
      </answers>
      <answers>
        <name>a2</name>
        <answer>Second answer</answer>
        <id>a2</id>
        <sort>2</sort>
      </answers>
      <answers>
        <name>a3</name>
        <answer>Thirs answer</answer>
        <id>a3</id>
        <sort>3</sort>
      </answers>
      <id>q3</id>
      <question>Did you know this is the third question?</question>
      <sort>3</sort>
      <type>dropdown</type>
    </questions>
    <questions>
      <name>q4</name>
      <answers></answers>
      <id>q4</id>
      <question>This is a text question. Tell us more about yourself.</question>
      <sort>4</sort>
      <type>text</type>
    </questions>
    <sort>1</sort>
  </survey>
</result>
Personal tools