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[fbc333b19ad6427da50f52c7fc582d1e]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[85a82e98abed4d85b3ba9077932ac377]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[d043d9c55b0241a78f99471d1bfdc9f3]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[091b78daabec487b9cab3b52a495e847]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[4fcb754022774b44b9dda85916911517]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[dcff9233c97d4d21a25b6f30246327d1]</tig:ProgressLabel>
             <tig:Uuid>TestValue[d57f4c36b2604181a8d96667fed62d40]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[5075761fa90244629db610c21c5c4ebd]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[3b9ecbabcebf4a309ce0eb1dc04ebf64]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[e14da549ee364095b9dff611b7ede154]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[a2cfa00018504931932345e4cc23d351]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[d794259d82604c0cb8a4eea20ba55980]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[9232d43fdf5b4c2d92663b5e2330d727]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[fb3a4da4e32e4ef4b529c82cc3497900]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[141b7395911e44d4a029960a3044109b]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[984de122a8d34b4e8137bc6fe49d5b44]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[398c615366fe4f5a8216779948a933c0]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[29b45e4a4fea49388bb03d402ce2d220]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[fd1c887d46ea4409bfbfcd9c5ec640c9]</tig:ReportStatusFilter>
             <tig:ModifyDate>2019-08-18T05:55:07.1711478+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[867881f610f2439985e0bff29539426e]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Open</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[cf87a74a6d5c49e0b65362443a02bc6f]</tig:ClosedText>
             <tig:BadLinkText>TestValue[52e3f341fbe645e08e5a48622f5b5894]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[7358d92e530446ddbb353c9378e2ce7d]</tig:CustomFont>
             <tig:CustomCss>TestValue[d44829650bab41ebb5961cf16b8bff59]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[06dc99228e564c0495e9756967e2d9cd]</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-08-18T05:55:07.1715719Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2019-08-18T05:55:07.1715719Z</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[450225f310fb45bd9160eb4c3c4cdc75]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[4fe1a71b28104c6890b63192e8850352]",
 "UIColorsSecondary" : "TestValue[1b9de1d17c674ab0a34d29f1b5a5e7ed]",
 "UIColorsBackground" : "TestValue[665c4a568bca4d7f86f889d5e3c0990b]",
 "ImageDir" : "TestValue[b3fbd1d1d8f244dfab1b6489c1bfd33b]",
 "ProgressLabel" : "TestValue[a893f64290654a828a2b8325a1c2dd41]",
 "Uuid" : "TestValue[e6fdbb207bca48a2a921a13faeba6135]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[76b39e5312d342afaa8c09dc8900e23a]",
 "LaunchScreenTextMobile" : "TestValue[f9b9e95213764312ba50f7c79d32927f]",
 "LaunchScreenTextColor" : "TestValue[97a97bf6be334b6586e5d456818f1da4]",
 "LaunchScreenButtonText" : "TestValue[f4f3c987a1d94145821e3f36a6b6bfb2]",
 "LaunchScreenBgFilename" : "TestValue[d7a6aabbce3547e8860ddaf678b26a09]",
 "FinalScreenTextSuccess" : "TestValue[e1f4bee8caba46aaba12b55e55e62162]",
 "FinalScreenTextError" : "TestValue[c6bc7e50fd7a40afb638025580bf7819]",
 "FinalScreenTextColor" : "TestValue[ed2725c8b0f24b76884ce6b010f78e52]",
 "FinalScreenBgFilename" : "TestValue[c672e0267c2c4d82a795619043faba41]",
 "EditUuid" : "TestValue[297286ad48ac423f96aefb5a0eb443a1]",
 "DisplayUrlParam" : "TestValue[61e49dcf6727466f83ae105f7db4b596]",
 "ReportStatusFilter" : "TestValue[707429870b3e400489829d92339784d4]",
 "ModifyDate" : "2019-08-18T05:55:07.1698030+00:00",
 "NameUrlField" : "TestValue[a0ac2a925ee349cab91f5109d6ee2805]",
 "IsActive" : true,
 "StatusTypeId" : "Testing",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[a83d620de2a34398b0bf40f75bffdf04]",
 "BadLinkText" : "TestValue[969650720c224e17bd6fdbb57a11d2e5]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[e0316c82d9b84a63bda19c7db131d769]",
 "CustomCss" : "TestValue[0049f99c73ea4d46b336544a15a100be]",
 "NotificationAddresses" : "TestValue[03e2b0f1afe8434eae4f9a145052d760]",
 "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-08-18T10:43:50.2323156Z",
  "ModifyDate": "2019-08-18T10:43:50.2323156Z",
  "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.Open,
          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()
        }
    } 
}));