Updates a collection of Surveys

Request Parameters

Name Type Description Required?
DataSurvey[]UnavailableNot Required
ExpandSystem.String[]UnavailableNot Required
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:UpdateSurvey 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[48e3ece008504a68bde864786aaeab63]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[4a01d70cc4b347efba868933e9ed15a0]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[689cc66653e548edaceb551b99165e34]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[f420bdc5ae504ff5a929f6aa1423e06d]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[1e2b444243024f6fa5bfc50e3ffbacec]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[6f15d2e684704aa2bd9920fc20403f21]</tig:ProgressLabel>
             <tig:Uuid>TestValue[918338215ff8441abdcd03847ded1723]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[9212f355566c4d7bae5bd73fb97eea3a]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[0e35fad241154ca6aea127a5cea0acbd]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[e32b153732b64d6c9ddee6c5052a8643]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[8c637b2b75dd47d08f9d6a1d45993ce7]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[fc996c3d4a9c4b788293e116ff31cd74]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[2544eb245448405aba60f6c2b4a8e390]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[5adc506ace514817a8a2d7c1af777546]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[2f78aa7596e54d17b7d40ed60e71d2cb]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[be08e8c49f824bfc974f1a5e8739a2af]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[30dbe0fe939d47119072f2b455459b77]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[ffa8009874de4f7fbc36384675334dcb]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[a85771a6d6164633b96bf449c2d2dbe3]</tig:ReportStatusFilter>
             <tig:ModifyDate>2019-08-21T23:53:13.1687265+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[51d988454d4e43879927a8a6bdb1004d]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Demo</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[7e2b7af8552944cc8f642f03a2d81b44]</tig:ClosedText>
             <tig:BadLinkText>TestValue[3be723b4e531472e84e3692ddafefb74]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[08decf6d0f1a403cb13417ab5f572d43]</tig:CustomFont>
             <tig:CustomCss>TestValue[8c7e1dd5398642b880fc4df99d3423ca]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[ca20a01f96a34fd99e9746a9c53a4b03]</tig:NotificationAddresses>
             <tig:MessageId>1</tig:MessageId>
             <tig:MetaDataParameters>new List<KeyValuePair<string, string>>().ToArray()</tig:MetaDataParameters>
         </api1:request>
      </api1:UpdateSurvey>
   </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-21T23:53:13.1687265Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2019-08-21T23:53:13.1687265Z</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: 4310
Host: [CallHost]
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)-
 
[{
 "Id" : 1,
 "ProjectId" : 1,
 "InitialScreenId" : 1,
 "Title" : "TestValue[962c3fb37d3344dd875432aa675dbcb3]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[534760fd97ea46198f67d35cdefd0a1b]",
 "UIColorsSecondary" : "TestValue[9d7facb47b954e68addd1453ea74bb04]",
 "UIColorsBackground" : "TestValue[2fcb021c68de4e5b9d061e6d71585d50]",
 "ImageDir" : "TestValue[c163fb1554f447de8532a9d072708064]",
 "ProgressLabel" : "TestValue[947f885e595048d5b53c7a66b273bed1]",
 "Uuid" : "TestValue[90331057d6bd4cb98f5d069f2145b6d0]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[b169721309904d3885b2c6a379df7a17]",
 "LaunchScreenTextMobile" : "TestValue[3ee60bce399640aa81f50e4a0f794d19]",
 "LaunchScreenTextColor" : "TestValue[f9b49be10eac4ad7aa1aa7285eb5a9e7]",
 "LaunchScreenButtonText" : "TestValue[b4af6d971cea43efa0230869dea18c31]",
 "LaunchScreenBgFilename" : "TestValue[c2b5dfea1e044e808d39d0298c2f8bea]",
 "FinalScreenTextSuccess" : "TestValue[a6f92b478fc14f1b9f1fa948743341f3]",
 "FinalScreenTextError" : "TestValue[3858cef1bb824dd0b34bc27317a8b4e8]",
 "FinalScreenTextColor" : "TestValue[bfc0c696a7c146f49f25f31af2ad5877]",
 "FinalScreenBgFilename" : "TestValue[637ce951bf4a4a2a8c16676f6f0677d6]",
 "EditUuid" : "TestValue[7c50c1918b324d488616d308dfb9f096]",
 "DisplayUrlParam" : "TestValue[5759ee86c3dc4d2c86a07a48f640d065]",
 "ReportStatusFilter" : "TestValue[a22483eafabe4916b7b64b952116ac31]",
 "ModifyDate" : "2019-08-21T23:53:13.1677278+00:00",
 "NameUrlField" : "TestValue[2e187e20be40438b885c4e59aee56e31]",
 "IsActive" : true,
 "StatusTypeId" : "Dev",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[b6c554228f4a41a092b6f206327b5acc]",
 "BadLinkText" : "TestValue[c8fb64bee86041d9894b28b9115a8f48]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[d6145007a69f4293a88699e99afae9c5]",
 "CustomCss" : "TestValue[879862761d524942b684a2e369dc3382]",
 "NotificationAddresses" : "TestValue[6134f1f43b8541adac4048a7c3e34a50]",
 "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-22T21:07:24.5661427Z",
  "ModifyDate": "2019-08-22T21:07:24.5661427Z",
  "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.UpdateSurvey(new PhoenixService.UpdateSurveyRequest() 
{ 
    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()
        }
    } 
}));