| POST | /v1/projectlocation/attachment |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
open class ProjectLocationAttachmentRequest
{
open var ProjectLocationID:Int? = null
open var ProjectLocationAreaID:Int? = null
open var Kind:String? = null
open var DocTitle:String? = null
}
open class ProjectLocationResponse
{
open var Locations:ArrayList<ProjectLocation> = ArrayList<ProjectLocation>()
open var Areas:ArrayList<ProjectLocationArea> = ArrayList<ProjectLocationArea>()
open var Equipment:ArrayList<ProjectLocationEquipment> = ArrayList<ProjectLocationEquipment>()
open var SiteDetails:ArrayList<ProjectLocationSiteDetail> = ArrayList<ProjectLocationSiteDetail>()
open var Attachments:ArrayList<ProjectLocationAttachment> = ArrayList<ProjectLocationAttachment>()
open var SiteDetail:ProjectLocationSiteDetail? = null
open var ResponseStatus:ResponseStatus? = null
}
open class ProjectLocation
{
open var ProjectLocationID:Int? = null
open var ProjectID:Int? = null
open var Name:String? = null
open var Address1:String? = null
open var Address2:String? = null
open var City:String? = null
open var State:String? = null
open var Zip:String? = null
open var Latitude:BigDecimal? = null
open var Longitude:BigDecimal? = null
open var TotalArea:BigDecimal? = null
open var AreaUnit:String? = null
open var AccessInstructions:String? = null
open var IsPrimary:Boolean? = null
open var DisplayOrder:Int? = null
open var Active:Boolean? = null
open var CreatedBy:String? = null
open var CreatedAt:Date? = null
open var UpdatedAt:Date? = null
open var Areas:ArrayList<ProjectLocationArea> = ArrayList<ProjectLocationArea>()
open var Equipment:ArrayList<ProjectLocationEquipment> = ArrayList<ProjectLocationEquipment>()
open var SiteDetails:ArrayList<ProjectLocationSiteDetail> = ArrayList<ProjectLocationSiteDetail>()
open var Attachments:ArrayList<ProjectLocationAttachment> = ArrayList<ProjectLocationAttachment>()
}
open class ProjectLocationArea
{
open var ProjectLocationAreaID:Int? = null
open var ProjectLocationID:Int? = null
open var Name:String? = null
open var Measurement:BigDecimal? = null
open var MeasurementUnit:String? = null
open var Notes:String? = null
open var DisplayOrder:Int? = null
open var Active:Boolean? = null
open var CreatedBy:String? = null
open var CreatedAt:Date? = null
open var UpdatedAt:Date? = null
}
open class ProjectLocationEquipment
{
open var ProjectLocationEquipmentID:Int? = null
open var ProjectLocationID:Int? = null
open var Name:String? = null
open var Description:String? = null
open var Manufacturer:String? = null
open var Model:String? = null
open var SerialNumber:String? = null
open var AssetTag:String? = null
open var Notes:String? = null
open var Active:Boolean? = null
open var CreatedBy:String? = null
open var CreatedAt:Date? = null
open var UpdatedAt:Date? = null
}
open class ProjectLocationSiteDetail
{
open var ProjectLocationSiteDetailID:Int? = null
open var ProjectLocationID:Int? = null
open var DetailType:String? = null
open var Label:String? = null
open var Value:String? = null
open var IsSensitive:Boolean? = null
open var EncVersion:Int? = null
open var HasValue:Boolean? = null
open var Notes:String? = null
open var DisplayOrder:Int? = null
open var Active:Boolean? = null
open var CreatedBy:String? = null
open var CreatedAt:Date? = null
open var UpdatedAt:Date? = null
}
open class ProjectLocationAttachment
{
open var ProjectLocationAttachmentID:Int? = null
open var ProjectLocationID:Int? = null
open var ProjectLocationAreaID:Int? = null
open var Kind:String? = null
open var DocTitle:String? = null
open var FileName:String? = null
open var Url:String? = null
open var MimeType:String? = null
open var UploadDate:Date? = null
open var UploadedBy:String? = null
open var Active:Boolean? = null
}
Kotlin ProjectLocationAttachmentRequest 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/projectlocation/attachment HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ProjectLocationID: 0,
ProjectLocationAreaID: 0,
Kind: String,
DocTitle: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Locations:
[
{
ProjectLocationID: 0,
ProjectID: 0,
Name: String,
Address1: String,
Address2: String,
City: String,
State: String,
Zip: String,
Latitude: 0,
Longitude: 0,
TotalArea: 0,
AreaUnit: String,
AccessInstructions: String,
IsPrimary: False,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01,
Areas:
[
{
ProjectLocationAreaID: 0,
ProjectLocationID: 0,
Name: String,
Measurement: 0,
MeasurementUnit: String,
Notes: String,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
Equipment:
[
{
ProjectLocationEquipmentID: 0,
ProjectLocationID: 0,
Name: String,
Description: String,
Manufacturer: String,
Model: String,
SerialNumber: String,
AssetTag: String,
Notes: String,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
SiteDetails:
[
{
ProjectLocationSiteDetailID: 0,
ProjectLocationID: 0,
DetailType: String,
Label: String,
Value: String,
IsSensitive: False,
EncVersion: 0,
HasValue: False,
Notes: String,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
Attachments:
[
{
ProjectLocationAttachmentID: 0,
ProjectLocationID: 0,
ProjectLocationAreaID: 0,
Kind: String,
DocTitle: String,
FileName: String,
Url: String,
MimeType: String,
UploadDate: 0001-01-01,
UploadedBy: String,
Active: False
}
]
}
],
Areas:
[
{
ProjectLocationAreaID: 0,
ProjectLocationID: 0,
Name: String,
Measurement: 0,
MeasurementUnit: String,
Notes: String,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
Equipment:
[
{
ProjectLocationEquipmentID: 0,
ProjectLocationID: 0,
Name: String,
Description: String,
Manufacturer: String,
Model: String,
SerialNumber: String,
AssetTag: String,
Notes: String,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
SiteDetails:
[
{
ProjectLocationSiteDetailID: 0,
ProjectLocationID: 0,
DetailType: String,
Label: String,
Value: String,
IsSensitive: False,
EncVersion: 0,
HasValue: False,
Notes: String,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
}
],
Attachments:
[
{
ProjectLocationAttachmentID: 0,
ProjectLocationID: 0,
ProjectLocationAreaID: 0,
Kind: String,
DocTitle: String,
FileName: String,
Url: String,
MimeType: String,
UploadDate: 0001-01-01,
UploadedBy: String,
Active: False
}
],
SiteDetail:
{
ProjectLocationSiteDetailID: 0,
ProjectLocationID: 0,
DetailType: String,
Label: String,
Value: String,
IsSensitive: False,
EncVersion: 0,
HasValue: False,
Notes: String,
DisplayOrder: 0,
Active: False,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}