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[902b776716884c10a61f59e5278d8f25]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[1d0d6fcc5af145cbab523f293cf1abb7]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[9e31a1f451b147b096b24ad014949f90]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[f2222b02e66b488badf19b88eaf93a67]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[20d0ff42a0804778b56844676b657501]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[7933bfaefa444b52ac39e3b2b48e7f0c]</tig:ProgressLabel>
             <tig:Uuid>TestValue[c5f6bea706b3451589505e764f609382]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[dc5b04c7116845be93c2f02c5070ff07]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[3a8913fa6345484ba1e044767cab2f5c]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[8031be332d8f4cdeac073e4cf9763b6f]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[c7117f415f1e45b48c74554a75a207bf]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[a34102a59ae849a7883567097a1ed759]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[ca83e08a3ce74f24ac3221053bb0d917]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[d1ffc42ec8e04cb4a5a28bcee57e9dc2]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[99ca9e691d2b47188973590e4e55c3ce]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[127e3198f4524e349ead36818415f6f4]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[5f5158182ff341ada055a18626d9ff91]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[0edfda0ce8624e5cab772cc3a72c3827]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[f876aa14878a4139945046c62a32a9e2]</tig:ReportStatusFilter>
             <tig:ModifyDate>2019-04-19T01:17:54.4314992+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[b33f1e1ff5cf40f68f790d30ebf4f61c]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Demo</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[845bd75feaa34e6caa06c00e1a326ce9]</tig:ClosedText>
             <tig:BadLinkText>TestValue[5af5e6634e254190a20d63b641ee5f11]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[50c47a3a20bb4d8f93f0822c8f9b1f84]</tig:CustomFont>
             <tig:CustomCss>TestValue[f33a8cc16604407d9ed832ba3b77ab93]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[5ff8fe3a427c468d80c1768de3bd4976]</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-04-19T01:17:54.4314992Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2019-04-19T01:17:54.4314992Z</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: 4312
Host: [CallHost]
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)-
 
[{
 "Id" : 1,
 "ProjectId" : 1,
 "InitialScreenId" : 1,
 "Title" : "TestValue[c673fcffe46c4c38a5cea9d1a043d7ce]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[a43540744e024629a10f2042a4ede2ab]",
 "UIColorsSecondary" : "TestValue[798a8cc1815349f99759d0b32ed5422e]",
 "UIColorsBackground" : "TestValue[590860efd911409aae82818f7523e185]",
 "ImageDir" : "TestValue[b278926daa324dddbaad109a477a2720]",
 "ProgressLabel" : "TestValue[0e7fd29793b7435995d7486f3bba5c7f]",
 "Uuid" : "TestValue[99fd82db843645fe92c630b422cbbd1d]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[20f40e8729ea4ea8b9305d52b88eb70e]",
 "LaunchScreenTextMobile" : "TestValue[989a562523b34955be3b6e0057d06537]",
 "LaunchScreenTextColor" : "TestValue[46b71c78ff67494cbac1c756794a955d]",
 "LaunchScreenButtonText" : "TestValue[c4591bc4ba4e4e64990e5a274ec48960]",
 "LaunchScreenBgFilename" : "TestValue[15c7938cda604208bde6f77218932a25]",
 "FinalScreenTextSuccess" : "TestValue[47a3a45a9277449faec6599c9aac2cff]",
 "FinalScreenTextError" : "TestValue[41a1d0e9a7df44a1802fd1218d0f3a95]",
 "FinalScreenTextColor" : "TestValue[b3077264e9a647d183463dba3f9fa95f]",
 "FinalScreenBgFilename" : "TestValue[da56e13131db446299ba8e678124b345]",
 "EditUuid" : "TestValue[688b67f5ec9e41a9b92353437d2d7df9]",
 "DisplayUrlParam" : "TestValue[8cbaa6c48a2b4bf6a17120da1bd3f340]",
 "ReportStatusFilter" : "TestValue[e3737da1e284480ca4ffffbcfd58b5f7]",
 "ModifyDate" : "2019-04-19T01:17:54.4314992+00:00",
 "NameUrlField" : "TestValue[4f1b37548f8e45649fb0d2f99c12f758]",
 "IsActive" : true,
 "StatusTypeId" : "Demo",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[b9bc56a1422c47fbb1dce92371b9892c]",
 "BadLinkText" : "TestValue[ccecbb93f7a64ed1995d09758e6eddc4]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[0fdbb958e7654ae7b74d81f1cd20b500]",
 "CustomCss" : "TestValue[78b28ef6c6f14004929c50350a9e4af6]",
 "NotificationAddresses" : "TestValue[7ac7b03ba7f94422958abf63be08f7ce]",
 "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-04-19T01:18:52.9254739Z",
  "ModifyDate": "2019-04-19T01:18:52.9254739Z",
  "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.Dev,
          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()
        }
    } 
}));