Collection objects are grouped into artistic movements. An object may have more than one movement
| Endpoint | Description | Returns |
|---|---|---|
| /movements | Index of movements | Array of Movement objects |
| /movements/{id} | Retrieve movement with corresponding `id` | One Movement object |
Returns an all movements in the collection as an array of Movement objects.
Each Movement has a paginated objects resource.
| Parameter | Req'd? | Description |
|---|---|---|
| per_page | optional | The maximum number of items on to return on each page (Default 5, maximum 100). |
| no_objects | optional | If set to any value, return only a count of the total number
of objects in each movement. This option overrides
page and per_page. |
Request:
curl http://api.guggenheim.org/movements?no_objects=1
Response:
{
"_links":{
"item":{
"href":"http://api.guggenheim.org/movements/{id}"
},
"_self":{
"href":"http://api.guggenheim.org/movements"
}
},
"movements":[
{
"objects":{
"total_count":42
},
"_links":{
"_self":{
"href":"http://api.guggenheim.org/movements/195203"
}
},
"name":"Abstract Expressionism",
"id":195203
},
{
"objects":{
"total_count":9
},
"_links":{
"_self":{
"href":"http://api.guggenheim.org/movements/195204"
}
},
"name":"Art Brut",
"id":195204
},
{
"objects":{
"total_count":17
},
"_links":{
"_self":{
"href":"http://api.guggenheim.org/movements/195205"
}
},
"name":"Art Informel",
"id":195205
},
{...},
{...},
...
]
}
Returns the Movement specified by the id.
| Parameter | Req'd? | Description | |
|---|---|---|---|
| page | optional | The page of the paginated objects resource to return (default 1). | |
| per_page | optional | The maximum number of items on to return on each page (default 20, maximum 100). | 5 |
| no_objects | optional | If set to any value, return only a count of the total number
of objects. This option overrides
page and per_page. |
Request:
curl http://api.guggenheim.org/movements/195203
Response:
{
"id":195203,
"name":"Abstract Expressionism",
"objects":{
"items": [
{...},
{...},
...
],
"count":20,
"page":1,
"pages":3,
"total_count":42,
"items_per_page":20
},
"_links":{
"next":{
"href":"http://api.guggenheim.org:8081/movements/195203?page=2&per_page=20"
},
"_self":{
"href":"http://api.guggenheim.org:8081/movements/195203"
}
}
}
| Field | Type | Req'd? | Description |
|---|---|---|---|
| id | number | REQUIRED | Unique ID number for the movement |
| name | string | REQUIRED | Name of the movement |
| objects | object | REQUIRED | A paginated objects object |
| _links | object | REQUIRED | A links object |