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[27cd54e0ce7f4e6690f9f34806da533a]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[9fa2af75b51e41c285dae3cd97d04fb1]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[71d56911f4144cd4963114519d3f617e]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[15b8f9c5b2f64339ab646df7cfc8f94f]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[ea8a94f0161f4b10824cb3bd3ab16d82]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[877e3691c12747e09b851c57e9d86228]</tig:ProgressLabel>
             <tig:Uuid>TestValue[4f72c3dee4544d98af0821caa18366a8]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[3e494bd05fb2408bb3d21e899d13c46e]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[3b2617a8fec64aecac2f56eabf7ca8e5]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[d446ac83b22e4eea866317502f4df039]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[118f21979ca04d01b7f04da9236c358e]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[a36f517d4dc44480a878f905bde36476]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[19c59a798f314dc6b4cd86fde7cbe0a7]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[98a92c184ff04296a35c4db424f7fd6d]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[6a2a36b17a614415a70fb43675355dad]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[a8b03c832b72477abd715a34e1993ca9]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[99205e49c4a1428f964c1135c3eba8f6]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[74efd787ba1f47f8bfa1beb0cc70711e]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[b5c136086bb04b6186b77ba9e5e1fcab]</tig:ReportStatusFilter>
             <tig:ModifyDate>2019-06-26T20:27:00.1532266+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[e3a70a4ed282499c9df6b8337d3a7a18]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Closed</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[5aacb31f0fef4303af69f7186263c154]</tig:ClosedText>
             <tig:BadLinkText>TestValue[dd41ece9282f4f5c84b2d781d386ebda]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[47b8341bd08e4cb9a87d314e3907bcc2]</tig:CustomFont>
             <tig:CustomCss>TestValue[4eb680c31afa4bd2a4360240c30ef931]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[59aca301146c4759a1599b36dc6241d9]</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-06-26T20:27:00.1532266Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2019-06-26T20:27:00.1532266Z</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[3625b3c0ddde4e69a4d4576de7304080]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[11ca47e5c3e94b90bc23968f7c7f29b1]",
 "UIColorsSecondary" : "TestValue[185eefd986364a739d97f9997a791d55]",
 "UIColorsBackground" : "TestValue[fd35155974df40908c50443df5e27a40]",
 "ImageDir" : "TestValue[0d3c57acf2af4b20835a58550178cd1b]",
 "ProgressLabel" : "TestValue[f3c94e400a804754b638ba1ed9f84c49]",
 "Uuid" : "TestValue[57107580f7bc4b75982e5041aeca53ae]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[46cf70f76bc04a0b9e4416fb807c48cc]",
 "LaunchScreenTextMobile" : "TestValue[1180f736b59b48e7804fbbcccabb33ab]",
 "LaunchScreenTextColor" : "TestValue[b8d6600b4e7344cb8fdcd9656836afcb]",
 "LaunchScreenButtonText" : "TestValue[4fe438cdd0924393aa50d6a80bd729f6]",
 "LaunchScreenBgFilename" : "TestValue[01a865e57dfe4c659e186246de6f600c]",
 "FinalScreenTextSuccess" : "TestValue[374932d6e8c34fe4904079a90f927f95]",
 "FinalScreenTextError" : "TestValue[141875e41c9d4417813f667b9f6d76ae]",
 "FinalScreenTextColor" : "TestValue[ddaab9b509254b60ae86bf4ed5856d15]",
 "FinalScreenBgFilename" : "TestValue[21a7e1db33834b289932d42d3ef43e92]",
 "EditUuid" : "TestValue[8b116a7c37dc457580e28ec602a1a085]",
 "DisplayUrlParam" : "TestValue[835cf161ed164ff582d6bda16991314b]",
 "ReportStatusFilter" : "TestValue[3b2548ed4fff42e69ec93cf4c1fee1e5]",
 "ModifyDate" : "2019-06-26T20:27:00.1522300+00:00",
 "NameUrlField" : "TestValue[d58852f268ba4af29aa3c95074108326]",
 "IsActive" : true,
 "StatusTypeId" : "Dev",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[14118c6c50754315b94d3ab41df91084]",
 "BadLinkText" : "TestValue[37210746a12745a7982be0d5d7f7f298]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[a5c29de341c44ef5801863d1cde7f295]",
 "CustomCss" : "TestValue[4ec92715fc9a4baa868e930815ce5c29]",
 "NotificationAddresses" : "TestValue[0acbcdf883f840c7bd4d087e93b80ce5]",
 "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-06-26T21:14:30.80529Z",
  "ModifyDate": "2019-06-26T21:14:30.80529Z",
  "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()
        }
    } 
}));