Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Collections: Get accessible collections

Natasa Bulatovic edited this page Feb 3, 2016 · 4 revisions

##GET /collections/

  • Retrieves a list of collections accessible to the user (authorization optional).

###Parameters

  • q - Search query for Collections (see Search Query Syntax)
  • offset - display next "value-of-offset-parameter" collections in the search result
  • size - size of the list (20 is default)

####Example request curl http://<base-url-rest-api>/collections

####Example request with query curl http://<base-url-rest-api>/collections?q=test

####Response

{  
"query":"test",
"totalNumberOfResults":3,
"numberOfResults":3,
"offset":0,
"size":20,
"results":[  
    {  
        "id":"4ZXnBE2Tu7njLHXH",
        "createdBy":{  
            "fullname":"Admin, Imejity",
            "userId":"Bsz2j5Jg5lA86BBx"
        },
        "modifiedBy":{  
            "fullname":"Admin, Imejity",
            "userId":"Bsz2j5Jg5lA86BBx"
        },
        "createdDate":"2015-11-04T11:46:27 +0100",
        "modifiedDate":"2015-11-06T14:14:49 +0100",
        "versionDate":"",
        "status":"PENDING",
        "version":0,
        "discardComment":"",
        "title":"Test Collection of mine",
        "description":"Change collection description",
        "contributors":[  
            {  
                "id":"8SokLtyYOgVOEsyo",
                "familyName":"Admin",
                "givenName":"imeji",
                "completeName":"Admin, imeji",
                "alternativeName":"",
                "role":"",
                "identifiers":[  
                    {  
                        "type":"imeji",
                        "value":"mfd3vh79t19ov6Mk"
                    }
                ],
                "organizations":[  
                    {  
                        "id":"O5IaBwX2EBmt0ozx",
                        "name":"imeji community",
                        "description":"",
                        "identifiers":[  
                            {  
                                "type":"imeji",
                                "value":"ps3tGt4rWkVM4KRv"
                            }
                        ],
                        "city":"",
                        "country":""
                    }
                ]
            }
        ],
        "profile":{  
            "id":"beE5ZJkeBWDx6O",
            "method":""
        }
    },
    {  
        "id":"KflZJAOfkD9jpz",
        "createdBy":{  
            "fullname":"Admin, Imejity",
            "userId":"Bsz2j5Jg5lA86BBx"
        },
        "modifiedBy":{  
            "fullname":"Admin, Imejity",
            "userId":"Bsz2j5Jg5lA86BBx"
        },
        "createdDate":"2015-11-05T10:14:59 +0100",
        "modifiedDate":"2015-12-10T12:48:00 +0100",
        "versionDate":"",
        "status":"PENDING",
        "version":0,
        "discardComment":"",
        "title":"Test Collection New For Elastic test",
        "description":"",
        "contributors":[  
            {  
                "id":"UuONB4HlUtj_8uQe",
                "familyName":"Admin",
                "givenName":"imeji",
                "completeName":"Admin, imeji",
                "alternativeName":"",
                "role":"",
                "identifiers":[  
                    {  
                        "type":"imeji",
                        "value":"mfd3vh79t19ov6Mk"
                    }
                ],
                "organizations":[  
                    {  
                        "id":"9jcIpeHVYrw_ROyJ",
                        "name":"imeji community",
                        "description":"",
                        "identifiers":[  
                            {  
                                "type":"imeji",
                                "value":"ps3tGt4rWkVM4KRv"
                            }
                        ],
                        "city":"",
                        "country":""
                    }
                ]
            }
        ],
        "profile":{  
            "id":"32xdIhvRu6gJEiyr",
            "method":""
        }
    },
    {  
        "id":"bl4SGnubMJyzc1Jt",
        "createdBy":{  
            "fullname":"Admin, Imejity",
            "userId":"Bsz2j5Jg5lA86BBx"
        },
        "modifiedBy":{  
            "fullname":"Admin, Imejity",
            "userId":"Bsz2j5Jg5lA86BBx"
        },
        "createdDate":"2015-11-06T15:07:51 +0100",
        "modifiedDate":"2015-11-06T15:07:51 +0100",
        "versionDate":"",
        "status":"PENDING",
        "version":0,
        "discardComment":"",
        "title":"TEst Nutzer",
        "description":"",
        "contributors":[  
            {  
                "id":"JQAd6CLp5_8g7J2C",
                "familyName":"Admin",
                "givenName":"Imejity",
                "completeName":"Admin, Imejity",
                "alternativeName":"",
                "role":"",
                "identifiers":[  
                    {  
                        "type":"imeji",
                        "value":"mfd3vh79t19ov6Mk"
                    }
                ],
                "organizations":[  
                    {  
                        "id":"pLDejfHY2F2hbMlA",
                        "name":"imeji community",
                        "description":"",
                        "identifiers":[  
                            {  
                                "type":"imeji",
                                "value":"ps3tGt4rWkVM4KRv"
                            }
                        ],
                        "city":"",
                        "country":""
                    }
                ]
            }
        ],
        "profile":{  
            "id":"1cmJ7i_LqMvXBdiq",
            "method":""
        }
    }
]

}

####Response status codes

  • 200 OK Successful GET and a list of collections contains at least one collection
Clone this wiki locally