Comments (3)
I believe this is intentional. Typically, you might have only a page or two of repositories, but thousands of resources in each repo.
If you "GET /repositories/:repo_id/resources?all_ids=true” it will return a list of all of the resource id’s (and only the ids),
which you can then access individually, or as a set, for example: "http://localhost:8089/repositories/3/resources?id_set=3917,3924,3938”
You might file it as a bug that the API docs don’t note this explicitly.
— Steve Majewski
On Jan 30, 2015, at 9:15 PM, Misty De Meo [email protected] wrote:
I've noticed what seems to be a bug with the /repositories/:repo_id/resources endpoint in the API. I'm unable to retrieve a list of resources if I don't specify a page.
This endpoint is documented as taking no mandatory parameters (beyond the repository); however, when I attempt to use it, it fails with the response reporting missing parameters:
{
"error": {
"page": [
"Parameter required but no value provided"
],
"id_set": [
"Parameter required but no value provided"
],
"all_ids": [
"Parameter required but no value provided"
]
}
}
If I pass ?page=1, then the expected response is received. Other endpoints (for example, /repositories) don't make page mandatory, so I believe this may be a bug. I tested in ArchivesSpace 1.1.2.—
Reply to this email directly or view it on GitHub.
from archivesspace.
Hi,
Yeah, Steve is right. We recently updated YARD and I just realized some of
the templates for documentation aren't building correctly.
There is a paginated thing here.. you must either supply :page ( with an
optional :page_size param ), :id_set ( with a list of ids to return,
:max_page_size
is set in the AppConfig ), or :all_ids ( which just returns a listing of
all the ids ).
Will look into getting YARD to correctly build the REST endpoint docs.
Sorry about that. b,chris.
On Sat, Jan 31, 2015 at 12:36 PM, sdm7g [email protected] wrote:
I believe this is intentional. Typically, you might have only a page or
two of repositories, but thousands of resources in each repo.If you "GET /repositories/:repo_id/resources?all_ids=true” it will return
a list of all of the resource id’s (and only the ids),
which you can then access individually, or as a set, for example: "
http://localhost:8089/repositories/3/resources?id_set=3917,3924,3938”You might file it as a bug that the API docs don’t note this explicitly.
— Steve Majewski
On Jan 30, 2015, at 9:15 PM, Misty De Meo [email protected]
wrote:I've noticed what seems to be a bug with the
/repositories/:repo_id/resources endpoint in the API. I'm unable to
retrieve a list of resources if I don't specify a page.This endpoint is documented as taking no mandatory parameters (beyond
the repository); however, when I attempt to use it, it fails with the
response reporting missing parameters:{
"error": {
"page": [
"Parameter required but no value provided"
],
"id_set": [
"Parameter required but no value provided"
],
"all_ids": [
"Parameter required but no value provided"
]
}
}
If I pass ?page=1, then the expected response is received. Other
endpoints (for example, /repositories) don't make page mandatory, so I
believe this may be a bug. I tested in ArchivesSpace 1.1.2.—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHub
#129 (comment)
.
from archivesspace.
Updated the documentation to add the pagination parameters.
from archivesspace.
Related Issues (20)
- Upgrade ASpace Jetty Gem
- Upgrade JRuby and Rails Versions
- Migration 160 cannot be applied HOT 1
- Pull request 3044 -- ARG mismatch in ./proxy/Dockerfile and docker-compose-dist.yml/docker-compose-release.yml HOT 1
- Top Container Type does not always use translations from container_type enumeration
- Public assets application.scss does not import print.css correctly
- API Documentation for basic repository operations lightly misleading
- "Wanted type [Integer] but got '5'" Error when trying to run "POST" API
- Breadcrumbs failing to load when ancestor record lacks a title, which causes the search record page to not load (v3.4.1)
- Staff pagination summary sort buttons misbehavior
- Allow configuration of `indexConfig/lockType` in `solrconfig.xml`
- Changes to plugin `js.erb` files do not propagate to the PUI HOT 1
- Attempt to update object did not result in a single row modification HOT 6
- Reorder mode always active when editing resource tree HOT 3
- Collection organization tab hangs when using proxy prefixes HOT 6
- Unable to map the prefix with the domain HOT 4
- HTTPS XML namespaces are invalid
- Supporting multi-node, containerised deployments HOT 1
- Database query in `Trees` module can return differently ordered results in batches, corrupt EAD export HOT 1
- generate accession identifiers plugin will break in future releases due to removal of Sequence class HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archivesspace.