Giter Club home page Giter Club logo

Comments (3)

sdm7g avatar sdm7g commented on September 7, 2024

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.

cfitz avatar cfitz commented on September 7, 2024

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.

cfitz avatar cfitz commented on September 7, 2024

Updated the documentation to add the pagination parameters.

from archivesspace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.