| POST | /v4/collections |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CollectionsAPI.ServiceModel.V4.Requests
Imports CollectionsAPI.ServiceModel.V4.Responses
Imports CollectionsAPI.Contracts.V4.Responses
Namespace Global
Namespace CollectionsAPI.Contracts.V4.Responses
Public Interface IPostCollectionResponseData
Property Id As String
End Interface
End Namespace
Namespace CollectionsAPI.ServiceModel.V4.Requests
<DataContract>
Public Partial Class PostCollectionRequest
Inherits V4BaseRequest
Implements IPostCollectionRequest
<DataMember(Name:="title")>
Public Overridable Property Title As String Implements IPostCollectionRequest.Title
<DataMember(Name:="linkIds")>
Public Overridable Property LinkIds As IEnumerable(Of String) Implements IPostCollectionRequest.LinkIds
<DataMember(Name:="collectionSettingsId")>
Public Overridable Property CollectionSettingsId As String Implements IPostCollectionRequest.CollectionSettingsId
End Class
<DataContract>
Public Partial Class V4BaseRequest
End Class
End Namespace
Namespace CollectionsAPI.ServiceModel.V4.Responses
<DataContract>
Public Partial Class PostCollectionResponse
Inherits V4BaseResponse
Implements IPostCollectionResponse
<DataMember(Name:="data")>
Public Overridable Property Data As IPostCollectionResponseData Implements IPostCollectionResponse.Data
End Class
<DataContract>
Public Partial Class V4BaseResponse
<DataMember(Name:="status")>
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
End Namespace
VB.NET PostCollectionRequest DTOs
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.
POST /v4/collections HTTP/1.1
Host: collections-api-zane.dev.platform.georiot.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"title":"String","collectionSettingsId":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"status":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}