LOCKSS Repository Service REST API
REST API of the LOCKSS Repository Service
Version: 2.0.0
BasePath:/
BSD-3-Clause
https://opensource.org/licenses/BSD-3-Clause
Access
[ Jump to Models ]
Table of Contents
Imports artifacts from an archive (addArtifacts)
Consumes
This API call consumes the following media types via the request header:
Query parameters
namespace (optional)
Query Parameter — Namespace of the artifacts default: lockss
storeDuplicate (optional)
Query Parameter — If true, artifacts with duplicate content will be stored, otherwise suppressed default: false
excludeStatusPattern (optional)
Query Parameter — If supplied, WARC records whose HTTP response status code matches the regular expression will not be imported
Form parameters
auid (required)
Form Parameter —
archive (required)
Form Parameter — format: binary
Return type
byte[]
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
Status of artifacts imported from the archive, maybe partially. Return body is a sequence of JSON ImportStatus objects.
byte[]
400
Invalid input
401
Unauthorized request
403
Client not authorized to create artifacts
502
Internal error creating artifact
Create an artifact (createArtifact)
Consumes
This API call consumes the following media types via the request header:
Form parameters
artifactProps (required)
Form Parameter —
httpResponseHeader (required)
Form Parameter —
payload (required)
Form Parameter — format: binary
Return type
Example data
Content-Type: application/json
{
"committed" : true,
"storageUrl" : "storageUrl"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the 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 /artifacts/{uuid}
Remove an artifact from the repository (deleteArtifact)
Path parameters
uuid (required)
Path Parameter — Identifier of the artifact
Query parameters
namespace (optional)
Query Parameter — Namespace of the artifacts default: lockss
Responses
200
Successfully removed artifact
401
Unauthorized request
403
Client not authorized to delete artifact
404
Artifact not found
409
Cannot delete artifact
Get artifact and metadata (getArtifactDataByMultipart)
Path parameters
uuid (required)
Path Parameter — Identifier of the artifact
Query parameters
namespace (optional)
Query Parameter — Namespace of the artifacts default: lockss
includeContent (optional)
Query Parameter — Controls whether to include the artifact content part in multipart response default: ALWAYS
Return type
byte[]
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
multipart/form-data
application/json
Responses
200
Multipart/form-data containing the following parts: The artifact properties, HTTP status and headers if present, and the artifact's payload if requested. See POST /artifacts for more information.
byte[]
401
Unauthorized request
403
Client not authorized to retrieve artifact
404
Artifact not found
500
Internal Server Error
502
Could not read from external resource
Up
get /artifacts/{uuid}/payload
Get artifact payload (getArtifactDataByPayload)
Path parameters
uuid (required)
Path Parameter — Identifier of the artifact
Query parameters
namespace (optional)
Query Parameter — Namespace of the artifacts default: lockss
includeContent (optional)
Query Parameter — Controls whether to include the artifact content part in multipart response default: ALWAYS
Return type
byte[]
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
Artifact's payload
byte[]
401
Unauthorized request
403
Client not authorized to retrieve artifact
404
Artifact not found
500
Internal Server Error
502
Could not read artifact
Up
get /artifacts/{uuid}/response
Get artifact data as HTTP response (getArtifactDataByResponse)
Path parameters
uuid (required)
Path Parameter — Identifier of the artifact
Query parameters
namespace (optional)
Query Parameter — Namespace of the artifacts default: lockss
includeContent (optional)
Query Parameter — Controls whether to include the artifact content part in multipart response default: ALWAYS
Return type
byte[]
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
application/http;msgtype=response
Responses
200
Artifact's payload
byte[]
401
Unauthorized request
403
Client not authorized to retrieve artifact
404
Artifact not found
500
Internal Server Error
502
Could not read artifact
Up
get /aus/{auid}/artifacts
Get artifacts in an Archival Unit (getArtifacts)
Get a list of all artifacts in a namespace and Archival Unit or a pageful of the list defined by the continuation token and size
Path parameters
auid (required)
Path Parameter — Identifier of the Archival Unit containing the artifacts
Query parameters
namespace (optional)
Query Parameter — Namespace of the artifacts default: lockss
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 artifact
includeUncommitted (optional)
Query Parameter — Indication of whether uncommitted artifacts should be returned
limit (optional)
Query Parameter — The requested maximum number of artifacts per response
continuationToken (optional)
Query Parameter — The continuation token of the next page of artifacts to be returned
Return type
Example data
Content-Type: application/json
{
"pageInfo" : {
"curLink" : "curLink",
"resultsPerPage" : 6,
"totalCount" : 0,
"continuationToken" : "continuationToken",
"nextLink" : "nextLink"
},
"artifacts" : [ {
"committed" : true,
"storageUrl" : "storageUrl"
}, {
"committed" : true,
"storageUrl" : "storageUrl"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The requested artifacts
artifactPageInfo
401
Unauthorized request
403
Client not authorized to retrieve data
404
AUID not found in namespace
502
Could not read from external resource
Returns all artifacts that match a given a URL or URL prefix and/or version. (getArtifactsFromAllAus)
Query parameters
namespace (optional)
Query Parameter — Namespace of the artifacts default: lockss
url (optional)
Query Parameter — The URL contained by the artifacts
urlPrefix (optional)
Query Parameter — The prefix to be matched by the artifact URLs
versions (optional)
Query Parameter — Versions of the artifacts to return default: all
limit (optional)
Query Parameter — The requested maximum number of artifacts per response
continuationToken (optional)
Query Parameter — The continuation token of the next page of artifacts to be returned
Return type
Example data
Content-Type: application/json
{
"pageInfo" : {
"curLink" : "curLink",
"resultsPerPage" : 6,
"totalCount" : 0,
"continuationToken" : "continuationToken",
"nextLink" : "nextLink"
},
"artifacts" : [ {
"committed" : true,
"storageUrl" : "storageUrl"
}, {
"committed" : true,
"storageUrl" : "storageUrl"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The requested artifacts
artifactPageInfo
401
Unauthorized request
403
Client not authorized to retrieve data
404
Collection not found
502
Could not read from external resource
Update the property of an artifact (updateArtifact)
Path parameters
uuid (required)
Path Parameter — Identifier of the artifact
Consumes
This API call consumes the following media types via the request header:
Query parameters
namespace (optional)
Query Parameter — Namespace of the artifacts default: lockss
Form parameters
committed (required)
Form Parameter —
Return type
Example data
Content-Type: application/json
{
"committed" : true,
"storageUrl" : "storageUrl"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
Artifact updated
artifact
400
Invalid input
401
Unauthorized request
403
Client not authorized to update artifact
404
Artifact not found
Get the size of Archival Unit artifacts in a namespace (getArtifactsSize)
Path parameters
auid (required)
Path Parameter — Identifier of the Archival Unit containing the artifacts
Query parameters
namespace (optional)
Query Parameter — Namespace of the artifacts default: lockss
Return type
Example data
Content-Type: application/json
{
"totalLatestVersions" : 0,
"totalWarcSize" : 1,
"totalAllVersions" : 6
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
Returns an AuSize containing the sizes of all the artifacts, only the latest artifact version of all URLs, and the sum of the size of all the underlying WARC files, of an AU.
auSize
401
Unauthorized request
403
Client not authorized to retrieve data
404
AUID not found in namespace
502
Could not read from external resource
Get Archival Unit IDs (AUIDs) in a namespace (getAus)
Get a list of all Archival Unit identifiers in a namespace or a pageful of the list defined by the continuation token and size
Query parameters
namespace (optional)
Query Parameter — Namespace of the artifacts default: lockss
limit (optional)
Query Parameter — The requested maximum number of Archival Unit identifiers per response
continuationToken (optional)
Query Parameter — The continuation token of the next page of Archival Unit identifiers to be returned
Return type
Example data
Content-Type: application/json
{
"pageInfo" : {
"curLink" : "curLink",
"resultsPerPage" : 6,
"totalCount" : 0,
"continuationToken" : "continuationToken",
"nextLink" : "nextLink"
},
"auids" : [ "auids", "auids" ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The requested Archival Unit identifiers
auidPageInfo
401
Unauthorized request
403
Client not authorized to retrieve data
404
No AUIDs in namespace
502
Could not read from external resource
Marks the AUID for bulk artifact transfer (handleBulkAuOp)
Path parameters
auid (required)
Path Parameter — Archival Unit ID
Consumes
This API call consumes the following media types via the request header:
Query parameters
namespace (optional)
Query Parameter — Namespace of the artifacts default: lockss
Form parameters
op (required)
Form Parameter —
Responses
200
Bulk operation succeeded
401
Unauthorized
403
Client is forbidden from performing bulk operation
404
AUID not in bulk mode
Get namespaces of the committed artifacts in the repository (getNamespaces)
Return type
array[String]
Example data
Content-Type: application/json
[ "", "" ]
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
Status 200
Get repository information (getRepositoryInformation)
Get properties of the repository
Return type
Example data
Content-Type: application/json
{
"storeInfo" : {
"avail" : 1,
"percentUsedString" : "percentUsedString",
"size" : 0,
"name" : "name",
"percentUsed" : 5.962133916683182,
"used" : 6,
"type" : "type"
}
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The repository information
repositoryInfo
401
Unauthorized
500
Internal Server Error
Get repository storage information (getStorageInfo)
Get properties of the repository storage
Return type
Example data
Content-Type: application/json
{
"avail" : 1,
"percentUsedString" : "percentUsedString",
"size" : 0,
"name" : "name",
"percentUsed" : 5.962133916683182,
"used" : 6,
"type" : "type"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The repository storage information
storageInfo
401
Unauthorized
500
Internal Server Error
Up
get /checksumalgorithms
Get the supported checksum algorithms (getSupportedChecksumAlgorithms)
Get a list of the names of the supported checksum algorithms
Return type
array[String]
Example data
Content-Type: application/json
[ "", "" ]
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The names of the supported checksum algorithms
400
Bad Request
401
Unauthorized
500
Internal Server Error
Get the status of the service (getStatus)
Get the status of the service
Return type
Example data
Content-Type: application/json
{
"startupStatus" : "NONE",
"reason" : "reason",
"readyTime" : 0,
"apiVersion" : "apiVersion",
"ready" : true,
"componentName" : "componentName",
"componentVersion" : "componentVersion",
"serviceName" : "serviceName",
"lockssVersion" : "lockssVersion"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The status of the service
apiStatus
401
Unauthorized
500
Internal Server Error
Up
get /wayback/cdx/owb/{namespace}
Get OpenWayback CDX records (getCdxOwb)
Get the OpenWayback CDX records of a URL in a namespace
Path parameters
namespace (required)
Path Parameter — Namespace of the artifacts
Request headers
Query parameters
q (optional)
Query Parameter — Query string. Supported fields are url, type\ \ (urlquery/prefixquery), offset and limit.
count (optional)
Query Parameter — .
start_page (optional)
Query Parameter — .
Return type
String
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The OpenWayback CDX records of the URL in the namespace
String
401
Unauthorized
403
Forbidden
404
Namespace/URL not found
500
Internal Server Error
Up
get /wayback/cdx/pywb/{namespace}
Get PyWayback CDX records (getCdxPywb)
Get the PyWayback CDX records of a URL in a namespace
Path parameters
namespace (required)
Path Parameter — Namespace of the artifacts
Request headers
Query parameters
url (optional)
Query Parameter — The URL for which the CDX records are requested
limit (optional)
Query Parameter — .
matchType (optional)
Query Parameter —
sort (optional)
Query Parameter —
closest (optional)
Query Parameter — Timestamp for sort=closest mode
output (optional)
Query Parameter — Output format
fl (optional)
Query Parameter — Comma-separated list of fields to include in output
Return type
String
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The PyWayback CDX records of the URL in the namespace
String
401
Unauthorized
403
Forbidden
404
Namespace/URL not found
500
Internal Server Error
Up
get /wayback/warcs/{fileName}
Get a WARC archive (getWarcArchive)
Get the contents of a single WARC record as a WARC archive
Path parameters
fileName (required)
Path Parameter — Name of the WARC archive
Request headers
Return type
byte[]
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The contents of the requested WARC archive
byte[]
401
Unauthorized
404
WARC archive not found
500
Internal Server Error
[ Jump to Methods ]
Table of Contents
apiStatus
archives_body
artifact
artifactPageInfo
artifactProperties
artifacts_body
artifacts_uuid_body
auSize
auidPageInfo
auid_bulk_body
importStatus
pageInfo
repositoryInfo
storageInfo
streamingResponseBody
The status information of the service
apiVersion
componentName (optional)
String The name of the component
componentVersion (optional)
String The version of the component software
lockssVersion (optional)
String The version of the LOCKSS system
ready
Boolean The indication of whether the service is available
serviceName (optional)
String The name of the service
readyTime (optional)
Long The time the service last became ready. format: int64
reason (optional)
String The reason the service isn't ready.
startupStatus (optional)
String Enum indicating progress of plugin/AU processing at startup.
NONE
PLUGINS_CRAWLING
PLUGINS_COLLECTED
PLUGINS_LOADING
PLUGINS_LOADED
AUS_STARTING
AUS_STARTED
auid
String Archival Unit ID (AUID) of new artifact
archive
byte[] Archive data containing artifacts format: binary
namespace (optional)
uuid (optional)
auid (optional)
uri (optional)
version (optional)
contentLength (optional)
contentDigest (optional)
collectionDate (optional)
storeDate (optional)
state (optional)
committed (optional)
storageUrl (optional)
A display page of artifacts
namespace (optional)
uuid (optional)
auid (optional)
uri (optional)
version (optional)
contentLength (optional)
contentDigest (optional)
collectionDate (optional)
storeDate (optional)
state (optional)
artifactProps
String Artifact properties (JSON)
httpResponseHeader (optional)
String HTTP response status and headers (optional)
payload
byte[] Artifact payload data format: binary
committed
Boolean New commit status of artifact
totalLatestVersions (optional)
totalAllVersions (optional)
totalWarcSize (optional)
A display page of Archival Unit identifiers
op
String Bulk AU transfer operation
start
finish
warcId (optional)
offset (optional)
url (optional)
artifactUuid (optional)
digest (optional)
version (optional)
status (optional)
OK
ERROR
DUPLICATE
EXCLUDED
statusMessage (optional)
The information related to pagination of content
totalCount
Integer The total number of results format: int32
resultsPerPage
Integer The number of results per page format: int32
continuationToken
curLink
String The link of the current request
nextLink
String The link of the next request
Information about the repository
Information about a repository storage area
type
String Type of the storage area
name
String Name of the storage area
size
Long Size in bytes of the storage area format: int64
used
Long Used size in bytes of the torage area format: int64
avail
Long Available size in bytes of the storage area format: int64
percentUsedString
String Percentage of size used, formatted as a string
percentUsed
Double Percentage of size used format: double