Create a new Article

Request Parameters

Name Type Description Required?
DataArticle[]UnavailableRequired
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:CreateArticle xmlns:api1="http://api.phoenixplatform.com">
         <api1:request>
             <tig:Id>1</tig:Id>
             <tig:Title>TestValue[e5bddd2d476b4d1a990c79a50e956c56]</tig:Title>
             <tig:Description>TestValue[174513d674aa4c68b2e795ba7fc8f426]</tig:Description>
             <tig:Author>TestValue[2b328e89cf8247e7afeef9c909be7838]</tig:Author>
             <tig:ImageUrl>TestValue[5eb357eab9f042e1baafdb31d4f3cc4f]</tig:ImageUrl>
             <tig:ContentData>TestValue[b2b902e7591a47398f3dd4be8edcd16d]</tig:ContentData>
             <tig:Link>TestValue[13a4f217ed494e0b88f5a460e0a9d8b0]</tig:Link>
             <tig:PublishDate>2019-11-19T01:51:30.5505357+00:00</tig:PublishDate>
             <tig:MetaDataParameters>new List<KeyValuePair<string, string>>().ToArray()</tig:MetaDataParameters>
             <tig:Reference>TestValue[6d2ffb95b6004f53b255a294d0430b27]</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>2019-11-19T01:51:30.5505357+00:00</tig:ModifyDate>
             <tig:ProjectId>1</tig:ProjectId>
         </api1:request>
      </api1:CreateArticle>
   </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>2019-11-19T01:51:30.5505357Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:ModifyDate>2019-11-19T01:51:30.5505357Z</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[f457f8edda914156a9dfdc012c911f8b]",
 "Description" : "TestValue[e23268f2db484e9280e22c8bbbc44996]",
 "Author" : "TestValue[a6d8b7da58c64c62827a3de3635065d2]",
 "ImageUrl" : "TestValue[9216edb09b2946aea2d7d37c8b0709e1]",
 "ContentData" : "TestValue[66b092ce460849f9b166acffd197bcf7]",
 "Link" : "TestValue[0f60bc1af78b431ea40cbf6084d7299c]",
 "PublishDate" : "2019-11-19T01:51:30.5499412+00:00",
 "MetaDataParameters" : new List<KeyValuePair<string, string>>().ToArray(),
 "Reference" : "TestValue[73e0986cb7e14390b9f598dcc6243d40]",
 "IsActive" : true,
 "ViewCount_Overall" : 1,
 "VoteCount_Overall" : 1,
 "Rating_Overall" : 1,
 "CommentCount_Overall" : 1,
 "ModifyDate" : "2019-11-19T01:51:30.5499412+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": "2019-11-19T03:36:13.6075068Z",
  "ModifyDate": "2019-11-19T03:36:13.6075068Z",
  "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.CreateArticle(new PhoenixService.CreateArticleRequest() 
{ 
    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
        }
    } 
}));