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[a51f70e084e44cdca86c7096c29b5305]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[6f44eccdb4cb4b4eb037a1db35dcdc3f]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[601b296d141d4a12946eecbf0eb18981]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[5167cb96d8c54a03b42bdef127588c46]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[29269d5f56aa415e82500872d20079a9]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[56450b0f1d8841ce9c6c1b0b09cbab78]</tig:ProgressLabel>
             <tig:Uuid>TestValue[1d8a1492dfc34017865cf1125f8beb97]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[009fdced9351447e84b76b1f8ca0411e]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[24876e90d5da484ab34356bd72d0bf8d]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[17da6e7a3b1b4935b9e0ec51f3074192]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[148dd1cbbf12475eba5d50c981192c2b]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[5117f2670fc64cc09c456007ca06b0b8]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[4008b27c6e054d3eaf72b7ab97b2539f]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[ef1d40a5821143e4b9e69e3f61e29aea]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[f78b55736d4c4224ab09350eb43bed07]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[b8dfe040aabd4dfe91ab61bd7dd8dcf0]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[c75e76f599e84278a4a09961c0af6c74]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[ebadfef4dcd54e5f83ba3fd9c97f96d7]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[11f17f333c7b4a24b8fd09d15c5ed6c6]</tig:ReportStatusFilter>
             <tig:ModifyDate>2019-11-15T19:55:52.8303926+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[c738976bda2c480e86cdffb3e9932f3c]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Dev</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[c6c5985f97c2477b9577ab315e267e4c]</tig:ClosedText>
             <tig:BadLinkText>TestValue[6139c44453944d56be849052c5295a61]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[744d0d99569a470e8a12494eccafbb2a]</tig:CustomFont>
             <tig:CustomCss>TestValue[7e55e1bed5cb4d319dbbb41da33348d3]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[c7259309fd90452889574ef17da4755f]</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-11-15T19:55:52.8313919Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2019-11-15T19:55:52.8313919Z</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[a56d2f1dbf144e9eb01857b3eef907a2]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[bed03c824e2d44ca9f2a54a479356099]",
 "UIColorsSecondary" : "TestValue[cb038c3dd4944f1090ca16d97a2c547b]",
 "UIColorsBackground" : "TestValue[13ae3309c1f145369c3423f64c8afe19]",
 "ImageDir" : "TestValue[5e281308e5c042eb964eb74321a584d1]",
 "ProgressLabel" : "TestValue[26bbeea2415c46afa7543827a14619aa]",
 "Uuid" : "TestValue[25e9e43ba4dd45cf821fd5f7f9b28c49]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[8c3fc3964cca4d1aa922af713fa3abf1]",
 "LaunchScreenTextMobile" : "TestValue[8085a59e2db048ed8e6c8fa0108f018b]",
 "LaunchScreenTextColor" : "TestValue[424e11170ca049eab121b011a65d1972]",
 "LaunchScreenButtonText" : "TestValue[778922fdf04942159be90f70f73446c7]",
 "LaunchScreenBgFilename" : "TestValue[61eef8c30b454e5588bdc7c0c80e8cb3]",
 "FinalScreenTextSuccess" : "TestValue[3c0110dc3dcf400c8246a07b2d07a950]",
 "FinalScreenTextError" : "TestValue[244199ea866b4470b0ad4b6ad217084b]",
 "FinalScreenTextColor" : "TestValue[2c7a3a2cce5644b880a33da2b9c36d52]",
 "FinalScreenBgFilename" : "TestValue[61882d86425c42889de3cbe2a4486d41]",
 "EditUuid" : "TestValue[4ce3da97a1374a23a8acb1707c179165]",
 "DisplayUrlParam" : "TestValue[aa5a4100bce84d5786495d433b7eaf96]",
 "ReportStatusFilter" : "TestValue[e822190ce5ed4bc68533b16938e0551e]",
 "ModifyDate" : "2019-11-15T19:55:52.8303926+00:00",
 "NameUrlField" : "TestValue[89c7e21eb544425b9d399fd0b9082d82]",
 "IsActive" : true,
 "StatusTypeId" : "Testing",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[e7e27a65ebc84e418f03b041948ff632]",
 "BadLinkText" : "TestValue[d26c63c7181941cd89f4feb7eb7fa69e]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[68ec970e64a744d88cdc5e4c0f8f22f5]",
 "CustomCss" : "TestValue[b0542c3ca82342dd91787bbe954ec885]",
 "NotificationAddresses" : "TestValue[7ae7999e35bd47fbaa20d94065d4eb1b]",
 "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-11-15T20:03:22.0064451Z",
  "ModifyDate": "2019-11-15T20:03:22.0064451Z",
  "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()
        }
    } 
}));