| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/project/{ProjectID}/dependencies |
|---|
import Foundation
import ServiceStack
public class JobDependencyCreateRequest : Codable
{
public var projectID:Int
public var predecessorJobID:Int
public var successorJobID:Int
public var dependencyType:String
public var lagDays:Int
required public init(){}
}
public class JobDependencyResponse : Codable
{
public var responseStatus:ResponseStatus
public var projectID:Int
public var dependencies:[JobDependency] = []
required public init(){}
}
public class JobDependency : Codable
{
public var jobDependencyID:Int
public var tenantId:String
public var projectID:Int
public var predecessorJobID:Int
public var successorJobID:Int
public var dependencyType:String
public var lagDays:Int
public var createdBy:String
public var createdAt:Date?
public var updatedAt:Date?
required public init(){}
}
Swift JobDependencyCreateRequest 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/project/{ProjectID}/dependencies HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ProjectID: 0,
PredecessorJobID: 0,
SuccessorJobID: 0,
DependencyType: String,
LagDays: 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
}
},
ProjectID: 0,
Dependencies:
[
{
JobDependencyID: 0,
TenantId: 00000000000000000000000000000000,
ProjectID: 0,
PredecessorJobID: 0,
SuccessorJobID: 0,
DependencyType: String,
LagDays: 0,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
]
}