Back to Customer API documentation

 

Customer REST API Method: pages/create

 

Creates a new web page test in your account.

This will create a new web page test, there are a few steps to the process of creating a test and displaying it to the end user:

  1. Create the new test with the URL to the page you're testing, along with the browsers you wish to test it on. 
  2. Record the new test's ID. (Contained in response to previous POST)
  3. Poll Litmus on the test's progress. 
  4. Once the test is complete, record the URLs to the result screenshots, and present these to your user.

 

 

URL:

https://#{company}.litmus.com/pages.xml

 

HTTP Method(s):

POST

 

Curl example: 

curl -i -X POST -u user:password -H 'Accept: application/xml' -H 'Content-Type: application/xml' https://#{company}.litmus.com/pages.xml -d @data.xml

 

Parameters:

 

Request

          XML example

 

<?xml version="1.0" encoding="UTF-8"?>
<test_set>
  <applications type="array">
    <application>
      <code>saf2</code>
    </application>
    <application>
      <code>ie7</code>
    </application>
    <application>
      <code>ie6</code>
    </application>
  </applications>
  <url>http://google.com</url>
  <save_defaults>false</save_defaults>
  <use_defaults>false</use_defaults>
</test_set>


Response

       XML example (truncated): 

 

<?xml version="1.0" encoding="UTF-8"?>
<test_set>
  <created_at type="datetime">2009-10-05T10:32:30Z</created_at>
  <id type="integer">76424</id>
  <updated_at type="datetime">2009-10-05T10:32:31Z</updated_at>
  <name>Google</name>
  <service>page</service>
  <state>processing</state>
  <public_sharing>false</public_sharing>
  <test_set_versions type="array">
    <test_set_version>
      <version type="integer">1</version>
      <url_or_guid>http://google.com</url_or_guid>
      <received>true</received>
      <results type="array">
        <result>
          <check_state nil="true"></check_state>
          <error_at type="datetime" nil="true"></error_at>
          <finished_at type="datetime" nil="true"></finished_at>
          <id type="integer">1284884</id>
          <started_at type="datetime" nil="true"></started_at>
          <test_code>saf2</test_code>
          <state>pending</state>
          <result_type>page</result_type>
          <testing_application>
            <average_time_to_process type="integer">162</average_time_to_process>
            <result_type>page</result_type>
            <popular>false</popular>
            <status>0</status>
            <platform_name>Mac OS</platform_name>
            <platform_long_name>Mac OS X</platform_long_name>
            <application_code>saf2</application_code>
            <application_long_name>Safari 2.0 OSX</application_long_name>
          </testing_application>
          <result_images type="array">
            <result_image>
              <image_type>window</image_type>
            </result_image>
            <result_image>
              <image_type>full</image_type>
            </result_image>
          </result_images>
        </result>
        ...
      </results>
    </test_set_version>
  </test_set_versions>
</test_set>