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[dfece5bbd64f4c3d9b56a1dcd291d122]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[32092883425c4932b9e14f5cbb2123c4]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[ed42c21221314388b3bab32c44bcec76]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[42f086fcf0d54a50a8df184c3947adf6]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[4cfce971aeb7413c85970f5f7ec63110]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[3f01dc37334d408d87bd63c1102c91b8]</tig:ProgressLabel>
             <tig:Uuid>TestValue[7e30c39a6780455e8df03c0d2c30a10a]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[c545ead4f31644babd27d09ed30bdabd]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[31d8cfdf10974afe8296a1b77a9e7cb5]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[07947cb4d05449258e85d2f00baeeb69]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[9b8bec8f79654badba5fa0927ac6a97d]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[d36164c94f0a4c4cae980f395675d549]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[7c7c0bd04aa44ba1a7c4708b3e0eddd9]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[aa0bc343ba4a48519a6c802ddf918c91]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[af6c1cac551048aca5137ff2fcc5ae0a]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[0d1065a8e6e74bd5b1d51fe32ca9317d]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[6861ad06db994ad8ae8b93e94d1ba62d]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[3b8356331bd148e8ac2bcb9228909e74]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[4b7aed8a2e644d3d90f63b189f8753ea]</tig:ReportStatusFilter>
             <tig:ModifyDate>2020-05-29T18:21:20.7062691+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[2134673399fa45d0806c43a18f89a4dd]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Closed</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[5b359b7dfcbc4747a463a50797d83db4]</tig:ClosedText>
             <tig:BadLinkText>TestValue[2787eda32aa7401ba0ff66bf5d7cff16]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[9ea581b573fc47ac9527c7a653712cc5]</tig:CustomFont>
             <tig:CustomCss>TestValue[fae6cc29cb0a413299b73612b87181e4]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[65f9dbe670c948359c179343bf4aef7a]</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>2020-05-29T18:21:20.7062691Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2020-05-29T18:21:20.7062691Z</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[5591b45178df4e99bc3605634721ca4b]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[a19075dfe6a94dcba236fbcb38b17d68]",
 "UIColorsSecondary" : "TestValue[1142e3dc1c914e62a371acdd74ad0fec]",
 "UIColorsBackground" : "TestValue[b5a9610d9a2048e089a540b950269d64]",
 "ImageDir" : "TestValue[95c530b488db402f9ab1b2cb84cfc85a]",
 "ProgressLabel" : "TestValue[d7470e0426014eef9c0d23d5d9eb865f]",
 "Uuid" : "TestValue[1230c4d2815a4d69933e33c9de5e7df4]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[10dfe861be02410cbc3f4c06b66c8e74]",
 "LaunchScreenTextMobile" : "TestValue[a5c739bd72644cbfa8335fc95cb9fb96]",
 "LaunchScreenTextColor" : "TestValue[bb43b05d98dc4ec1b510eba0fdfae57f]",
 "LaunchScreenButtonText" : "TestValue[9f84bfc4c9ce45d7aecd0a094dd00fec]",
 "LaunchScreenBgFilename" : "TestValue[70dc7720ffef4a2097e16c241ff0852e]",
 "FinalScreenTextSuccess" : "TestValue[fc06651a78c347fa9be6caddb8a7c0d4]",
 "FinalScreenTextError" : "TestValue[db3a2e6450cb429e8bcaa386e185ffa6]",
 "FinalScreenTextColor" : "TestValue[9cdfb150cbad4e1fb5bc7e602d000f55]",
 "FinalScreenBgFilename" : "TestValue[9c0f36eef69a47f58af1c373d4b3502d]",
 "EditUuid" : "TestValue[cdab018c3e0644cba4ab2c5da9003065]",
 "DisplayUrlParam" : "TestValue[380ba60758494d65a8ca9f0739a67de2]",
 "ReportStatusFilter" : "TestValue[142f43bd78454d5b8b622918c8b3dbdf]",
 "ModifyDate" : "2020-05-29T18:21:20.7048825+00:00",
 "NameUrlField" : "TestValue[baa72aa5c2b84d4888c626bbab4c9702]",
 "IsActive" : true,
 "StatusTypeId" : "Testing",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[03297b87ff10405b98489fad59060cfa]",
 "BadLinkText" : "TestValue[878f447f0d9042abaca114efed760d67]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[ef6645d288a1454ca14c5281b97b53e0]",
 "CustomCss" : "TestValue[69ca286e14304d9495682fbf9833777b]",
 "NotificationAddresses" : "TestValue[67d60206c9b5453abfaa915bf4ace6fa]",
 "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": "2020-05-29T18:47:42.0950182Z",
  "ModifyDate": "2020-05-29T18:47:42.0950182Z",
  "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()
        }
    } 
}));