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[5ce39c31a24544c497ff14a8e5838116]</tig:Title>
             <tig:Description>TestValue[5c5080f21ba64ade9021dc5e44459b92]</tig:Description>
             <tig:Author>TestValue[df3a957a7ef44745a919a198458b2636]</tig:Author>
             <tig:ImageUrl>TestValue[bc8c4bb88f954b3f8bbbc0251535ee89]</tig:ImageUrl>
             <tig:ContentData>TestValue[73fd69a836c547b6bc86c4e2fb1b7fee]</tig:ContentData>
             <tig:Link>TestValue[085025f40f4546d4b099aaeb8d3675a7]</tig:Link>
             <tig:PublishDate>2018-10-18T21:15:26.9077894+00:00</tig:PublishDate>
             <tig:MetaDataParameters>new List<KeyValuePair<string, string>>().ToArray()</tig:MetaDataParameters>
             <tig:Reference>TestValue[65171645e1754fc4a33948870b951ae8]</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-10-18T21:15:26.9077894+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>2018-10-18T21:15:26.9077894Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:ModifyDate>2018-10-18T21:15:26.9077894Z</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[427bf95cdfd24dd7aa8d3cf39af0bf93]",
 "Description" : "TestValue[7b9942c423374395a3079c6190ca4ff3]",
 "Author" : "TestValue[b44b8a391b034abea6573663fe12dd88]",
 "ImageUrl" : "TestValue[1b11d59f29904157a157bf20139e37f7]",
 "ContentData" : "TestValue[2f4b23d6fb934187b68f2acd5e9e05db]",
 "Link" : "TestValue[46068a53ff3645d28a76258a472d784b]",
 "PublishDate" : "2018-10-18T21:15:26.9073829+00:00",
 "MetaDataParameters" : new List<KeyValuePair<string, string>>().ToArray(),
 "Reference" : "TestValue[832b1875b3e0474ca0ef41a9f6473405]",
 "IsActive" : true,
 "ViewCount_Overall" : 1,
 "VoteCount_Overall" : 1,
 "Rating_Overall" : 1,
 "CommentCount_Overall" : 1,
 "ModifyDate" : "2018-10-18T21:15:26.9073829+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-10-18T21:18:32.7075505Z",
  "ModifyDate": "2018-10-18T21:18:32.7075505Z",
  "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
        }
    } 
}));