CollectionsAPI

<back to all web services

GetCollectionsRequest

Requires Authentication
The following routes are available for this service:
GET/v4/collections/list
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.DTOs

Namespace Global

    Namespace CollectionsAPI.Contracts.DTOs

        Public Interface IUserCollection
            Property Id As String
            Property Title As String
            Property LinkIds As IEnumerable(Of String)
            Property CollectionSettingsId As String
        End Interface
    End Namespace

    Namespace CollectionsAPI.ServiceModel.V4.Requests

        <DataContract>
        Public Partial Class GetCollectionsRequest
            Inherits V4ListRequest
        End Class

        <DataContract>
        Public Partial Class V4BaseRequest
        End Class

        <DataContract>
        Public Partial Class V4ListRequest
            Inherits V4PaginatedBaseRequest
            <DataMember(Name:="ids")>
            Public Overridable Property Ids As List(Of String)
        End Class

        <DataContract>
        Public Partial Class V4PaginatedBaseRequest
            Inherits V4BaseRequest
            <DataMember(Name:="offset")>
            Public Overridable Property Offset As Integer

            <DataMember(Name:="limit")>
            Public Overridable Property Limit As Integer
        End Class
    End Namespace

    Namespace CollectionsAPI.ServiceModel.V4.Responses

        <DataContract>
        Public Partial Class GetCollectionsResponse
            Inherits V4PaginatedBaseResponse
            Implements IGetCollectionsResponse
            <DataMember(Name:="data")>
            Public Overridable Property Data As IEnumerable(Of IUserCollection) Implements IGetCollectionsResponse.Data
        End Class

        <DataContract>
        Public Partial Class V4BaseResponse
            <DataMember(Name:="status")>
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class

        <DataContract>
        Public Partial Class V4PageObject
            <DataMember(Name:="offset")>
            Public Overridable Property Offset As Integer

            <DataMember(Name:="limit")>
            Public Overridable Property Limit As Integer

            <DataMember(Name:="totalRecords")>
            Public Overridable Property TotalRecords As Integer
        End Class

        <DataContract>
        Public Partial Class V4PaginatedBaseResponse
            Inherits V4BaseResponse
            <DataMember(Name:="page")>
            Public Overridable Property Page As V4PageObject
        End Class
    End Namespace
End Namespace

VB.NET GetCollectionsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v4/collections/list HTTP/1.1 
Host: collections-api-zane.dev.platform.georiot.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"page":{"offset":0,"limit":0,"totalRecords":0},"status":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}