Creates a new Survey object required to authenticate end users

Request Parameters

Name Type Description Required?
DataSurvey[]UnavailableRequired
ProjectIdSystem.Int32UnavailableRequired
ProjectIdSystem.Int32UnavailableRequired

Validation

Name Type Description Required?
ProjectIdSystem.Int32IdRequired

Endpoints

Sample Request
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.phoenixplatform.net" xmlns:tig="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:tig1="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services.Filters">
    <soapenv:Header>
      <PhoenixHeader xmlns="http://api.phoenixplatform.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <AccessToken>[YOUR ACCESS TOKEN]</AccessToken>
         <Phoenix-ProjectId>1</Phoenix-ProjectId>
      </PhoenixHeader>
   </soapenv:Header>
   <soapenv:Body>
      <api1:CreateSurvey xmlns:api1="http://api.phoenixplatform.com">
         <api1:request>
             <tig:Id>1</tig:Id>
             <tig:ProjectId>1</tig:ProjectId>
             <tig:InitialScreenId>1</tig:InitialScreenId>
             <tig:Title>TestValue[13f90449faf44326a3f20b0b0d4cc95e]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[912945f86f374455bfa61d0a9c1e3393]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[c320ff576ecb4b5abd34dd054cedce36]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[d7e89bff0ac24590ae923f452c23e2ea]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[f2ba4ebf117247ab9ba9c9bd855883e5]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[879db451ba704e30a3612e7ab880044a]</tig:ProgressLabel>
             <tig:Uuid>TestValue[0ee200e8636d47abb35a6f7bc4892929]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[8ba0dcd6a8f44f25aa4b8617190fe714]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[c4df6921045342da8b6760b7597a49be]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[685d71926d2e4f5aa4e9e4c8cba58015]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[90e962afc7f54188bf6265324c3eb2f6]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[3cec75048b4a4fcb9fe432fd4fd8413f]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[a54fea33eba640039451254dddd3a4e7]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[278eed469c9841d1b50523c92f555d89]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[e2c82b18ffa644a99fb3d55f9059e0e5]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[ce8df3144e484d038329b337d4ab5e64]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[a78eb3282ed247eb8b73c1a89f41cd0c]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[89d84963cb5a442a843c518a382e5743]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[363fc8fa3b5c4778a004b0db34dd79f1]</tig:ReportStatusFilter>
             <tig:ModifyDate>2018-12-16T11:50:53.1477833+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[eac904940c2941a2b295ce07861b4086]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Demo</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[508d00b80b854d1ebdd69b7c5e7b80b1]</tig:ClosedText>
             <tig:BadLinkText>TestValue[dcc07c1203f148a4be24981156fbf886]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[2262a9c17aa042deb6c1abd4ac224d58]</tig:CustomFont>
             <tig:CustomCss>TestValue[97357de04a0645a781dd42bc5669bbe1]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[67cb8e1a29224b0c84f21453e87ef258]</tig:NotificationAddresses>
             <tig:MessageId>1</tig:MessageId>
             <tig:MetaDataParameters>new List<KeyValuePair<string, string>>().ToArray()</tig:MetaDataParameters>
         </api1:request>
      </api1:CreateSurvey>
   </soapenv:Body>
</soapenv:Envelope>
Sample Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header>
      <ActivityId CorrelationId="d088e8c6-bf1e-4a9d-9e96-3f5faf232af5" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">17abb643-6b2f-4485-b4ff-0afc30697b7d</ActivityId>
   </s:Header>
   <s:Body>
      <SurveyResponse xmlns="http://api.phoenixplatform.com">
         <SurveyResult xmlns:a="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Syndicate.Services.Contracts.Article" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <b:Data xmlns="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services" xmlns:b="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Survey.Model">
              <b:Survey>
                <b:CreateDate>2018-12-16T11:50:53.1487815Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2018-12-16T11:50:53.1487815Z</b:ModifyDate>
                <b:ProjectId>0</b:ProjectId>
                <b:ReportIndividuals>0</b:ReportIndividuals>
                <b:Score>0</b:Score>
                <b:SurveyUrls />
  </b:Survey>
</b:Data>
            <TotalRecords xmlns="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services">1</TotalRecords>
         </SurveyResult>
      </SurveyResponse>
   </s:Body>
</s:Envelope>
Resource URL

Sample Request

POST /projects/{projectId}/surveys? HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json; charset=utf-8
Authorization: Bearer [YOUR SUPER SECURE TOKEN]
Content-Length: 4312
Host: [CallHost]
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)-
 
[{
 "Id" : 1,
 "ProjectId" : 1,
 "InitialScreenId" : 1,
 "Title" : "TestValue[25aad7d20c464312a64657563f50e4f2]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[d550abe791b94e69bc2d9bae47a6d594]",
 "UIColorsSecondary" : "TestValue[7de15cd6a8974bc3b8ca8bb55b6bfebb]",
 "UIColorsBackground" : "TestValue[2532f653769d49caa309e8d4dc821e1d]",
 "ImageDir" : "TestValue[7568ebb7d0354ede8e8050c3e187571b]",
 "ProgressLabel" : "TestValue[5eb8435661e14a228d97807148dca6c1]",
 "Uuid" : "TestValue[1d6d3ba0f9a1441a8847a06ce979353e]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[9c681b399f96455e9735f6ab914ac0af]",
 "LaunchScreenTextMobile" : "TestValue[7862c991267a4575a14326c450b3da6d]",
 "LaunchScreenTextColor" : "TestValue[4ad2e98212f64149aac34457c1c229f0]",
 "LaunchScreenButtonText" : "TestValue[7ec0bc1cffda47e2a36d673adf810dd0]",
 "LaunchScreenBgFilename" : "TestValue[cf234ad5f1d64793bccfd1dfce4a8193]",
 "FinalScreenTextSuccess" : "TestValue[1f981f86ca2d42428adbc49b18b93936]",
 "FinalScreenTextError" : "TestValue[4a12eaa3afad4769aea96d7f07a46887]",
 "FinalScreenTextColor" : "TestValue[ecba34d354ce4303b96d91a41d1adc77]",
 "FinalScreenBgFilename" : "TestValue[01f9490492844f299eca9186539a87d0]",
 "EditUuid" : "TestValue[4dc1e4904b0c406dad781ed60dfa5a56]",
 "DisplayUrlParam" : "TestValue[0e04238a180842af8e7b1728581c4b65]",
 "ReportStatusFilter" : "TestValue[ac3c59de47a4440392dc2a47942894fb]",
 "ModifyDate" : "2018-12-16T11:50:53.1477833+00:00",
 "NameUrlField" : "TestValue[5ec1b1becacc4b2a9e39e248d62bd755]",
 "IsActive" : true,
 "StatusTypeId" : "Open",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[f03dd079d90e4cd6aad95adf5f0b3fbe]",
 "BadLinkText" : "TestValue[726606bb8e014e35b4b59f39885b12d5]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[7f7fd2e05b7242a689b5a165458448ba]",
 "CustomCss" : "TestValue[e3f553f8c79f4bcf86b6d83e6a7257f8]",
 "NotificationAddresses" : "TestValue[520beecb3e5149e18ac4939178c05ec5]",
 "MessageId" : 1,
 "MetaDataParameters" : new List<KeyValuePair<string, string>>().ToArray()
}] 
Sample Response
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 200
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,PUT,POST,DELETE,OPTIONS
Access-Control-Allow-Headers: Content-Type

[{
  "ProjectId": 0,
  "ReportIndividuals": 0,
  "Score": 0,
  "CreateDate": "2018-12-16T16:26:35.7783794Z",
  "ModifyDate": "2018-12-16T16:26:35.7783794Z",
  "IsActive": false,
  "Media": [],
  "SurveyUrls": []
}]

Nuget

PM> Install-Package PhoenixServiceHelper

PhoenixServiceHelper Sample

using System;
using System.Collections.Generic;

using Tigerspike.Phoenix.Services.Api.ServiceConfiguration;
using Tigerspike.Phoenix.Services.Api.ServiceRequest;
using PhoenixService = Tigerspike.PhoenixSurvey.V1;
using Tigerspike.Phoenix.Services.Api;

var request = new SoapServiceRequest() { Token = "[YOUR SUPER SECURE TOKEN]", ProjectId = 1 };
var configuration = CustomConfigurationFactory.CreateServiceConfiguration(Assembly.GetExecutingAssembly());

var proxy = new PhoenixServiceHelper<PhoenixService.IPhoenixSurveyService>(configuration);
var response = proxy.Execute(request, o => o.CreateSurvey(new PhoenixService.CreateSurveyRequest() 
{ 
    Data = new[] 
    { 
        new PhoenixService.Survey() 
        {
          Id = 1,
          ProjectId = 1,
          InitialScreenId = 1,
          Title = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          RecipientCount = 1,
          ReportIndividuals = 1,
          Score = 1,
          UIColorsPrimary = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          UIColorsSecondary = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          UIColorsBackground = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ImageDir = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ProgressLabel = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          Uuid = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          LaunchScreenShow = true,
          LaunchScreenTextDesktop = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          LaunchScreenTextMobile = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          LaunchScreenTextColor = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          LaunchScreenButtonText = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          LaunchScreenBgFilename = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          FinalScreenTextSuccess = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          FinalScreenTextError = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          FinalScreenTextColor = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          FinalScreenBgFilename = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          EditUuid = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          DisplayUrlParam = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ReportStatusFilter = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ModifyDate = DateTime.UtcNow,
          NameUrlField = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          IsActive = true,
          StatusTypeId = PhoenixService.StatusTypeEnum.Demo,
          HasNamedRecipients = true,
          ClosedText = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          BadLinkText = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ReportIndividualNames = true,
          CustomFont = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          CustomCss = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          NotificationAddresses = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          MessageId = 1,
          MetaDataParameters = new List<KeyValuePair<string, string>>().ToArray()
        }
    } 
}));