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[f69f0eaaa0e948bea75c95c5e9889585]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[3b7005559b0948e18ce3f990a1b34446]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[6823b7a25f6449f2b70ed1b534ae9784]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[e704ea43b0014d209e6b69c6543fb52a]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[f435e8158fc740e890fcd7df0ca2aee4]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[9f5ec1e277894bbfbb1dfcf08955c359]</tig:ProgressLabel>
             <tig:Uuid>TestValue[54ff5a28602e40d986af2ae1ee7b7aad]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[bc6ef1c0775e4b6c9f8d7744e38f4f34]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[bc5e0c3494854409813039ce6dd50efb]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[fa735021059e404d88aa14f4aed5d6e8]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[57f379bfb4874484a6ddba8e75c3510a]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[e40d6c815fed44dcb655c4bed4650be3]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[d0a780f9e50f4be49594d92dd6ccb847]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[109ef600c3984d25bb3ab40191080f0d]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[eccd9618853c4391bc6899113978147f]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[53cc03b5328e422aa391a2c5fe32bcbe]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[cc2873d76fb34078a12c58d7e8820e7f]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[e3d2b3d18757418b98f024713f15e518]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[933becbe255f43449b650f6d66e3d578]</tig:ReportStatusFilter>
             <tig:ModifyDate>2019-02-20T03:01:28.2925168+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[ebe326d438334eb982439f511a4ac33a]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Testing</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[b734cb560a9e4a6cbbfce2dc80e18de5]</tig:ClosedText>
             <tig:BadLinkText>TestValue[4a59374d1a2d40f38e63e93da631baf8]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[886bfee378044bde929a366acfa3d59e]</tig:CustomFont>
             <tig:CustomCss>TestValue[0f3b57c75c0e4bc3920f65b72a47c6f9]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[ff681aaf4db34e07a4050493f029afdb]</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-02-20T03:01:28.2925168Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2019-02-20T03:01:28.2925168Z</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[c86d27655e5b48f6b7d8a67133a13c29]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[5992d0f24b9e4dacab34ce23564f07ca]",
 "UIColorsSecondary" : "TestValue[863803c8bdb7453ea3a11f4aa2598aa9]",
 "UIColorsBackground" : "TestValue[f0e81d7c7e164bc881b90dfb3cc6ebed]",
 "ImageDir" : "TestValue[80541cf133ff4d5fa2a12152bfbed0e7]",
 "ProgressLabel" : "TestValue[4e99c1688eb545469586867eef35332e]",
 "Uuid" : "TestValue[810a003783a440f3843b55b6935c8e2a]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[71b32ed2edd441cb8d17860eaa640624]",
 "LaunchScreenTextMobile" : "TestValue[5c8e18552f014160bdeaba3b5e9cdd16]",
 "LaunchScreenTextColor" : "TestValue[c582e01e474c4febb171743237691479]",
 "LaunchScreenButtonText" : "TestValue[81519a3e56c64332ac05e615751ec353]",
 "LaunchScreenBgFilename" : "TestValue[d26f53f84d4344f681f9485d66a0083a]",
 "FinalScreenTextSuccess" : "TestValue[06b085bec17c4b51962bfdda32b30579]",
 "FinalScreenTextError" : "TestValue[f1e5766db38047eeaa55e33054ec9178]",
 "FinalScreenTextColor" : "TestValue[47d59cced9e249d8b533f80dc73fd33b]",
 "FinalScreenBgFilename" : "TestValue[a4f507833b3d47df8acb13344124cf22]",
 "EditUuid" : "TestValue[802ab494979342b09301a20c9ec5ca21]",
 "DisplayUrlParam" : "TestValue[be08d6d20f2e45f6a193ee5a37c9b615]",
 "ReportStatusFilter" : "TestValue[49c08cae13a24297ad136ff83bc9567d]",
 "ModifyDate" : "2019-02-20T03:01:28.2915172+00:00",
 "NameUrlField" : "TestValue[fb877317f4e94dc09f2d2dca4fdb9755]",
 "IsActive" : true,
 "StatusTypeId" : "Testing",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[6468f072001e4ad7b65a1f20e6741aec]",
 "BadLinkText" : "TestValue[235d2f3553b44c6bb6b693e41a6750da]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[3be349bdb3e94c45863ee8d076349915]",
 "CustomCss" : "TestValue[5d55449fc2fc4cc197b85509fe3877e9]",
 "NotificationAddresses" : "TestValue[2dacf925f74945cea6990c9de7b77e30]",
 "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:09:58.6687096Z",
  "ModifyDate": "2019-02-20T04:09:58.6687096Z",
  "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.Testing,
          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()
        }
    } 
}));