Get collection list
Description
Retrieve a list of collections
Url
|
1 |
GET /api/v0/collection/ |
Parameters optional
- name: filter by this exact match.
- name__contains: filter by case-sensitive containment.
Example
Request
|
1 |
curl 'https://my.craftar.net/api/v0/collection/?api_key=123456789abcdefghijk123456789abcdefghijk' |
Response
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
{ "objects": [ { "uuid": "440c374d09424243b9448cd289545db1", "resource_uri": "/api/v0/collection/440c374d09424243b9448cd289545db1/", "name": "My magazines" }, { "uuid": "806e54535ffd464f83545c902e664aca", "resource_uri": "/api/v0/collection/806e54535ffd464f83545c902e664aca/", "name": "My paintings" } ], "meta": { "total_count": 2, "previous": null, "offset": 0, "next": null, "limit": 20 } } |
Get collections whose name is exactly "My paintings"
Request
|
1 |
curl 'https://my.craftar.net/api/v0/collection/?name=My+paintings&api_key=123456789abcdefghijk123456789abcdefghijk' |
Response
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
{ "objects": [ { "uuid": "806e54535ffd464f83545c902e664aca", "resource_uri": "/api/v0/collection/806e54535ffd464f83545c902e664aca/", "name": "My paintings" } ], "meta": { "total_count": 1, "previous": null, "offset": 0, "next": null, "limit": 20 } } |
Get collections whose name contains "My"
Request
|
1 |
curl 'https://my.craftar.net/api/v0/collection/?name__contains=My&api_key=123456789abcdefghijk123456789abcdefghijk' |
Response
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
{ "objects": [ { "uuid": "440c374d09424243b9448cd289545db1", "resource_uri": "/api/v0/collection/440c374d09424243b9448cd289545db1/", "name": "My magazines" }, { "uuid": "806e54535ffd464f83545c902e664aca", "resource_uri": "/api/v0/collection/806e54535ffd464f83545c902e664aca/", "name": "My paintings" } ], "meta": { "total_count": 2, "previous": null, "offset": 0, "next": null, "limit": 20 } } |