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[22c62a330ed845d094cd7d35f64e50d2]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[2b6c973b324744cab7ece22a538599c7]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[348fb7de9b114b8c83b9b395392aac8d]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[7b76a8b14dcb41ee96374f0ae7300269]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[c87b39be78014739934a0bb833fcdfab]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[e792776724ec42e4b445a1eb6dea5b04]</tig:ProgressLabel>
             <tig:Uuid>TestValue[a951b797057d402e90afea8e44e69c53]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[08f247d15be54fca8390e86622dd4792]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[062120fc4e664eb383f4199ca2f1f7b2]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[b9688bf1ced34c0abeeb882b78a81dbb]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[6f58966e51f7433693501b342cb0bc5b]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[ccb62800fdaa4524898f9df43725140d]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[04133846afd14acaa59e95106b1ffc85]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[05657094d30c4231bf4a6f7ca06a17f2]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[87a656453f5d4e51b0dcea285139340f]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[9d1806e41da94cdf87b3991b92ec1116]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[59e373ab748f4e2684ffc82f64a446fb]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[bb7615e5bce44de19d89a94889621cb2]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[c461c6968b7340db83511a590dc55c19]</tig:ReportStatusFilter>
             <tig:ModifyDate>2018-12-16T11:50:53.1457819+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[6ab9aba0c1504bcb9b7b3c9cc9a087b3]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Dev</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[78d312af1ac240e4b7493f2f497f53c5]</tig:ClosedText>
             <tig:BadLinkText>TestValue[1a9531ad4b664988b3ce6e63d6d5a4e0]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[f1525189ca2e454eba91e2bf9ab4d06d]</tig:CustomFont>
             <tig:CustomCss>TestValue[5e0e7c414f9c48349e4ef88fa9928c7c]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[f4e3231ede774b79bb85c80cca3da20c]</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>2018-12-16T11:50:53.1457819Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2018-12-16T11:50:53.1457819Z</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[578106148cdd4b6391502425e504c86e]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[4d36a2b4d9544923a2d0ea8a6cb7d86e]",
 "UIColorsSecondary" : "TestValue[34a7ef272b8c4f1f976178db90d464cb]",
 "UIColorsBackground" : "TestValue[aca45ca28ea7412fabdb92a48076e228]",
 "ImageDir" : "TestValue[a4283094d02e44558ed9a7f467142e2e]",
 "ProgressLabel" : "TestValue[07a65422797449788bee8e2d9927d3a4]",
 "Uuid" : "TestValue[6796daa66af2418c8ac34c0c48b31512]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[ce958b0c0f314fd393d766afc506132d]",
 "LaunchScreenTextMobile" : "TestValue[0070925ebfd642f9bef7a394d9e30be9]",
 "LaunchScreenTextColor" : "TestValue[336eeebdf62f4720acc7c6a4b66c0825]",
 "LaunchScreenButtonText" : "TestValue[f8f7b1a22e6341eaa96bc5792010e874]",
 "LaunchScreenBgFilename" : "TestValue[e661f0a3c77048a385158f3668bfc5fc]",
 "FinalScreenTextSuccess" : "TestValue[32b86f61fd8446e2b0c140f770b79989]",
 "FinalScreenTextError" : "TestValue[f3bde1a5d0d84cbdbc97a338f1442d64]",
 "FinalScreenTextColor" : "TestValue[4e80f27217ff4a52b6ceb72e2dbcd8fd]",
 "FinalScreenBgFilename" : "TestValue[bf263378056648aead5668d3c0a536ca]",
 "EditUuid" : "TestValue[6ab3ed8c40e54c1184c103d98fb266d1]",
 "DisplayUrlParam" : "TestValue[3ed154d2b77047918d9de9f50af27e8c]",
 "ReportStatusFilter" : "TestValue[7fc62206f8674078a91a114286551c3b]",
 "ModifyDate" : "2018-12-16T11:50:53.1447821+00:00",
 "NameUrlField" : "TestValue[f78422d9cb04405db6e1c12509283caa]",
 "IsActive" : true,
 "StatusTypeId" : "Testing",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[dc4dcbd9eca64e1584d8cf49d0a3916f]",
 "BadLinkText" : "TestValue[ea133610b1bb48cba1c340d3626c5093]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[5cf582d604124ed69779dc0e1c0a2be5]",
 "CustomCss" : "TestValue[8c10a278e9e34e2bb3af5034f0d24603]",
 "NotificationAddresses" : "TestValue[c2a44c24257e4f3bbf14f8a628be7d47]",
 "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": "2018-12-16T16:24:27.9411295Z",
  "ModifyDate": "2018-12-16T16:24:27.9411295Z",
  "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.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()
        }
    } 
}));