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[78839d307e7840fb98fca4f8d2240e0b]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[b880e44f0f404272a46dd3d002b0def3]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[319c41c93e1344aaa98d5ed6bb08699b]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[2acf3bcb6a604455829271ca855d23d0]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[de84b49c9f444af9b9e76944e7488f15]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[645ff39006004efc84c0f1f724a6989a]</tig:ProgressLabel>
             <tig:Uuid>TestValue[742f5a22b2d4415289bef0b94408e504]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[20f252e1adf74ac7b37223f2e156809b]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[1795061c104e4b7793ab1445ae017e1e]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[4fb8dedad3b54f6ab8ebbbae5b081892]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[f4be692b5da34c249048598d1a6f7d47]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[d90a765558ff4b3ba6ff2649fb06661e]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[b7c920c8eaeb4b62b9eac205484b3071]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[dd09991bdfe94b44a6bb00196a51cc1f]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[99454b4865374f2aacd75dcdc7bd8ca9]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[5f20b1f236da4b4db1fd73b352de91f3]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[c4d1b121913d4d3888b49ac5f37a26ed]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[70d209d757d64628a5107e7d12c70036]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[c737ee98116543cea5809dcd30f5559c]</tig:ReportStatusFilter>
             <tig:ModifyDate>2019-11-14T16:00:11.0935821+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[c71d726fdd314c8f9a948c5be3fe6612]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Testing</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[b071dcd1c9734bf8aef0e9e7e63a45db]</tig:ClosedText>
             <tig:BadLinkText>TestValue[834eb9bada5c4e1aaeb7b218a3630106]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[4efa3d33ee7c4ea58a6a26f4f1c491d7]</tig:CustomFont>
             <tig:CustomCss>TestValue[322c7c9dec0b4b9ba80ec037bd6639b0]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[df66da5cfa9c4d80877e5f0193127cb1]</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>2019-11-14T16:00:11.0945227Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2019-11-14T16:00:11.0945227Z</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: 4318
Host: [CallHost]
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)-
 
[{
 "Id" : 1,
 "ProjectId" : 1,
 "InitialScreenId" : 1,
 "Title" : "TestValue[70edd11e918e4e49ba29c471018041e5]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[198ca0ac20dd43d88b4e8bcdf66f4999]",
 "UIColorsSecondary" : "TestValue[fc1beecdee9f4b6b85c214c6371697b5]",
 "UIColorsBackground" : "TestValue[617dd82505244a98888b9e0386d4d62e]",
 "ImageDir" : "TestValue[35112cebc65349db9b2046faae5c2e8f]",
 "ProgressLabel" : "TestValue[32e2f25b2ff44578ad01d55098a305cd]",
 "Uuid" : "TestValue[53d682df47ca4f5fb0be60bd6fe958f1]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[81dd5fd5a6ca48149ea5eb20a1001e50]",
 "LaunchScreenTextMobile" : "TestValue[0ea7a38c87684c199b9b4b7c2c8c7ffe]",
 "LaunchScreenTextColor" : "TestValue[4a0305938acd485895b5c6639d23d15d]",
 "LaunchScreenButtonText" : "TestValue[e81faab7e81f4753a2f9eacde99153f5]",
 "LaunchScreenBgFilename" : "TestValue[da0aa9f6ae964f3f99f7cdc8eeb8ea79]",
 "FinalScreenTextSuccess" : "TestValue[752e7a39e3b84e8d9a52a8558296b96e]",
 "FinalScreenTextError" : "TestValue[80622cf47aaa49ed8d3d89527e6df6bc]",
 "FinalScreenTextColor" : "TestValue[96179cb9b264489d8211e205db11d3fa]",
 "FinalScreenBgFilename" : "TestValue[05af73e4e49f4923b0ee7db37cba6295]",
 "EditUuid" : "TestValue[dc63b9bd8bea4674bfd23221844015e4]",
 "DisplayUrlParam" : "TestValue[3d6eddbf40c1437cb05456231a7c3fc6]",
 "ReportStatusFilter" : "TestValue[943dc2cb982f40f3b05c6ceec94549ab]",
 "ModifyDate" : "2019-11-14T16:00:11.0935821+00:00",
 "NameUrlField" : "TestValue[abbe7e8a6f284d2983d4b1723331a825]",
 "IsActive" : true,
 "StatusTypeId" : "Testing",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[80b74b1519f44c58a57cb89018654c8a]",
 "BadLinkText" : "TestValue[727080edf9a14822b9ee9ade40d0fae1]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[777d1205560f41df87aed3161a2d8996]",
 "CustomCss" : "TestValue[1015901061bd44e7abb1f0289ce33bc5]",
 "NotificationAddresses" : "TestValue[dbdae68d2d534af6a34a25659da3b8dc]",
 "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": "2019-11-14T16:59:40.1720843Z",
  "ModifyDate": "2019-11-14T16:59:40.1720843Z",
  "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()
        }
    } 
}));