We use the Dublin Core meaning for what a Resource represents: “…a resource is anything that has identity. Familiar examples include an electronic document, an image, a service (e.g., ”today's weather report for Los Angeles“), and a collection of other resources. Not all resources are network ”retrievable“; e.g., human beings, corporations, and bound books in a library can also be considered resources.”
curl -H 'Authorization: CHANGEME' http://localhost:10000/api/v1/organizations/1/resources/ | jsonlint { "data": [ { "id": "t.y.f.f.s.h.,_2011_929d", "type": "resource", "attributes": { "title": "T.Y.F.F.S.H., 2011", "resource_type": "still_image", "canonical_id": "c4ca4238a0b923820dcc509a6f75849b", "source_uri": "https://coyote.pics/wp-content/uploads/2016/02/Screen-Shot-2016-02-29-at-10.05.14-AM-1024x683.png", "created_at": "2017-11-06T16:17:49.630Z", "updated_at": "2017-11-06T16:55:10.207Z", "resource_group": "collection" }, "relationships": { "organization": { "data": { "type": "organization", "id": "1" } }, "representations": { "data": [ { "type": "representation", "id": "1" } ] } } }, { "id": "mona_lisa_48f9", "type": "resource", "attributes": { "title": "Mona Lisa", "resource_type": "still_image", "canonical_id": "c81e728d9d4c2f636f067f89cc14862c", "source_uri": "http://example.com/image123.png", "created_at": "2017-11-06T16:17:49.926Z", "updated_at": "2017-11-06T16:17:49.926Z", "resource_group": "voluptatibus" }, "relationships": { "organization": { "data": { "type": "organization", "id": "1" } }, "representations": { "data": [] } } } ], "included": [ { "id": "1", "type": "organization", "attributes": { "title": "Acme Museum" } }, { "id": "1", "type": "representation", "attributes": { "status": "approved", "content_uri": null, "content_type": "text/plain", "language": "en", "text": "A red, white, and blue fabric canopy presses against walls of room; portable fans blow air into the room through a doorway.", "created_at": "2017-11-06T16:17:49.811Z", "updated_at": "2017-11-06T16:19:23.998Z", "metum": "Short", "author": "effie.boyle@carroll.org", "license": "Et quo dignissimos ex. Non optio minima eum qui. Placeat adipisci id omnis amet rem pariatur." }, "relationships": { "resource": { "meta": { "included": false } } }, "links": { "self": null } } ], "links": { "self": "http://localhost:10000/api/v1/organizations/1/resources", "first": "http://localhost:10000/api/v1/organizations/1/resources?page%5Bnumber%5D=1\u0026page%5Bsize%5D=50" }, "jsonapi": { "version": "1.0" } TEST
Param name | Description |
---|---|
page[number] optional |
Identifies the page of results to retrieve, numbered starting at 1 Validations:
|
page[size] optional |
How many records to return per page Validations:
|
filter optional |
Validations:
|
filter[identifier_or_title_or_representations_text_cont_all] optional |
Search Resource identifier, title, or associated Representation text for this value Validations:
|
filter[scope] optional |
Limit search to Resources in these states Validations:
|
curl -H 'Authorization: CHANGEME' http://localhost:10000/api/v1/resources/1 | jsonlint { "data": { "id": "1", "type": "resource", "attributes": { "id": 1, "title": "T.Y.F.F.S.H., 2011", "resource_type": "still_image", "canonical_id": "c4ca4238a0b923820dcc509a6f75849b", "source_uri": "https://coyote.pics/wp-content/uploads/2016/02/Screen-Shot-2016-02-29-at-10.05.14-AM-1024x683.png", "created_at": "2017-11-06T16:17:49.630Z", "updated_at": "2017-11-06T16:55:10.207Z", "resource_group": "collection" }, "relationships": { "organization": { "data": { "type": "organization", "id": "1" } }, "representations": { "data": [ { "type": "representation", "id": "1" } ] } } }, "included": [ { "id": "1", "type": "organization", "attributes": { "title": "Acme Museum" } }, { "id": "1", "type": "representation", "attributes": { "status": "approved", "content_uri": null, "content_type": "text/plain", "language": "en", "text": "A red, white, and blue fabric canopy presses against walls of room; portable fans blow air into the room through a doorway.", "created_at": "2017-11-06T16:17:49.811Z", "updated_at": "2017-11-06T16:19:23.998Z", "metum": "Short", "author": "effie.boyle@carroll.org", "license": "Et quo dignissimos ex. Non optio minima eum qui. Placeat adipisci id omnis amet rem pariatur." }, "relationships": { "resource": { "meta": { "included": false } } }, "links": { "self": null } } ], "jsonapi": { "version": "1.0" } }
Param name | Description |
---|---|
resource optional , nil allowed |
Validations:
|
resource[id] required |
Resource ID Validations:
|
resource[identifier] required |
Unique human-readable identifier (slug) for this resource Validations:
|
resource[title] optional , nil allowed |
Caption that helps humans identify the resource Validations:
|
resource[resource_type] required |
Dublin Core Metadata type for this resource Validations:
|
resource[canonical_id] required |
Unique identifier assigned by the organization that owns this resource Validations:
|
resource[source_uri] optional , nil allowed |
The canonical location of the resource Validations:
|
resource[resource_group] required |
Identifies the organizationl resource_group to which this resource belongs Validations:
|
resource[organization_id] required |
Identifies which organization owns the resource Validations:
|