| GET,OPTIONS | /v1/pm/project/activity |
|---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
class PmActivityItem implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Type=null,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Status=null,
/** @var string|null */
public ?string $Note=null,
/** @var string|null */
public ?string $Date=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Type'])) $this->Type = $o['Type'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['Date'])) $this->Date = $o['Date'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Type)) $o['Type'] = $this->Type;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->Date)) $o['Date'] = $this->Date;
return empty($o) ? new class(){} : $o;
}
}
class PmActivityResponse implements JsonSerializable
{
public function __construct(
/** @var array<PmActivityItem>|null */
public ?array $Activities=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Activities'])) $this->Activities = JsonConverters::fromArray('PmActivityItem', $o['Activities']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Activities)) $o['Activities'] = JsonConverters::toArray('PmActivityItem', $this->Activities);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class PmActivityRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Uid=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Uid'])) $this->Uid = $o['Uid'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Uid)) $o['Uid'] = $this->Uid;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/pm/project/activity HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Activities":[{"Type":"String","Name":"String","Status":"String","Note":"String","Date":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}