# Read Split Test

Reads an email newsletter split test: audience share, duration, winner criterion, start state and variants with their email IDs, subjects and editor URLs. Identify it by campaignId or one variant emailId, not both. A fresh test has one variant; needsMoreVariants indicates whether it can be sent. A non-split-test campaign is refused.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "campaignId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "ID of the split test campaign -- the newsletterId of get-newsletter; pass this or emailId, not both",
      "default": null,
      "minimum": 1
    },
    "emailId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Email ID of one variant, as splitTestVariants or an editor URL carries it; the answer is the whole test that variant belongs to. Either this or campaignId, never both",
      "default": null,
      "minimum": 1
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account the campaign belongs to; omit for the account the access token belongs to, or pass the user ID of a subaccount the token owner may act for",
      "default": null,
      "minimum": 1
    }
  },
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "newsletterId",
    "variants",
    "variantCount",
    "needsMoreVariants",
    "sharePerVariantPercent",
    "testSizePercent",
    "testDurationHours",
    "winnerBy",
    "hasStarted"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "newsletterId": {
      "type": "integer"
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "emailId",
          "label",
          "name",
          "subject",
          "editorUrl",
          "contentRevision"
        ],
        "properties": {
          "emailId": {
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "editorUrl": {
            "type": "string"
          },
          "contentRevision": {
            "type": "string"
          }
        }
      }
    },
    "variantCount": {
      "type": "integer"
    },
    "needsMoreVariants": {
      "type": "boolean"
    },
    "sharePerVariantPercent": {
      "type": "integer"
    },
    "testSizePercent": {
      "type": "integer"
    },
    "testDurationHours": {
      "type": "integer"
    },
    "winnerBy": {
      "type": [
        "string",
        "null"
      ]
    },
    "hasStarted": {
      "type": "boolean"
    }
  }
}
```

