Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdf_url in @search Endpoint #5618

jone opened this issue May 2, 2019 · 2 comments


None yet
3 participants
Copy link

commented May 2, 2019

Harvest: Projekt - Umsetzung GEVER-RIS - Entwicklung

Im @listing Endpoint stehen auf Dokumenten die Infos thumbnail_url, preview_url und pdf_url.
Diese Infos stehen im @search Endpoint nicht zur Verfügung.
Wenn bei einem @search-Request metadata_fields=pdf_url, erscheint ein pdf_url Eintrag im Item des Dokuments, es ist aber immer None.

Im Projekt RIS möchten wir die Performance verbessern, indem wir die Dokumente mehrerer Dossiers im gleichen Request abholen. Details und ein RIS Code-Beispiel sind hier zu finden: 4teamwork/ris#841

@jone jone changed the title pdf_url in @search Endopint pdf_url in @search Endpoint May 2, 2019

@jone jone added the RIS label May 6, 2019


This comment has been minimized.

Copy link

commented May 8, 2019

Hi @jone, @sebastianmanger ich denke in eurem Fall könntet ihr den full_objects Parameter des @search Endpoints verwenden, siehe So stehen euch alle Informationen zur Verfügung, insbesondere auch die pdf_url. Ich vermute das in eurem Fall das fetchen der Objects Performance-technisch ok wäre. Könnt ihr das bitte prüfen und Feedback geben?

@phgross phgross assigned jone and unassigned phgross May 8, 2019


This comment has been minimized.

Copy link

commented May 8, 2019

Perfekt, das läuft!

    from pprint import pprint
    from ris.gever import GeverApiClient
    gever_url = ""
    dossier_paths = [

    columns = ["title", "modified", "filename", "mimetype", "checked_out", "bumblebee_checksum", "pdf_url"]

    client = GeverApiClient(gever_url, "hugo.boss")
    response = client.session().get(
        params=[("portal_type", "opengever.document.document")]
        + [("path.query", path) for path in dossier_paths]
        + [("metadata_fields", name) for name in columns]
        + [("b_size", 100000000000000)]
        + [("fullobjects", 1)],

Response, mit pdf_url

{'@components': {'actions': {'@id': ''},
                 'breadcrumbs': {'@id': ''},
                 'navigation': {'@id': ''},
                 'workflow': {'@id': ''}},
 '@id': '',
 '@type': 'opengever.document.document',
 'UID': '9224caa8f5f041d4b450221d87ab4a80',
 'allow_discussion': False,
 'archival_file_state': None,
 'bumblebee_checksum': '934dd3e4da00fe3e33c45155be80217f075cf16dea010d01310d4849e2b2554c',
 'changeNote': '',
 'changed': '2019-01-23T16:22:05+00:00',
 'classification': 'unprotected',
 'created': '2019-01-23T16:22:05+00:00',
 'delivery_date': None,
 'description': '',
 'digitally_available': True,
 'document_author': None,
 'document_date': '2019-01-23',
 'document_type': None,
 'file': {'content-type': 'application/pdf',
          'download': '',
          'filename': 'serie01-loesung.pdf',
          'size': 288053},
 'foreign_reference': None,
 'id': 'document-72',
 'is_folderish': False,
 'keywords': [],
 'layout': 'tabbed_view',
 'modified': '2019-01-23T16:22:05+00:00',
 'parent': {'@id': '',
            '@type': 'opengever.dossier.businesscasedossier',
            'description': '',
            'review_state': 'dossier-state-active',
            'title': 'Vereidigung der Regierung'},
 'pdf_url': '',
 'preserved_as_paper': True,
 'preview': None,
 'preview_url': '',
 'privacy_layer': 'privacy_layer_no',
 'public_trial': 'unchecked',
 'public_trial_statement': '',
 'receipt_date': None,
 'reference_number': 'KR 9.0 / 5 / 72',
 'relatedItems': [],
 'relative_path': 'ordnungssystem/lokale-entwicklung/geschaefte/dossier-70/document-72',
 'review_state': 'document-state-draft',
 'thumbnail': None,
 'thumbnail_url': '',
 'title': 'serie01-loesung',
 'version': 'current'}

@jone - Ich schau, dass ich den PR 4teamwork/ris#845 noch anpasse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.