Changeset View
Changeset View
Standalone View
Standalone View
swh/web/api/views/identifiers.py
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | def api_resolve_swh_pid(request, swh_id): | ||||
swh_id_data = swh_id_parsed._asdict() | swh_id_data = swh_id_parsed._asdict() | ||||
swh_id_data['browse_url'] = request.build_absolute_uri( | swh_id_data['browse_url'] = request.build_absolute_uri( | ||||
swh_id_resolved['browse_url']) | swh_id_resolved['browse_url']) | ||||
return swh_id_data | return swh_id_data | ||||
@api_route(r'/known/', | @api_route(r'/known/', | ||||
'api-1-swh-pid-known', methods=['POST']) | 'api-1-swh-pid-known', methods=['POST']) | ||||
@api_doc('/known/', noargs=True, tags=['hidden']) | @api_doc('/known/', tags=['hidden']) | ||||
@format_docstring() | @format_docstring() | ||||
def api_swh_pid_known(request): | def api_swh_pid_known(request): | ||||
""" | """ | ||||
.. http:post:: /api/1/known/ | .. http:post:: /api/1/known/ | ||||
Check if a list of Software Heritage persistent identifier is present | Check if a list of Software Heritage persistent identifier is present | ||||
in the archive depending on their id (sha1_git). | in the archive depending on their id (sha1_git). | ||||
Show All 22 Lines |