CollectionsAPI

<back to all web services

GetCollectionsRequest

Requires Authentication
The following routes are available for this service:
GET/v4/collections/list
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


@DataContract
open class GetCollectionsRequest : V4ListRequest()
{
}

@DataContract
open class V4ListRequest : V4PaginatedBaseRequest()
{
    @DataMember(Name="ids")
    @SerializedName("ids")
    open var ids:ArrayList<String>? = null
}

@DataContract
open class V4PaginatedBaseRequest : V4BaseRequest()
{
    @DataMember(Name="offset")
    @SerializedName("offset")
    open var offset:Int? = null

    @DataMember(Name="limit")
    @SerializedName("limit")
    open var limit:Int? = null
}

@DataContract
open class V4BaseRequest
{
}

@DataContract
open class GetCollectionsResponse : V4PaginatedBaseResponse(), IGetCollectionsResponse
{
    @DataMember(Name="data")
    @SerializedName("data")
    override var Data:ArrayList<IUserCollection>? = null
}

@DataContract
open class V4PaginatedBaseResponse : V4BaseResponse()
{
    @DataMember(Name="page")
    @SerializedName("page")
    open var page:V4PageObject? = null
}

@DataContract
open class V4BaseResponse
{
    @DataMember(Name="status")
    @SerializedName("status")
    open var responseStatus:ResponseStatus? = null
}

@DataContract
open class V4PageObject
{
    @DataMember(Name="offset")
    @SerializedName("offset")
    open var offset:Int? = null

    @DataMember(Name="limit")
    @SerializedName("limit")
    open var limit:Int? = null

    @DataMember(Name="totalRecords")
    @SerializedName("totalRecords")
    open var totalRecords:Int? = null
}

interface IUserCollection
{
    var id:String?
    var title:String?
    var linkIds:ArrayList<String>?
    var collectionSettingsId:String?
}

Kotlin GetCollectionsRequest DTOs

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

HTTP + OTHER

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/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
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"}}}