Update an existing Article

Request Parameters

Name Type Description Required?
DataArticle[]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:UpdateArticle xmlns:api1="http://api.phoenixplatform.com">
         <api1:request>
             <tig:Id>1</tig:Id>
             <tig:Title>TestValue[abcc3a8ee2b64d94851bed63514e8461]</tig:Title>
             <tig:Description>TestValue[94f2de1f049648b3b995a8f47df3e3fd]</tig:Description>
             <tig:Author>TestValue[a5d7ce19561c4d4884ab15af001e4bad]</tig:Author>
             <tig:ImageUrl>TestValue[79aa3db597804fa489c9af5e9052b11e]</tig:ImageUrl>
             <tig:ContentData>TestValue[4b002a70bb85407cbc8e7a7df9ac7217]</tig:ContentData>
             <tig:Link>TestValue[7f1be2884e98456093e54e906b9decee]</tig:Link>
             <tig:PublishDate>2018-12-17T08:42:54.7728528+00:00</tig:PublishDate>
             <tig:MetaDataParameters>new List<KeyValuePair<string, string>>().ToArray()</tig:MetaDataParameters>
             <tig:Reference>TestValue[86397d72c21148dfa53fe00443d8b099]</tig:Reference>
             <tig:IsActive>true</tig:IsActive>
             <tig:ViewCount_Overall>1</tig:ViewCount_Overall>
             <tig:VoteCount_Overall>1</tig:VoteCount_Overall>
             <tig:Rating_Overall>1</tig:Rating_Overall>
             <tig:CommentCount_Overall>1</tig:CommentCount_Overall>
             <tig:ModifyDate>2018-12-17T08:42:54.7728528+00:00</tig:ModifyDate>
             <tig:ProjectId>1</tig:ProjectId>
         </api1:request>
      </api1:UpdateArticle>
   </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>
      <SyndicateResponse xmlns="http://api.phoenixplatform.com">
         <SyndicateResult 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.Syndicate.Model">
              <b:Article>
                <b:Assets />
                <b:CommentCount_Overall>0</b:CommentCount_Overall>
                <b:ContentData i:nil="true" />
                <b:CreateDate>2018-12-17T08:42:54.7728528Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:ModifyDate>2018-12-17T08:42:54.7728528Z</b:ModifyDate>
                <b:ProjectId>0</b:ProjectId>
                <b:PublishDate>0001-01-01T00:00:00</b:PublishDate>
                <b:Rating_Overall>0</b:Rating_Overall>
                <b:Title i:nil="true" />
                <b:ViewCount_Overall>0</b:ViewCount_Overall>
                <b:VoteCount_Overall>0</b:VoteCount_Overall>
  </b:Article>
</b:Data>
            <TotalRecords xmlns="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services">1</TotalRecords>
         </SyndicateResult>
      </SyndicateResponse>
   </s:Body>
</s:Envelope>
Resource URL

Sample Request

POST /projects/{projectid}/articles? HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json; charset=utf-8
Authorization: Bearer [YOUR SUPER SECURE TOKEN]
Content-Length: 1566
Host: [CallHost]
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)-
 
[{
 "Id" : 1,
 "Title" : "TestValue[9c6abb936b504796811d4b1e38a1c920]",
 "Description" : "TestValue[1c4f64cdb3024c90ae543d4b678f00e7]",
 "Author" : "TestValue[4bb74aa206f04102bd17f2648f15fcd8]",
 "ImageUrl" : "TestValue[2bffb23bcbda488ca5c2fe5feadef7a4]",
 "ContentData" : "TestValue[5df25f36811b443b8596f3b8e455d43c]",
 "Link" : "TestValue[fe3164173bf34fd68b17419488a5fc38]",
 "PublishDate" : "2018-12-17T08:42:54.7728528+00:00",
 "MetaDataParameters" : new List<KeyValuePair<string, string>>().ToArray(),
 "Reference" : "TestValue[80a91daff89f4c48986c4eb4a474ef5e]",
 "IsActive" : true,
 "ViewCount_Overall" : 1,
 "VoteCount_Overall" : 1,
 "Rating_Overall" : 1,
 "CommentCount_Overall" : 1,
 "ModifyDate" : "2018-12-17T08:42:54.7728528+00:00",
 "ProjectId" : 1
}] 
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

[{
  "Title": null,
  "ContentData": null,
  "PublishDate": "0001-01-01T00:00:00",
  "IsActive": false,
  "ViewCount_Overall": 0,
  "VoteCount_Overall": 0,
  "Rating_Overall": 0.0,
  "CommentCount_Overall": 0,
  "CreateDate": "2018-12-17T11:07:00.7878539Z",
  "ModifyDate": "2018-12-17T11:07:00.7878539Z",
  "ProjectId": 0,
  "Assets": []
}]

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.PhoenixSyndicate.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.IPhoenixSyndicateService>(configuration);
var response = proxy.Execute(request, o => o.UpdateArticle(new PhoenixService.UpdateArticleRequest() 
{ 
    Data = new[] 
    { 
        new PhoenixService.Article() 
        {
          Id = 1,
          Title = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          Description = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          Author = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ImageUrl = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ContentData = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          Link = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          PublishDate = DateTime.UtcNow,
          MetaDataParameters = new List<KeyValuePair<string, string>>().ToArray(),
          Reference = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          IsActive = true,
          ViewCount_Overall = 1,
          VoteCount_Overall = 1,
          Rating_Overall = 1,
          CommentCount_Overall = 1,
          ModifyDate = DateTime.UtcNow,
          ProjectId = 1
        }
    } 
}));