| POST,OPTIONS | /v1/safety/talks |
|---|
export class SafetyTalkLib
{
public SafetyTalkLibraryID: number;
public SafetyTalkLibraryUID: string;
public Title: string;
public Kind: string;
public Category: string;
public Body: string;
public MediaUrl: string;
public DurationMinutes?: number;
public Active: boolean;
public AssignmentCount: number;
public constructor(init?: Partial<SafetyTalkLib>) { (Object as any).assign(this, init); }
}
export class SafetyTalkLibResponse
{
public ResponseStatus: ResponseStatus;
public Talks: SafetyTalkLib[] = [];
public constructor(init?: Partial<SafetyTalkLibResponse>) { (Object as any).assign(this, init); }
}
export class SafetyTalkLibCreateRequest
{
public Title: string;
public Kind: string;
public Category: string;
public Body: string;
public MediaUrl: string;
public DurationMinutes?: number;
public constructor(init?: Partial<SafetyTalkLibCreateRequest>) { (Object as any).assign(this, init); }
}
TypeScript SafetyTalkLibCreateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/safety/talks HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Title: String,
Kind: String,
Category: String,
Body: String,
MediaUrl: String,
DurationMinutes: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Talks:
[
{
SafetyTalkLibraryID: 0,
SafetyTalkLibraryUID: String,
Title: String,
Kind: String,
Category: String,
Body: String,
MediaUrl: String,
DurationMinutes: 0,
Active: False,
AssignmentCount: 0
}
]
}