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[f44190e2594340679670b192fed7cfff]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[b1ad75c6c5ff46ee9bef43c36a09cb38]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[4731e388e74649799c0e99b054833a51]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[801ff27c6cbf46948bbffa2d66d0d9bd]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[ee9edcf5e9654130b2ccddca31625232]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[f11f6ff67d8746888add7fa6acb18f59]</tig:ProgressLabel>
             <tig:Uuid>TestValue[eb4e69cdcf0345cf9a2b6205c9cac617]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[dca22be061254e2e9ee461ac86d0920e]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[e3fb8658a2ac4c27b458f8e033addbc5]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[7a47dbe80e904a449836678a64af6c4b]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[7393b807883e47238f82a904c8c4e3ca]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[902729107ee24f7eae20ed7e6c7fcc63]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[637567f8585c434084718b77ebd1fd95]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[01cfc228feee42d3b21e844b8fbc099a]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[716aab88a76f41e69c1492d8c8dce2b1]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[5a5f13e7256e4a0b9520f401874b48a9]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[1a5d789c9a624b188aaf894522359f20]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[915b4bed965e40b7b11c29e627b97b82]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[573278eed5c44be09329219506e4eb98]</tig:ReportStatusFilter>
             <tig:ModifyDate>2019-02-20T03:01:28.3075185+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[7cec9ef8a68c4e8381364c1f37bb48f5]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Open</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[783f94d02b114ec786001f4e6c410fee]</tig:ClosedText>
             <tig:BadLinkText>TestValue[e706e3af7c7240ad81761843309df483]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[035770b0909c44bf948ba8bda49d28b6]</tig:CustomFont>
             <tig:CustomCss>TestValue[1b11c6d0313b45359eee88ea5a40b683]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[52c54566a6ee44f19d2be15d126bf14f]</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-02-20T03:01:28.3075185Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2019-02-20T03:01:28.3075185Z</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: 4316
Host: [CallHost]
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)-
 
[{
 "Id" : 1,
 "ProjectId" : 1,
 "InitialScreenId" : 1,
 "Title" : "TestValue[e0dfa66a05734abca2117f092ecf41fe]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[291b8d76f94f4198b029cfc749ebb383]",
 "UIColorsSecondary" : "TestValue[b96b2a02a22748bdbac2dea03b4d3f09]",
 "UIColorsBackground" : "TestValue[1a249703bf484ead930abff4180647ba]",
 "ImageDir" : "TestValue[beeddbf8de7c4433ab8fc9a53b68d8a4]",
 "ProgressLabel" : "TestValue[5b58b093e77746deae1ce992744dfc44]",
 "Uuid" : "TestValue[d1ea3a065d564984a14448667da1f126]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[34d5787ac8634d1ca56c7d5005fc8ddd]",
 "LaunchScreenTextMobile" : "TestValue[8ee0c0b7bc9d47229a52a43dabf5b701]",
 "LaunchScreenTextColor" : "TestValue[26ee5d7a4c2a41ecb1dedf2c99c445a5]",
 "LaunchScreenButtonText" : "TestValue[48a19f154ca14590aa07721846ea93af]",
 "LaunchScreenBgFilename" : "TestValue[e0dd68529c5e414fa654c4cf247a4b37]",
 "FinalScreenTextSuccess" : "TestValue[75eb55b81a314336bb818108f325b337]",
 "FinalScreenTextError" : "TestValue[cb38bc648baf4f3fae69a13041fe73c8]",
 "FinalScreenTextColor" : "TestValue[70c1e24a1a7e4294a84d47e908322ad8]",
 "FinalScreenBgFilename" : "TestValue[7b0324cdea9b4c5f8b891356d33dcb8a]",
 "EditUuid" : "TestValue[0375a7bcac3f4902a4062972f63d5614]",
 "DisplayUrlParam" : "TestValue[d264be02e6f6409b98475fbe78210a00]",
 "ReportStatusFilter" : "TestValue[0fc4b58ab03d498ab8d1fd0c8c8a08db]",
 "ModifyDate" : "2019-02-20T03:01:28.3065944+00:00",
 "NameUrlField" : "TestValue[39e0506648d04cc39ad511265eab42fc]",
 "IsActive" : true,
 "StatusTypeId" : "Closed",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[1d7b14ef5752443197bbbd615e910707]",
 "BadLinkText" : "TestValue[3daaec91b34948a7a46dca9b5689f170]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[289ad39998d34ca3ad0e09ee86455c40]",
 "CustomCss" : "TestValue[04e5767b90624b819e2a43630ae64bb4]",
 "NotificationAddresses" : "TestValue[5e233ffdfc0e4689904b71903ccc60ac]",
 "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-02-20T04:15:37.9687742Z",
  "ModifyDate": "2019-02-20T04:15:37.9687742Z",
  "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()
        }
    } 
}));