LOCKSS Repository Service REST API

API of the LOCKSS Repository REST Service
More information: https://www.lockss.org/
Contact Info: lockss-support@lockss.org
Version: 1.0.0
BasePath:/
BSD-3-Clause
https://www.lockss.org/support/open-source-license/

Access

Methods

[ Jump to Models ]

Table of Contents

Collections

Status

Collections

Up
post /collections/{collectionid}/artifacts
Create an artifact (createArtifact)

Path parameters

collectionid (required)
Path Parameter — Collection containing the artifact

Consumes

This API call consumes the following media types via the Content-Type request header:

Form parameters

auid (required)
Form Parameter — Archival Unit ID (AUID) of new artifact
uri (required)
Form Parameter — URI represented by this artifact
content (required)
Form Parameter — Content byte stream
aspectParts (optional)
Form Parameter — URI aspects represented by this artifact

Return type

artifact

Example data

Content-Type: application/json
{
  "auid" : "auid",
  "committed" : true,
  "id" : "id",
  "collection" : "collection",
  "uri" : "uri",
  "version" : 0,
  "storageUrl" : "storageUrl"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

201

Artifact created artifact

302

Duplicate content; artifact not created

400

Invalid input

401

Unauthorized request

403

Client not authorized to create artifacts

502

Internal error creating artifact

Up
delete /collections/{collectionid}/artifacts/{artifactid}
Remove an artifact from the repository (deleteArtifact)

Path parameters

collectionid (required)
Path Parameter — Collection containing the artifact
artifactid (required)
Path Parameter — Identifier of the artifact

Consumes

This API call consumes the following media types via the Content-Type request header:

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Successfully removed artifact

401

Unauthorized request

403

Client not authorized to delete artifact

404

Artifact not found

409

Cannot delete committed artifact

Up
get /collections/{collectionid}/artifacts/{artifactid}
Get artifact content and metadata (getArtifact)

Path parameters

collectionid (required)
Path Parameter — Collection containing the artifact
artifactid (required)
Path Parameter — Identifier of the artifact

Request headers

Return type

streamingResponseBody

Example data

Content-Type: application/json
{ }

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Artifact created streamingResponseBody

401

Unauthorized request

403

Client not authorized to retrieve artifact

404

Artifact not found

502

Could not read from external resource

Up
get /collections/{collectionid}/aus/{auid}/size
Get the size of Archival Unit artifacts in a collection (getArtifactsSize)

Path parameters

collectionid (required)
Path Parameter — Identifier of the collection containing the artifacts
auid (required)
Path Parameter — Identifier of the Archival Unit containing the artifacts

Query parameters

url (optional)
Query Parameter — The URL contained by the artifacts
urlPrefix (optional)
Query Parameter — The prefix to be matched by the artifact URLs
version (optional)
Query Parameter — The version of the URL contained by the artifacts

Return type

Long

Example data

Content-Type: application/json
0

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

The size of the artifacts Long

401

Unauthorized request

403

Client not authorized to retrieve data

404

Collection not found

502

Could not read from external resource

Up
get /collections/{collectionid}/aus
Get Archival Unit IDs (AUIDs) in a collection (getAus)

Path parameters

collectionid (required)
Path Parameter — Identifier of the collection containing the Archival Units

Return type

array[String]

Example data

Content-Type: application/json
[ "", "" ]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

401

Unauthorized request

403

Client not authorized to retrieve data

404

Collection not found

502

Could not read from external resource

Up
get /collections
Get collection identifiers of the committed artifacts in the repository (getCollections)

Return type

array[String]

Example data

Content-Type: application/json
[ "", "" ]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Status 200

Up
get /collections/{collectionid}/aus/{auid}/artifacts
Get committed artifacts in a collection and Archival Unit (getCommittedArtifacts)

Path parameters

collectionid (required)
Path Parameter — Identifier of the collection containing the artifacts
auid (required)
Path Parameter — Identifier of the Archival Unit containing the artifacts

Query parameters

url (optional)
Query Parameter — The URL contained by the artifacts
urlPrefix (optional)
Query Parameter — The prefix to be matched by the artifact URLs
version (optional)
Query Parameter — The version of the URL contained by the artifacts

Return type

array[artifact]

Example data

Content-Type: application/json
[ {
  "auid" : "auid",
  "committed" : true,
  "id" : "id",
  "collection" : "collection",
  "uri" : "uri",
  "version" : 0,
  "storageUrl" : "storageUrl"
}, {
  "auid" : "auid",
  "committed" : true,
  "id" : "id",
  "collection" : "collection",
  "uri" : "uri",
  "version" : 0,
  "storageUrl" : "storageUrl"
} ]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

The requested artifacts

401

Unauthorized request

403

Client not authorized to retrieve data

404

Collection not found

502

Could not read from external resource

Up
put /collections/{collectionid}/artifacts/{artifactid}
Update the committed property of an artifact (updateArtifact)

Path parameters

collectionid (required)
Path Parameter — Collection containing the artifact
artifactid (required)
Path Parameter — Identifier of the artifact

Consumes

This API call consumes the following media types via the Content-Type request header:

Form parameters

committed (optional)
Form Parameter — New commit status of artifact

Return type

artifact

Example data

Content-Type: application/json
{
  "auid" : "auid",
  "committed" : true,
  "id" : "id",
  "collection" : "collection",
  "uri" : "uri",
  "version" : 0,
  "storageUrl" : "storageUrl"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Artifact updated artifact

400

Invalid input

401

Unauthorized request

403

Client not authorized to update artifact

404

Artifact not found

Status

Up
get /status
Get the status of the service (getStatus)
Get the status of the service

Return type

apiStatus

Example data

Content-Type: application/json
{
  "ready" : true,
  "version" : "version"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

The status of the service apiStatus

401

Unauthorized

500

Internal Server Error

Models

[ Jump to Methods ]

Table of Contents

  1. apiStatus -
  2. artifact -
  3. streamingResponseBody -

apiStatus - Up

The status information of the service
version
String The version of the service
ready
Boolean The indication of whether the service is available

artifact - Up

id (optional)
collection (optional)
auid (optional)
uri (optional)
version (optional)
committed (optional)
storageUrl (optional)

streamingResponseBody - Up