Data Package Manager web service API


Base URL - https://pasta.lternet.edu/package


The Data Package Manager Web Service provides a suite of operations to create, evaluate, read, update, delete, list, and search data package resources in the PASTA system; additional operations provide access to evaluation reports, provenance metadata, event subscriptions, and whether the user has read access to specific resources. Data package resources include metadata documents, data entities, and quality reports.



Request Summary

HTTP Verb : Relative URLBrief description
POST : /emlCreate Data Package operation, specifying the EML document describing the data package to be created in the request message body and returning a transaction identifier in the response message body as plain text; the transaction identifier may be used in a subsequent call to readDataPackageError to determine the operation status; see readDataPackage to obtain the data package resource map if the operation completed successfully.
POST : /archive/eml/{scope}/{identifier}/{revision}Create Data Package Archive (Zip) operation, specifying the scope, identifier, and revision of the data package to be Zipped in the URI, and returning a transaction identifier in the response message body as plain text; the transaction identifier may be used in a subsequent call to readDataPackageError to determine the operation status or to readDataPackageArchive to obtain the Zip archive.
GET : /download/eml/{scope}/{identifier}/{revision}Download Data Package as a ZIP archive operation, specifying the scope, identifier, and revision of the data package in the URI, and returning a stream of zipped bytes in the response message body.
POST : /reservations/eml/{scope}Create Reservation operation, creates a new reservation in PASTA on the next reservable identifier for the specified scope.
DELETE : /reservations/eml/{scope}/{identifier}Delete Reservation operation, deletes an existing reservation in PASTA for the specified scope and identifier.
POST : /evaluate/emlEvaluate Data Package operation, specifying the EML document describing the data package to be evaluated in the request message body, and returning a transaction identifier in the response message body as plain text; the transaction identifier may be used in a subsequent call to readDataPackageError to determine the operation status or to readEvaluateReport to obtain the evaluate quality report.
GET : /provenance/eml/{scope}/{identifier}/{revision}Get Provenance Metadata operation, specifying the scope, identifier, and revision of the parent data package whose provenance metadata is to be generated and retrieved, returning an XML string representing a <methodStep> element that can be inserted into the <methods> section of a dependent data package.
GET : /authzIs Authorized (to READ resource) operation, determines whether the user as defined in the authentication token has permission to read the specified data package resource.
GET : /data/eml/{scope}/{identifier}/{revision}List Data Entities operation, specifying the scope, identifier, and revision values to match in the URI.
GET : /reservations/emlList Active Reservations operation, lists the set of data package identifiers that users have actively reserved in PASTA.
GET : /reservations/eml/{scope}List Reservation Identifiers operation, lists the set of numeric identifiers for the specified scope that end users have actively reserved for future upload to PASTA.
GET : /descendants/eml/{scope}/{identifier}/{revision}List Data Descendants operation, specifying the scope, identifier, and revision values to match in the URI.
GET : /sources/eml/{scope}/{identifier}/{revision}List Data Sources operation, specifying the scope, identifier, and revision values to match in the URI.
GET : /eml/{scope}List Data Package Identifiers operation, specifying the scope value to match in the URI.
GET : /eml/{scope}/{identifier}List Data Package Revisions operation, specifying the scope and identifier values to match in the URI.
GET : /emlList Data Package Scopes operation, returning all scope values extant in the data package registry.
GET : /eml/deletedList Deleted Data Packages operation, returning all document identifiers (excluding revision values) that have been deleted from the data package registry.
GET : /service-methodsList Service Methods operation, returning a simple list of web service methods supported by the Data Package Manager web service.
GET : /data/eml/{scope}/{identifier}/{revision}/{entityId}Read Data Entity operation, specifying the scope, identifier, revision, and entity identifier of the data entity to be read in the URI.
GET : /data/acl/eml/{scope}/{identifier}/{revision}/{entityId}Read Data Entity ACL operation, specifying the scope, identifier, and revision of the data entity object whose Access Control List (ACL) is to be read in the URI, returning an XML string representing the ACL for the data entity.
GET : /data/rmd/eml/{scope}/{identifier}/{revision}/{entityId}Read Data Entity Resource Metadata operation, specifying the scope, identifier, revision, and entity identifier of the data entity object whose resource metadata is to be read in the URI, returning an XML string representing the resource metadata for the data entity.
GET : /data/checksum/eml/{scope}/{identifier}/{revision}/{entityId}Read Data Entity Checksum operation, specifying the scope, identifier, and revision of the data entity object whose checksum is to be read in the URI, returning a 40-character SHA-1 checksum value.
GET : /data/size/eml/{scope}/{identifier}/{revision}/{entityId}Read Data Entity Size operation, specifying the scope, identifier, revision, and entity ID of the data entity object whose size is to be read in the URI, returning an integer, the size value in bytes.
GET : /data/size/eml/{scope}/{identifier}/{revision}Read Data Entity Sizes operation, specifying the scope, identifier, and revision of the data package whose entity sizes are to be read in the URI.
GET : /name/eml/{scope}/{identifier}/{revision}/{entityId}Read Data Entity Name operation, specifying the scope, identifier, revision, and entity identifier of the data entity whose name is to be read in the URI.
GET : /name/eml/{scope}/{identifier}/{revision}Read Data Entity Names operation, specifying the scope, identifier, and revision of the data package whose entity names are to be read in the URI.
GET : /eml/{scope}/{identifier}/{revision}Read Data Package operation, specifying the scope, identifier, and revision of the data package to be read in the URI, returning a resource graph with reference URLs to each of the metadata, data, and quality report resources that comprise the data package.
GET : /acl/eml/{scope}/{identifier}/{revision}Read Data Package ACL operation, specifying the scope, identifier, and revision of the data package whose Access Control List (ACL) is to be read in the URI, returning an XML string representing the ACL for the data package.
GET : /rmd/eml/{scope}/{identifier}/{revision}Read Data Package Resource Metadata operation, specifying the scope, identifier, and revision of the data package whose resource metadata is to be read in the URI, returning an XML string representing the resource metadata for the data package resource.
GET : /archive/eml/{scope}/{identifier}/{revision}/{transaction}Read Data Package Archive operation, specifying the transaction identifier of the data package archive to be read in the URI, returning the data package archive as a binary object in the ZIP file format.
GET : /doi/eml/{scope}/{identifier}/{revision}Read Data Package DOI operation, specifying the scope, identifier, and revision of the data package DOI to be read in the URI, returning the canonical Digital Object Identifier.
GET : /error/eml/{transaction}Read Data Package Error operation, specifying the scope, identifier, revision, and transaction id of the data package error to be read in the URI, returning the error message as plain text.
GET : /doi/{shoulder}/{pasta}/{md5}Read Data Package From DOI operation, specifying the DOI of the data package to be read in the URI, returning a resource graph with reference URLs to each of the metadata, data, and quality report resources that comprise the data package.
GET : /report/eml/{scope}/{identifier}/{revision}Read Data Package Report operation, specifying the scope, identifier, and revision of the data package quality report document to be read in the URI.
GET : /report/acl/eml/{scope}/{identifier}/{revision}Read Data Package Report ACL operation, specifying the scope, identifier, and revision of the data package report whose access control list (ACL) is to be read in the URI, returning an XML string representing the ACL for the data package report resource.
GET : /report/rmd/eml/{scope}/{identifier}/{revision}Read Data Package Report Resource Metadata operation, specifying the scope, identifier, and revision of the data package report whose resource metadata is to be read in the URI, returning an XML string representing the resource metadata for the data package report resource.
GET : /report/checksum/eml/{scope}/{identifier}/{revision}Read Data Package Report Checksum operation, specifying the scope, identifier, and revision of the data package report object whose checksum is to be read in the URI, returning a 40 character SHA-1 checksum value.
GET : /evaluate/report/eml/{transaction}Read Evaluate Report operation, specifying the transaction identifier of the evaluate quality report document to be read in the URI.
GET : /metadata/eml/{scope}/{identifier}/{revision}Read Metadata operation, specifying the scope, identifier, and revision of the EML document to be read in the URI.
GET : /metadata/dc/{scope}/{identifier}/{revision}Read Metadata Dublin Core operation, specifying the scope, identifier, and revision of the Dublin Core metadata document to be read in the URI.
GET : /metadata/acl/eml/{scope}/{identifier}/{revision}Read Metadata ACL operation, specifying the scope, identifier, and revision of the data package metadata whose Access Control List (ACL) is to be read in the URI, returning an XML string representing the ACL for the data package metadata resource.
GET : /metadata/rmd/eml/{scope}/{identifier}/{revision}Read Metadata Resource Metadata operation, specifying the scope, identifier, and revision of the data package metadata resource whose resource metadata is to be read in the URI, returning an XML string representing the resource metadata for the data package metadata resource.
GET : /metadata/checksum/eml/{scope}/{identifier}/{revision}Read Metadata Checksum operation, specifying the scope, identifier, and revision of the metadata object whose checksum value is to be read in the URI, returning a 40 character SHA-1 checksum value.
GET : /metadata/format/eml/{scope}/{identifier}/{revision}Read Metadata Format operation, specifying the scope, identifier, and revision of the metadata to be read in the URI, returning the metadata format type, e.
GET : /search/emlSearch Data Packages operation, specifying the Solr query as query parameters in the URL.
GET : /search/download.
GET : /uploads/emlList Recent Uploads operation, optionally specifying the upload type ("insert" or "update") and a maximum limit as query parameters in the URL.
GET : /changes/emlList Recent Changes operation, listing data package changes (insert, update, and delete operations) recorded in PASTA's resource registry.
GET : /user/{dn}List User Data Packages operation, returning all packageId values (including revision values) where the principal owner (i.
GET : /workingon/emlList Working On operation, lists the set of data packages that PASTA is currently working on inserting or updating.
PUT : /eml/{scope}/{identifier}Update Data Package operation, specifying the scope and identifier of the data package to be updated in the URI, along with the EML document describing the data package to be created in the request message body, and returning a transaction identifier in the response message body as plain text; the transaction identifier may be used in a subsequent call to readDataPackageError to determine the operation status; see readDataPackage to obtain the data package resource map if the operation completed successfully.
DELETE : /eml/{scope}/{identifier}Delete Data Package operation, specifying the scope and identifier of the data package to be deleted in the URI.
POST : /event/emlCreate Event Subscription operation, creates a new event subscription.
DELETE : /event/eml/{subscriptionId}Delete Event Subscription operation, deletes the event subscription with the specified ID from the subscription database.
POST : /event/eml/{subscriptionId}Execute Event Subscription operation, specifying the ID of the event subscription whose URL is to be executed.
GET : /event/emlQuery Event Subscriptions operation, returns a list of the subscriptions whose attributes match those specified in the query string.
GET : /event/eml/{subscriptionId}Get Event Subscription operation, returns the event subscription with the specified ID.
GET : /event/eml/schemaGet Event Subscription Schema operation, returns the XML schema for event subscription creation request entities.
POST : /citation/emlCreate Journal Citation operation, creates a new journal citation entry in PASTA.
PUT : /citation/eml/{journalCitationId}Update Journal Citation operation, updates an existing journal citation entry in PASTA.
DELETE : /citation/eml/{journalCitationId}Delete Journal Citation operation, deletes the journal citation entry with the specified ID from the journal citation database.
GET : /citation/eml/{journalCitationId}Get Journal Citation operation, returns metadata for a journal citation with the specified ID.
GET : /citations/eml/{scope}/{identifier}/{revision}List Data Package Citations operation, specifying the scope, identifier, and revision values to match in the URI.
GET : /citations/eml/{principalOwner}List Principal Owner Citations operation, specifying the principal owner of the citations to be listed.



Request Detail


POST : /eml

Create Data Package operation, specifying the EML document describing the data package to be created in the request message body and returning a transaction identifier in the response message body as plain text; the transaction identifier may be used in a subsequent call to readDataPackageError to determine the operation status; see readDataPackage to obtain the data package resource map if the operation completed successfully.

Request:

Message Body MIME type Sample Request
EML document application/xml curl -i -u "uid=ucarroll,o=LTER,dc=ecoinformatics,dc=org:PASSWORD" -X POST -H "Content-Type: application/xml" --data-binary @knb-lter-lno.1.1.xml https://pasta.lternet.edu/package/eml

Response:

Status Reason Message Body MIME type Sample Message Body
202 Accepted The create data package request was accepted for processing A transaction identifier for use in subsequent processing of the request (see readDataPackageError to understand how the transaction identifier may be used to determine if an error occurred during the operation) text/plain 1364424858431
401 Unauthorized The requesting user is not authorized to execute this service method An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message


POST : /archive/eml/{scope}/{identifier}/{revision}

Create Data Package Archive (Zip) operation, specifying the scope, identifier, and revision of the data package to be Zipped in the URI, and returning a transaction identifier in the response message body as plain text; the transaction identifier may be used in a subsequent call to readDataPackageError to determine the operation status or to readDataPackageArchive to obtain the Zip archive.

Request:

Message Body MIME type Sample Request
none none curl -i -X POST https://pasta.lternet.edu/package/archive/eml/knb-lter-lno/1/1

Response:

Status Reason Message Body MIME type Sample Message Body
202 Accepted The create request was accepted for processing A transaction identifier for use in subsequent processing of the request (see readDataPackageError to understand how the transaction identifier may be used to determine if an error occurred during the operation) text/plain 1364424858431
401 Unauthorized The requesting user is not authorized to execute this service method An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message


GET : /download/eml/{scope}/{identifier}/{revision}

Download Data Package as a ZIP archive operation, specifying the scope, identifier, and revision of the data package in the URI, and returning a stream of zipped bytes in the response message body.

Request:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/download/eml/knb-lter-lno/1/1

Response:

Status Reason Message Body MIME type Sample Message Body
200 OK The request was successful ZIP bytes application/zip [ZIP bytes]
401 Unauthorized The requesting user is not authorized to execute this service method An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message


POST : /reservations/eml/{scope}

Create Reservation operation, creates a new reservation in PASTA on the next reservable identifier for the specified scope.

Responses:

Status Reason Entity MIME type
201 Created If the create reservation request was successful. The integer value of the reserved identifier N/A
400 Bad Request If the request entity contains an error, such as improperly formatted XML, EML packageId, or URL. An error message. text/plain
401 Unauthorized If the requesting user is not authorized to create subscriptions. An error message. text/plain


DELETE : /reservations/eml/{scope}/{identifier}

Delete Reservation operation, deletes an existing reservation in PASTA for the specified scope and identifier.

Responses:

Status Reason Entity MIME type
200 OK If the delete request was successful. The integer value of the deleted identifier. N/A
400 Bad Request If the request entity contains an error, such as improperly formatted XML, EML packageId, or URL. An error message. text/plain
401 Unauthorized If the requesting user is not authorized to delete the specified reservation. An error message. text/plain


POST : /evaluate/eml

Evaluate Data Package operation, specifying the EML document describing the data package to be evaluated in the request message body, and returning a transaction identifier in the response message body as plain text; the transaction identifier may be used in a subsequent call to readDataPackageError to determine the operation status or to readEvaluateReport to obtain the evaluate quality report.

Request:

Message Body MIME type Sample Request
EML document application/xml curl -i -X POST -H "Content-Type: application/xml" --data-binary @eml.xml https://pasta.lternet.edu/package/evaluate/eml

Query parameters:

An optional query parameter, "useChecksum", can be appended to the URL. When specified, the useChecksum query parameter directs the server to determine whether it can use an existing copy of a data entity from a previous revision of the data package based on matching a metadata-documented checksum value (MD5 or SHA-1) to the checksum of the existing copy. If a match is found, the server will skip the upload of the data entity from the remote URL and instead use its matching copy. Please Note: Specifying "useChecksum" can save time by eliminating data uploads, but clients should take care to ensure that metadata-documented checksum values are accurate and up to date.

Response:

Status Reason Message Body MIME type Sample Message Body
202 Accepted The evaluate request was accepted for processing A transaction identifier for use in subsequent processing of the request (see readDataPackageError to understand how the transaction identifier may be used to determine if an error occurred during the operation) text/plain 1364424858431
401 Unauthorized The requesting user is not authorized to execute this service method An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message


GET : /provenance/eml/{scope}/{identifier}/{revision}

Get Provenance Metadata operation, specifying the scope, identifier, and revision of the parent data package whose provenance metadata is to be generated and retrieved, returning an XML string representing a <methodStep> element that can be inserted into the <methods> section of a dependent data package.

Request:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/provenance/eml/knb-lter-lno/1/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request was successful The modified XML document application/xml
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <methods>
   <methodStep>
     <description>
       <para>This method step describes provenance-based metadata...
 .
 .
 .
   </methodStep>
 </methods>
 
400 Bad Request The request entity or query parameters cannot be properly parsed An error message text/plain Error message
401 Unauthorized The requesting user is unauthorized to use the Provenance Factory An error message text/plain Error message
417 Expectation Failed The request fails for an incorrect user expectation (e.g., because the requesting user is not authorized to read an EML document that is specified in the query parameter) An error message text/plain Error message


GET : /authz

Is Authorized (to READ resource) operation, determines whether the user as defined in the authentication token has permission to read the specified data package resource.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET http://pasta.lternet.edu/package/authz?resourceId=https://pasta.lternet.edu/package/eml/knb-lter-lno/1/1

Query parameters:

The query parameter must be the resourceId of the PASTA resource that is being reviewed for authorization:

?resourceId=<resource identifier>

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The user is authorized to read the data package resource The specific resource text/plain https://pasta.lternet.edu/package/eml/knb-lter-lno/1/1
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the resource An error message text/plain Error message
404 Not Found The resource being reviewed is not found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /data/eml/{scope}/{identifier}/{revision}

List Data Entities operation, specifying the scope, identifier, and revision values to match in the URI.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/data/eml/knb-lter-lno/1/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The list request was successful A list of data entity identifiers matching the specified scope, identifier, and revisions values text/plain
 EntityOne
 EntityTwo
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to access a list of the data entities An error message text/plain Error message
404 Not Found No data package entities associated with the specified packageId are found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /reservations/eml

List Active Reservations operation, lists the set of data package identifiers that users have actively reserved in PASTA. Note that data packages identifier that have been successfully uploaded into PASTA are no longer considered active reservations and thus are not included in this list.

Requests:

Message Body MIME type Sample Request
None curl -i -X GET "https://pasta.lternet.edu/package/reservations/eml"

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The query was successful An XML document containing the list of active data package reservations application/xml
		 <reservations>
		 <reservation>
		 <docid>edi.99</docid>
		 <principal>uid=LNO,o=LTER,dc=ecoinformatics,dc=org</principal>
		 <dateReserved>2017-01-23 14:11:48.234</dateReserved>
		 </reservation>
		 <reservation>
		 <docid>edi.100</docid>
		 <principal>uid=LNO,o=LTER,dc=ecoinformatics,dc=org</principal>
		 <dateReserved>2017-01-23 14:14:49.205</dateReserved>
		 </reservation>
		 </reservations>
 
400 Bad Request The request message body contains an error, such as an improperly formatted path query string An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to execute the Search Data Packages service method An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /reservations/eml/{scope}

List Reservation Identifiers operation, lists the set of numeric identifiers for the specified scope that end users have actively reserved for future upload to PASTA.

Requests:

Message Body MIME type Sample Request
None curl -i -X GET "https://pasta.lternet.edu/package/reservations/eml/edi"

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The query was successful A simple list of numeric identifier values reserved for the specified scope, one identifier per line application/xml
		 67
		 68
		 69
		 70
 
400 Bad Request The request message body contains an error, such as an improperly formatted path query string An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to execute the Search Data Packages service method An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /descendants/eml/{scope}/{identifier}/{revision}

List Data Descendants operation, specifying the scope, identifier, and revision values to match in the URI.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/descendants/eml/lter-landsat/7/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The list request was successful An XML-formatted list representing descendant data packages. A descendant data package is defined as a data package which depends on the specified data package as one of its data sources. application/xml
 <?xml version="1.0" encoding="UTF-8"?>
 <dataDescendants>
     <dataDescendant>
         <packageId>lter-landsat-ledaps.7.1</packageId>
         <title>LEDAPS corrected Landsat Enhanced Thematic Mapper image data for Andrews Forest LTER collected on 1984-05-16</title>
         <url>https://pasta.lternet.edu/package/metadata/eml/lter-landsat-ledaps/7/1</url>
     </dataDescendant>
 </dataDescendants>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to access a list of the data entities An error message text/plain Error message
404 Not Found No data package entities associated with the specified packageId are found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /sources/eml/{scope}/{identifier}/{revision}

List Data Sources operation, specifying the scope, identifier, and revision values to match in the URI.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/sources/eml/lter-landsat-ledaps/7/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The list request was successful An XML-formatted list of PASTA metadata resource identifiers representing the data sources from which this data package was derived application/xml
 <?xml version="1.0" encoding="UTF-8"?>
 <dataSources>
    <dataSource>
        <packageId>lter-landsat.7.1</packageId>
        <title>Landsat Enhanced Thematic Mapper image data for Andrews Forest LTER collected on 1984-07-03</title>
        <url>https://pasta.lternet.edu/package/metadata/eml/lter-landsat/7/1</url>
    </dataSource>
 </dataSources>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to access a list of the data entities An error message text/plain Error message
404 Not Found No data package entities associated with the specified packageId are found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /eml/{scope}

List Data Package Identifiers operation, specifying the scope value to match in the URI.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/eml/knb-lter-lno

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The list request was successful A newline-separated list of data package identifier values matching the specified scope value text/plain
 1004
 1005
 1007
 
400 Bad Request The request contains an error, such as an illegal scope value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to access a list of the identifier values An error message text/plain Error message
404 Not Found No data packages identifiers associated with the specified scope are found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /eml/{scope}/{identifier}

List Data Package Revisions operation, specifying the scope and identifier values to match in the URI. The request may be filtered by applying the modifiers "oldest" or "newest" to the "filter" query parameter.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/eml/knb-lter-lno/1
none none curl -i -X GET https://pasta.lternet.edu/package/eml/knb-lter-lno/1?filter=newest

Query parameters:

If present, the query parameter must be filter and one of either "newest" or "oldest":

?filter=newest or
?filter=oldest

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The list request was successful A newline-separated list of revision values matching the specified scope and identifier values text/plain
 1
 2
 3
 
400 Bad Request The request contains an error, such as an illegal scope or identifier value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to access a list of the data package revisions An error message text/plain Error message
404 Not Found No data package revisions associated with the specified scope and identifier are found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /eml

List Data Package Scopes operation, returning all scope values extant in the data package registry.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/eml

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The list request was successful A list of all scope values extant in the data package registry text/plain
 knb-lter-lno
 knb-lter-xyz
 
401 Unauthorized The requesting user is not authorized to access a list of the scope values An error message text/plain Error message
404 Not Found No scope values are extant in the data package registry An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /eml/deleted

List Deleted Data Packages operation, returning all document identifiers (excluding revision values) that have been deleted from the data package registry.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/eml/deleted

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The list request was successful A list of all document identifiers deleted from the data package registry text/plain
 knb-lter-lno.1
 knb-lter-lno.2
 knb-lter-xyz.1
 
401 Unauthorized The requesting user is not authorized to access a list of deleted data packages An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /service-methods

List Service Methods operation, returning a simple list of web service methods supported by the Data Package Manager web service.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/service-methods

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The list request was successful A newline-separated list of revision values matching the specified scope and identifier values text/plain
 appendProvenance
 createDataPackage
 createDataPackageArchive
 .
 .
 . (truncated for brevity)
 
400 Bad Request The request contains an error, such as an illegal scope or identifier value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to access a list of the data package revisions An error message text/plain Error message
404 Not Found No data package revisions associated with the specified scope and identifier are found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /data/eml/{scope}/{identifier}/{revision}/{entityId}

Read Data Entity operation, specifying the scope, identifier, revision, and entity identifier of the data entity to be read in the URI.

Revision may be specified as "newest" or "oldest" to retrieve data from the newest or oldest revision, respectively.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/data/eml/knb-lter-lno/1/1/67e99349d1666e6f4955e9dda42c3cc2
none none curl -i -X GET httpd://pasta.lternet.edu/package/data/eml/knb-lter-lno/1/oldest/67e99349d1666e6f4955e9dda42c3cc2
none none curl -i -X GET https://pasta.lternet.edu/package/data/eml/knb-lter-lno/1/newest/67e99349d1666e6f4955e9dda42c3cc2

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data entity was successful The data that comprises the data entity application/octet-stream
 Site Year Month Day Transect Species_Code Count
 1 2000 8 26 1 G1 0
 1 2000 8 26 2 G1 0
 1 2000 8 26 3 G1 0
 .
 .
 .
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data entity An error message text/plain Error message
404 Not Found Either the specified data package or the specified data entity is not found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /data/acl/eml/{scope}/{identifier}/{revision}/{entityId}

Read Data Entity ACL operation, specifying the scope, identifier, and revision of the data entity object whose Access Control List (ACL) is to be read in the URI, returning an XML string representing the ACL for the data entity. Please note: only a very limited set of users are authorized to use this service method.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/data/acl/eml/knb-lter-lno/1/3/67e99349d1666e6f4955e9dda42c3cc2

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data entity ACL was successful An XML string representing the access control list (ACL) for the data entity application/xml
		 <access authSystem="https://pasta.edirepository.org/authentication" order="allowFirst" system="https://pasta.edirepository.org">
		 <allow>
		 <principal role="owner">uid=dcosta,o=LTER,dc=ecoinformatics,dc=org</principal>
		 <permission>changePermission</permission>
		 </allow>
		 <allow>
		 <principal>uid=NIN,o=LTER,dc=ecoinformatics,dc=org</principal>
		 <permission>changePermission</permission>
		 </allow>
		 <allow>
		 <principal>public</principal>
		 <permission>read</permission>
		 </allow>
		 </access>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data entity ACL An error message text/plain Error message
404 Not Found No ACL associated with the specified data entity is found or the data entity itself was not found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /data/rmd/eml/{scope}/{identifier}/{revision}/{entityId}

Read Data Entity Resource Metadata operation, specifying the scope, identifier, revision, and entity identifier of the data entity object whose resource metadata is to be read in the URI, returning an XML string representing the resource metadata for the data entity.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/data/rmd/eml/knb-lter-nin/1/1/67e99349d1666e6f4955e9dda42c3cc2

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data entity resource metadata was successful An XML string representing the data entity resource metadata for the data entity application/xml
		 <?xml version="1.0" encoding="UTF-8"?>
		 <resourceMetadata>
		 <dataFormat>text/csv</dataFormat>
		 <dateCreated>2016-12-06 13:59:15.696</dateCreated>
		 <entityId>67e99349d1666e6f4955e9dda42c3cc2</entityId>
		 <entityName>DailyWaterSample-NIN-LTER-1978-1992</entityName>
		 <fileName>LTER.NIN.DWS.csv</fileName>
		 <identifier>1</identifier>
		 <md5Checksum>699f0409577b9b8d194480310fed2dbb</md5Checksum>
		 <packageId>knb-lter-nin.1.1</packageId>
		 <principalOwner>uid=LNO,o=LTER,dc=ecoinformatics,dc=org</principalOwner>
		 <resourceId>https://pasta.lternet.edu/package/data/eml/knb-lter-nin/1/1/67e99349d1666e6f4955e9dda42c3cc2</resourceId>
		 <resourceLocation>/home/pasta/local/data</resourceLocation>
		 <resourceSize>924291</resourceSize>
		 <resourceType>data</resourceType>
		 <revision>1</revision>
		 <scope>knb-lter-nin</scope>
		 <sha1Checksum>7a47318b5a6baec54e24c6b3b698e5b4fa207ac4</sha1Checksum>
		 </resourceMetadata>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data entity resource metadata An error message text/plain Error message
404 Not Found No resource metadata associated with the specified data entity is found or the data entity itself was not found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /data/checksum/eml/{scope}/{identifier}/{revision}/{entityId}

Read Data Entity Checksum operation, specifying the scope, identifier, and revision of the data entity object whose checksum is to be read in the URI, returning a 40-character SHA-1 checksum value.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/data/checksum/eml/knb-lter-lno/1/3/67e99349d1666e6f4955e9dda42c3cc2

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data entity checksum was successful The canonical Digital Object Identifier of the data entity. text/plain 7a39bd7694dc0473a6ae7a7d7520ff2e7a39bd76
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data entity An error message text/plain Error message
404 Not Found No checksum associated with the specified data entity is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /data/size/eml/{scope}/{identifier}/{revision}/{entityId}

Read Data Entity Size operation, specifying the scope, identifier, revision, and entity ID of the data entity object whose size is to be read in the URI, returning an integer, the size value in bytes.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/data/size/eml/knb-lter-lno/1/3/67e99349d1666e6f4955e9dda42c3cc2

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data entity size was successful The canonical Digital Object Identifier of the data entity. text/plain 7a39bd7694dc0473a6ae7a7d7520ff2e7a39bd76
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data entity An error message text/plain Error message
404 Not Found No size value associated with the specified data entity is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /data/size/eml/{scope}/{identifier}/{revision}

Read Data Entity Sizes operation, specifying the scope, identifier, and revision of the data package whose entity sizes are to be read in the URI. Returns a newline-separated list of lines, where each line contains an entity id followed by a comma followed by the entity size of that entity.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/data/size/eml/knb-lter-nin/1/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data entity sizes was successful a newline-separated list of lines, where each line contains an entity id followed by a comma followed by the entity size of that entity (in bytes) text/plain
     7a39bd7694da0473a6ae7a7d7520ff2e7a39bd76,1254096
     8a39bd7694db0473a6ae7a7d7520ff2e7a39bd77,37004
     9a39bd7694dc0473a6ae7a7d7520ff2e7a39bd78,1098345788
   
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data entity sizes An error message text/plain Error message
404 Not Found No size values associated with the specified data entity are found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /name/eml/{scope}/{identifier}/{revision}/{entityId}

Read Data Entity Name operation, specifying the scope, identifier, revision, and entity identifier of the data entity whose name is to be read in the URI.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/name/eml/knb-lter-lno/1/3/67e99349d1666e6f4955e9dda42c3cc2

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data package entity name was successful The entity name value of the data package entity. text/plain Daily Average Moored CTD and ADCP Data
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package entity name An error message text/plain Error message
404 Not Found No entity associated with the specified data package entity identifier is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /name/eml/{scope}/{identifier}/{revision}

Read Data Entity Names operation, specifying the scope, identifier, and revision of the data package whose entity names are to be read in the URI. Returns a newline-separated list of lines, where each line contains an entity id followed by a comma followed by the entity name of that entity.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/name/eml/knb-lter-nin/1/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data entity names was successful a newline-separated list of lines, where each line contains an entity id followed by a comma followed by the entity name of that entity text/plain
     7a39bd7694da0473a6ae7a7d7520ff2e7a39bd76,First Entity Name
     8a39bd7694db0473a6ae7a7d7520ff2e7a39bd77,Second Entity Name
     9a39bd7694dc0473a6ae7a7d7520ff2e7a39bd78,Third Entity Name
   
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data entity names An error message text/plain Error message
404 Not Found No entity name values associated with the specified data entity are found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /eml/{scope}/{identifier}/{revision}

Read Data Package operation, specifying the scope, identifier, and revision of the data package to be read in the URI, returning a resource graph with reference URLs to each of the metadata, data, and quality report resources that comprise the data package.

Revision may be specified as "newest" or "oldest" to retrieve the newest or oldest revision, respectively.

When the "?ore" query parameter is appended to the request URL, an OAI-ORE compliant resource map in RDF-XML format is returned.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/eml/knb-lter-lno/1/1
none none curl -i -X GET https://pasta.lternet.edu/package/eml/knb-lter-lno/1/oldest
none none curl -i -X GET https://pasta.lternet.edu/package/eml/knb-lter-lno/1/newest

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data package was successful A resource map with reference URLs to each of the metadata, data, and quality report resources that comprise the data package. 'text/plain'
 https://pasta.lternet.edu/package/data/eml/knb-lter-lno/1/1/67e99349d1666e6f4955e9dda42c3cc2
 https://pasta.lternet.edu/package/metadata/eml/knb-lter-lno/1/1
 https://pasta.lternet.edu/package/report/eml/knb-lter-lno/1/1
 https://pasta.lternet.edu/package/eml/knb-lter-lno/1/1
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package An error message text/plain Error message
404 Not Found No data package associated with the specified packageId is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /acl/eml/{scope}/{identifier}/{revision}

Read Data Package ACL operation, specifying the scope, identifier, and revision of the data package whose Access Control List (ACL) is to be read in the URI, returning an XML string representing the ACL for the data package. Please note: only a very limited set of users are authorized to use this service method.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/acl/eml/knb-lter-lno/1/3

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data package ACL was successful An XML string representing the access control list (ACL) for the data package application/xml
		 <access authSystem="https://pasta.edirepository.org/authentication" order="allowFirst" system="https://pasta.edirepository.org">
		 <allow>
		 <principal role="owner">uid=dcosta,o=LTER,dc=ecoinformatics,dc=org</principal>
		 <permission>changePermission</permission>
		 </allow>
		 <allow>
		 <principal>uid=NIN,o=LTER,dc=ecoinformatics,dc=org</principal>
		 <permission>changePermission</permission>
		 </allow>
		 <allow>
		 <principal>public</principal>
		 <permission>read</permission>
		 </allow>
		 </access>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package ACL An error message text/plain Error message
404 Not Found No ACL associated with the specified data package is found or the data package itself was not found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /rmd/eml/{scope}/{identifier}/{revision}

Read Data Package Resource Metadata operation, specifying the scope, identifier, and revision of the data package whose resource metadata is to be read in the URI, returning an XML string representing the resource metadata for the data package resource.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/rmd/eml/knb-lter-nin/1/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data package resource metadata was successful An XML string representing the resource metadata for the data package resource application/xml
		 <?xml version="1.0" encoding="UTF-8"?>
		 <resourceMetadata>
		 <dateCreated>2016-12-06 13:59:17.257</dateCreated>
		 <doi>doi:10.5072/FK2/2a97391f89ea8519e09a6365fe993da7</doi>
		 <identifier>1</identifier>
		 <packageId>knb-lter-nin.1.1</packageId>
		 <principalOwner>uid=LNO,o=LTER,dc=ecoinformatics,dc=org</principalOwner>
		 <resourceId>https://pasta.lternet.edu/package/eml/knb-lter-nin/1/1</resourceId>
		 <resourceType>dataPackage</resourceType>
		 <revision>1</revision>
		 <scope>knb-lter-nin</scope>
		 </resourceMetadata>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package resource metadata An error message text/plain Error message
404 Not Found No resource metadata associated with the specified data package is found or the data package itself was not found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /archive/eml/{scope}/{identifier}/{revision}/{transaction}

Read Data Package Archive operation, specifying the transaction identifier of the data package archive to be read in the URI, returning the data package archive as a binary object in the ZIP file format. Note that the user id of the request must be the same as the original requestor.

Requests:

Message Body MIME type Sample Request
none none curl -s -X GET https://pasta.lternet.edu/package/archive/eml/knb-lter-nin/1/1/archive_knb-lter-nin.1.1_15494687022457218 > knb-lter-nin.1.1.zip

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data package archive was successful The data package ZIP archive as a binary stream application/octet-stream ...binary stream...
400 Bad Request The request contains an error An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package archive An error message text/plain Error message
404 Not Found No archive associated with the specified transaction identifier is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /doi/eml/{scope}/{identifier}/{revision}

Read Data Package DOI operation, specifying the scope, identifier, and revision of the data package DOI to be read in the URI, returning the canonical Digital Object Identifier.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/doi/eml/knb-lter-lno/1/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data package DOI was successful The canonical Digital Object Identifier of the data package. text/plain doi:10.6073/pasta/7a39bd7694dc0473a6ae7a7d7520ff2e
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package An error message text/plain Error message
404 Not Found No DOI associated with the specified data package is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /error/eml/{transaction}

Read Data Package Error operation, specifying the scope, identifier, revision, and transaction id of the data package error to be read in the URI, returning the error message as plain text.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/error/eml/1364521882823

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data package error was successful The error message of the data package. text/plain Attempting to update a data package to revision '1' but an equal or higher revision ('1') already exists in PASTA: knb-lter-lno.1.1.
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package An error message text/plain Error message
404 Not Found No error associated with the specified data package is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /doi/{shoulder}/{pasta}/{md5}

Read Data Package From DOI operation, specifying the DOI of the data package to be read in the URI, returning a resource graph with reference URLs to each of the metadata, data, and quality report resources that comprise the data package.

When the "ore" query parameter is appended to the request URL, an OAI-ORE compliant resource map in RDF-XML format is returned, for example:

 https://pasta.lternet.edu/package/doi/doi:10.6073/pasta/0675d3602ff57f24838ca8d14d7f3961?ore
 

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/doi/doi:10.6073/pasta/0675d3602ff57f24838ca8d14d7f3961

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data package was successful A resource map with reference URLs to each of the metadata, data, and quality report resources that comprise the data package. 'text/plain'
 https://pasta.lternet.edu/package/data/eml/knb-lter-lno/1/1/67e99349d1666e6f4955e9dda42c3cc2
 https://pasta.lternet.edu/package/metadata/eml/knb-lter-lno/1/1
 https://pasta.lternet.edu/package/report/eml/knb-lter-lno/1/1
 https://pasta.lternet.edu/package/eml/knb-lter-lno/1/1
 
400 Bad Request The request contains an error, such as a missing 'doi' query parameter An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package An error message text/plain Error message
404 Not Found No data package associated with the specified DOI value is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /report/eml/{scope}/{identifier}/{revision}

Read Data Package Report operation, specifying the scope, identifier, and revision of the data package quality report document to be read in the URI.

If an HTTP Accept header with value 'text/html' is included in the request, returns an HTML representation of the report. The default representation is XML.

Requests:

Message Body MIME type Sample Request
none none XML representation: curl -i -X GET https://pasta.lternet.edu/package/report/eml/knb-lter-lno/1/3
none none HTML representation: curl -i -X GET -H "Accept: text/html" https://pasta.lternet.edu/package/report/eml/knb-lter-lno/1/3

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the quality report was successful The quality report document that describes the data package application/xml or text/html
 <?xml version="1.0" encoding="UTF-8"?>
 <qualityReport>
   <packageId>knb-lter-lno.1.3</packageId>
 .
 .
 .
 </qualityReport>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the specified data package An error message text/plain Error message
404 Not Found No data package matching the specified scope, identifier, and revision values is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /report/acl/eml/{scope}/{identifier}/{revision}

Read Data Package Report ACL operation, specifying the scope, identifier, and revision of the data package report whose access control list (ACL) is to be read in the URI, returning an XML string representing the ACL for the data package report resource. Please note: only a very limited set of users are authorized to use this service method.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/report/acl/eml/knb-lter-lno/1/3

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data package report ACL was successful An XML string representing the access control list (ACL) for the data package report application/xml
		 <access authSystem="https://pasta.edirepository.org/authentication" order="allowFirst" system="https://pasta.edirepository.org">
		 <allow>
		 <principal role="owner">uid=dcosta,o=LTER,dc=ecoinformatics,dc=org</principal>
		 <permission>changePermission</permission>
		 </allow>
		 <allow>
		 <principal>uid=NIN,o=LTER,dc=ecoinformatics,dc=org</principal>
		 <permission>changePermission</permission>
		 </allow>
		 <allow>
		 <principal>public</principal>
		 <permission>read</permission>
		 </allow>
		 </access>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package report ACL An error message text/plain Error message
404 Not Found No ACL associated with the specified data package report is found or the data package report itself was not found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /report/rmd/eml/{scope}/{identifier}/{revision}

Read Data Package Report Resource Metadata operation, specifying the scope, identifier, and revision of the data package report whose resource metadata is to be read in the URI, returning an XML string representing the resource metadata for the data package report resource.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/report/rmd/eml/knb-lter-nin/1/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the data package report resource metadata was successful An XML string representing the resource metadata for the data package report resource application/xml
		 <?xml version="1.0" encoding="UTF-8"?>
		 <resourceMetadata>
		 <dateCreated>2016-12-06 13:59:16.796</dateCreated>
		 <fileName>quality_report.xml</fileName>
		 <identifier>1</identifier>
		 <md5Checksum>2a544e93585029114b85c83a8081cac8</md5Checksum>
		 <packageId>knb-lter-nin.1.1</packageId>
		 <principalOwner>uid=LNO,o=LTER,dc=ecoinformatics,dc=org</principalOwner>
		 <resourceId>https://pasta.lternet.edu/package/report/eml/knb-lter-nin/1/1</resourceId>
		 <resourceType>report</resourceType>
		 <revision>1</revision>
		 <scope>knb-lter-nin</scope>
		 <sha1Checksum>393c3b336579b3954392d5867d59abfd2c8101c8</sha1Checksum>
		 </resourceMetadata>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package report resource metadata An error message text/plain Error message
404 Not Found No resource metadata associated with the specified data package report resource is found or the data package report resource itself was not found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /report/checksum/eml/{scope}/{identifier}/{revision}

Read Data Package Report Checksum operation, specifying the scope, identifier, and revision of the data package report object whose checksum is to be read in the URI, returning a 40 character SHA-1 checksum value.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/report/checksum/eml/knb-lter-lno/1/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the report checksum was successful The canonical Digital Object Identifier of the report. text/plain 7a39bd76947520ff2edc0473a6ae7a7d7520ff2e
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the report An error message text/plain Error message
404 Not Found No checksum associated with the specified report is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /evaluate/report/eml/{transaction}

Read Evaluate Report operation, specifying the transaction identifier of the evaluate quality report document to be read in the URI.

If an HTTP Accept header with value 'text/html' is included in the request, returns an HTML representation of the report. The default representation is XML.

See the Evaluate Data Package service method for information about how to obtain the transaction id.

Requests:

Message Body MIME type Sample Request
none none XML representation: curl -i -X GET https://pasta.lternet.edu/package/evaluate/report/eml/1364424858431
none none HTML representation: curl -i -H "Accept: text/html" -X GET https://pasta.lternet.edu/package/evaluate/report/eml/31364424858431

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the quality report was successful The quality report document that describes the data package application/xml or text/html
 <?xml version="1.0" encoding="UTF-8"?>
 <qualityReport>
   <packageId>knb-lter-lno.1.1</packageId>
 .
 .
 .
 </qualityReport>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the specified data package An error message text/plain Error message
404 Not Found No data package matching the specified scope, identifier, and revision values is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /metadata/eml/{scope}/{identifier}/{revision}

Read Metadata operation, specifying the scope, identifier, and revision of the EML document to be read in the URI.

Revision may be specified as "newest" or "oldest" to retrieve the newest or oldest revision, respectively.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/metadata/eml/knb-lter-lno/1/1
none none curl -i -X GET https://pasta.lternet.edu/package/metadata/eml/knb-lter-lno/1/newest
none none curl -i -X GET https://pasta.lternet.edu/package/metadata/eml/knb-lter-lno/1/oldest

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the EML document was successful EML document application/xml
 <?xml version="1.0" encoding="UTF-8"?>
 <eml:eml packageId="knb-lter-nin.1.1" scope="system"
   system="https://pasta.lternet.edu"
   xmlns:eml="eml://ecoinformatics.org/eml-2.1.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="eml://ecoinformatics.org/eml-2.1.0
   http://nis.lternet.edu/schemas/eml/eml-2.1.0/eml.xsd">
 .
 .
 .
 </eml:eml>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package metadata document An error message text/plain Error message
404 Not Found No data package associated with the specified packageId is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /metadata/dc/{scope}/{identifier}/{revision}

Read Metadata Dublin Core operation, specifying the scope, identifier, and revision of the Dublin Core metadata document to be read in the URI.

Revision may be specified as "newest" or "oldest" to retrieve the newest or oldest revision, respectively.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/metadata/dc/knb-lter-lno/1/1
none none curl -i -X GET https://pasta.lternet.edu/package/metadata/dc/knb-lter-lno/1/newest
none none curl -i -X GET https://pasta.lternet.edu/package/metadata/dc/knb-lter-lno/1/oldest

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the metadata document was successful Dublin Core XML document application/xml
 <oai_dc:dc
     xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
     xmlns:fn="http://www.w3.org/2005/xpath-functions"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     xmlns:fo="http://www.w3.org/1999/XSL/Format"
     xmlns:eml="eml://ecoinformatics.org/eml-2.1.1"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
     <dc:title>Stormwater runoff...</dc:title>
     .
     .
     .
 </oai_dc:dc>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the data package metadata document An error message text/plain Error message
404 Not Found No data package associated with the specified packageId is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /metadata/acl/eml/{scope}/{identifier}/{revision}

Read Metadata ACL operation, specifying the scope, identifier, and revision of the data package metadata whose Access Control List (ACL) is to be read in the URI, returning an XML string representing the ACL for the data package metadata resource. Please note: only a very limited set of users are authorized to use this service method.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/metadata/acl/eml/knb-lter-lno/1/3

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the metadata ACL was successful An XML string representing the access control list (ACL) for the metadata application/xml
		 <access authSystem="https://pasta.edirepository.org/authentication" order="allowFirst" system="https://pasta.edirepository.org">
		 <allow>
		 <principal role="owner">uid=dcosta,o=LTER,dc=ecoinformatics,dc=org</principal>
		 <permission>changePermission</permission>
		 </allow>
		 <allow>
		 <principal>uid=NIN,o=LTER,dc=ecoinformatics,dc=org</principal>
		 <permission>changePermission</permission>
		 </allow>
		 <allow>
		 <principal>public</principal>
		 <permission>read</permission>
		 </allow>
		 </access>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the metadata ACL An error message text/plain Error message
404 Not Found No ACL associated with the specified metadata is found or the metadata itself was not found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /metadata/rmd/eml/{scope}/{identifier}/{revision}

Read Metadata Resource Metadata operation, specifying the scope, identifier, and revision of the data package metadata resource whose resource metadata is to be read in the URI, returning an XML string representing the resource metadata for the data package metadata resource.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/metadata/rmd/eml/knb-lter-nin/1/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the metadata resource metadata was successful An XML string representing the resource metadata for the metadata resource application/xml
		 <?xml version="1.0" encoding="UTF-8"?>
		 <resourceMetadata>
		 <dateCreated>2016-12-06 13:59:16.378</dateCreated>
		 <fileName>Level-1-EML.xml</fileName>
		 <formatType>eml://ecoinformatics.org/eml-2.1.0</formatType>
		 <identifier>1</identifier>
		 <md5Checksum>92f6674ace73e79d9de79871ecb36f4f</md5Checksum>
		 <packageId>knb-lter-nin.1.1</packageId>
		 <principalOwner>uid=LNO,o=LTER,dc=ecoinformatics,dc=org</principalOwner>
		 <resourceId>https://pasta.lternet.edu/package/metadata/eml/knb-lter-nin/1/1</resourceId>
		 <resourceType>metadata</resourceType>
		 <revision>1</revision>
		 <scope>knb-lter-nin</scope>
		 <sha1Checksum>406b48590973622b0681d123c8a8443d6d00d13c</sha1Checksum>
		 </resourceMetadata>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the metadata resource metadata An error message text/plain Error message
404 Not Found No resource metadata associated with the specified metadata resource is found or the metadata resource itself was not found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /metadata/checksum/eml/{scope}/{identifier}/{revision}

Read Metadata Checksum operation, specifying the scope, identifier, and revision of the metadata object whose checksum value is to be read in the URI, returning a 40 character SHA-1 checksum value.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/metadata/checksum/eml/knb-lter-lno/1/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the metadata checksum was successful The canonical Digital Object Identifier of the metadata text/plain 7a39bd7694dc7520ff2e0473a6ae7a7d7520ff2
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the metadata An error message text/plain Error message
404 Not Found No checksum associated with the specified metadata is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /metadata/format/eml/{scope}/{identifier}/{revision}

Read Metadata Format operation, specifying the scope, identifier, and revision of the metadata to be read in the URI, returning the metadata format type, e.g. "eml://ecoinformatics.org/eml-2.1.1"

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/metadata/format/eml/knb-lter-lno/1/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The request to read the metadata format was successful The canonical Digital Object Identifier of the metadata text/plain eml://ecoinformatics.org/eml-2.1.1
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to read the metadata An error message text/plain Error message
404 Not Found The specified metadata resource was not found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /search/eml

Search Data Packages operation, specifying the Solr query as query parameters in the URL.

Requests:

Message Body MIME type Sample Request
None curl -i -X GET https://pasta.lternet.edu/package/search/eml?q=LTER

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The search was successful A "resultset" XML document containing the search results application/xml
 <?xml version="1.0"?>
 <resultset>
 .
 .
 .
 </resultset>
 
400 Bad Request The request message body contains an error, such as an improperly formatted path query string An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to execute the Search Data Packages service method An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /search/download



GET : /uploads/eml

List Recent Uploads operation, optionally specifying the upload type ("insert" or "update") and a maximum limit as query parameters in the URL. (See example below.)

Requests:

Message Body MIME type Sample Request
None curl -i -X GET "https://pasta.lternet.edu/package/uploads/eml?type=update&limit=5"

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The query was successful An XML document containing the list of recent data package inserts or updates application/xml
		 <dataPackageUploads>
		 <dataPackageUpload>
		 <packageId>knb-lter-nwk.1504.1</packageId>
		 <scope>knb-lter-nwk</scope>
		 <identifier>1504</identifier>
		 <revision>1</revision>
		 <serviceMethod>createDataPackage</serviceMethod>
		 <uploadDate>2015-06-09</uploadDate>
		 </dataPackageUpload>
		 <dataPackageUpload>
		 <packageId>lter-landsat-ledaps.7.1</packageId>
		 <scope>lter-landsat-ledaps</scope>
		 <identifier>7</identifier>
		 <revision>1</revision>
		 <serviceMethod>createDataPackage</serviceMethod>
		 <uploadDate>2015-04-16</uploadDate>
		 </dataPackageUpload>
		 <dataPackageUpload>
		 <packageId>knb-lter-nwk.1490.1</packageId>
		 <scope>knb-lter-nwk</scope>
		 <identifier>1490</identifier>
		 <revision>1</revision>
		 <serviceMethod>createDataPackage</serviceMethod>
		 <uploadDate>2015-04-13</uploadDate>
		 </dataPackageUpload>
		 </dataPackageUploads>
 
400 Bad Request The request message body contains an error, such as an improperly formatted path query string An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to execute the Search Data Packages service method An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /changes/eml

List Recent Changes operation, listing data package changes (insert, update, and delete operations) recorded in PASTA's resource registry. If a query string is omitted, all changes (inserts, updates, and deletes) to the resource registry will be returned. If query parameters are included, they are used to filter that set of changes based on their attributes.

Query parameters:

Query parameters are specified as key=value pairs, multiple pairs must be delimited with ampersands (&), and only a single value should be specified for a particular key. The following query parameter keys are allowed:

  • fromDate
  • toDate
  • scope

If fromDate or toDate are specified, their values should comply with ISO 8601 datetime format. For example:

  • fromDate=2017-02-01T12:00:00
  • toDate=2017-02-28
If scope is specified, its value must be one of the recognized scope values as configured in PASTA. For example:
  • scope=knb-lter-bes

Requests:

Message Body MIME type Sample Request
None curl -i -X GET "https://pasta.lternet.edu/package/changes/eml?fromDate=2017-02-01T12:00:00&toDate=2017-02-28&scope=knb-lter-bes"

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The query was successful An XML document containing the list of recent changes, including inserts (createDataPackage), updates (updateDataPackage), and deletes (deleteDataPackage). application/xml
		 <dataPackageChanges>
		 <dataPackageUpload>
		 <packageId>knb-lter-nwk.1210.1</packageId>
		 <scope>knb-lter-nwk</scope>
		 <identifier>1210</identifier>
		 <revision>1</revision>
		 <serviceMethod>createDataPackage</serviceMethod>
		 <date>2017-02-02 15:15:06.9</date>
		 </dataPackageUpload>
		 <dataPackageDelete>
		 <packageId>knb-lter-nwk.1210.1</packageId>
		 <scope>knb-lter-nwk</scope>
		 <identifier>1210</identifier>
		 <revision>1</revision>
		 <serviceMethod>deleteDataPackage</serviceMethod>
		 <date>2017-02-02 15:15:12.301</date>
		 </dataPackageDelete>
		 <dataPackageUpload>
		 <packageId>knb-lter-nwk.1211.1</packageId>
		 <scope>knb-lter-nwk</scope>
		 <identifier>1211</identifier>
		 <revision>1</revision>
		 <serviceMethod>createDataPackage</serviceMethod>
		 <date>2017-02-02 15:15:58.331</date>
		 </dataPackageUpload>
		 <dataPackageUpload>
		 <packageId>knb-lter-nwk.1211.2</packageId>
		 <scope>knb-lter-nwk</scope>
		 <identifier>1211</identifier>
		 <revision>2</revision>
		 <serviceMethod>updateDataPackage</serviceMethod>
		 <date>2017-02-02 15:16:28.374</date>
		 </dataPackageUpload>
 
400 Bad Request The request message body contains an error, such as an improperly formatted path query string An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to execute the Search Data Packages service method An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /user/{dn}

List User Data Packages operation, returning all packageId values (including revision values) where the principal owner (i.e. the user who uploaded the data package) matches the specified distinguished name value.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/user/uid=ucarroll,o=LTER,dc=ecoinformatics,dc=org

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The list request was successful An ordered list of all packageId values (including revision value) of all (non-deleted) data packages in the resource registry where the principal owner value matches the specified distinguished name value. text/plain
 knb-lter-lno.1.1
 knb-lter-lno.1.2
 knb-lter-lno.2.1
 knb-lter-lno.2.2
 knb-lter-xyz.1.1
 
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /workingon/eml

List Working On operation, lists the set of data packages that PASTA is currently working on inserting or updating. Note that data packages that are being evaluated by PASTA are not included in this list. (See example below.)

Requests:

Message Body MIME type Sample Request
None curl -i -X GET "https://pasta.lternet.edu/package/workingon/eml"

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The query was successful An XML document containing the list of recent data package inserts or updates application/xml
		 <workingOn>
		 <dataPackage>
		 <packageId>knb-lter-nwk.1504.1</packageId>
		 <startDate>2016-12-08 16:58:29.307</startDate>
		 </dataPackage>
		 <dataPackage>
		 <packageId>lter-landsat-ledaps.7.1</packageId>
		 <startDate>2016-12-08 17:20:59.998</startDate>
		 </dataPackage>
		 <dataPackage>
		 <packageId>knb-lter-nwk.1490.1</packageId>
		 <startDate>2016-12-12 16:55:05.453</startDate>
		 </dataPackage>
		 </workingOn>
 
400 Bad Request The request message body contains an error, such as an improperly formatted path query string An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to execute the Search Data Packages service method An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


PUT : /eml/{scope}/{identifier}

Update Data Package operation, specifying the scope and identifier of the data package to be updated in the URI, along with the EML document describing the data package to be created in the request message body, and returning a transaction identifier in the response message body as plain text; the transaction identifier may be used in a subsequent call to readDataPackageError to determine the operation status; see readDataPackage to obtain the data package resource map if the operation completed successfully.

Requests:

Message Body MIME type Sample Request
EML document application/xml curl -i -u "uid=ucarroll,o=LTER,dc=ecoinformatics,dc=org:PASSWORD" -X PUT -H "Content-Type: application/xml" --data-binary @knb-lter-lno.1.1.xml https://pasta.lternet.edu/package/eml/knb-lter-lno/1

Query parameters:

An optional query parameter, "useChecksum", can be appended to the URL. When specified, the useChecksum query parameter directs the server to determine whether it can use an existing copy of a data entity from a previous revision of the data package based on matching a metadata-documented checksum value (MD5 or SHA-1) to the checksum of the existing copy. If a match is found, the server will skip the upload of the data entity from the remote URL and instead use its matching copy. Please Note: Specifying "useChecksum" can save time by eliminating data uploads, but clients should take care to ensure that metadata-documented checksum values are accurate and up to date.

Responses:

Status Reason Message Body MIME type Sample Message Body
202 Accepted The update data package request was accepted for processing A transaction identifier for use in subsequent processing of the request (see readDataPackageError to understand how the transaction identifier may be used to determine if an error occurred during the operation) text/plain 1364424858431
401 Unauthorized The requesting user is not authorized to execute this service method An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message


DELETE : /eml/{scope}/{identifier}

Delete Data Package operation, specifying the scope and identifier of the data package to be deleted in the URI. The data package and its associated quality reports are deleted.

Requests:

Message Body MIME type Sample Request
none none curl -i -X DELETE https://pasta.lternet.edu/package/eml/knb-lter-lno/1

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The delete request was successful none none none
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to delete the data package An error message text/plain Error message
404 Not Found No data package associated with the specified packageId is found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


POST : /event/eml

Create Event Subscription operation, creates a new event subscription.

Request entity:

The request entity should be an XML document (MIME type application/xml) that contains the subscription's EML packageId, and URL, with the syntax:

    <subscription type="eml">
       <packageId>packageId</packageId>
       <url>url</url>
    </subscription>
 

The packageId can be either complete or partial. The URL must have 'http' as its scheme and must be able to receive POST requests with MIME type text/plain. Note that some characters must be escaped in XML, such as ampersands (&) in the query string of the URL, from & to &amp;.

Responses:

Status Reason Entity MIME type
201 Created If the request was successful. None, but the Location header will contain a URL that references the new subscription. N/A
400 Bad Request If the request entity contains an error, such as improperly formatted XML, EML packageId, or URL. An error message. text/plain
401 Unauthorized If the requesting user is not authorized to create subscriptions. An error message. text/plain
409 Conflict If a subscription already exists with the same creator, EML packageId, and URL attributes. An error message. text/plain


DELETE : /event/eml/{subscriptionId}

Delete Event Subscription operation, deletes the event subscription with the specified ID from the subscription database. After "deletion," the subscription might still exist in the subscription database, but it will be inactive - it will not conflict with future creation requests, it cannot be read, and it will not be notified of events.

Responses:

Status Reason Entity MIME type
200 OK If the request was successful. None N/A
400 Bad Request If the specified identification number cannot be parsed as an integer. An error message. text/plain
401 Unauthorized If the requesting user is not authorized to delete the specified subscription. An error message. text/plain
404 Not Found If a subscription has never existed in the subscription database with the specified identification number. An error message. text/plain
410 Gone If the specified subscription has been previously deleted. An error message. text/plain


POST : /event/eml/{subscriptionId}

Execute Event Subscription operation, specifying the ID of the event subscription whose URL is to be executed. Used to execute a particular subscription in the event manager, via an HTTP POST request. Upon notification, the event manager queries its database for the subscription matching the specified subscriptionId. POST requests are then made (asynchronously) to the matching subscription.

The request headers must contain an authorization token. If the request is successful, an HTTP response with status code 200 'OK' is returned. If the request is unauthorized, based on the content of the authorization token and the current access control rule for event notification, status code 401 'Unauthorized' is returned. If the request contains an error, status code 400 'Bad Request' is returned, with a description of the encountered error.

Requests:

Message Body MIME type Sample Request
curl -i -u "uid=ucarroll,o=LTER,dc=ecoinformatics,dc=org:PASSWORD" -X POST https://pasta.lternet.edu/package/event/eml/120

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK If the operation is successful
400 Bad Request If the request contains an error, such as a request containing a non-integer subscriptionId value An error message text/plain The provided subscription ID 'abc' cannot be parsed as an integer.
401 Unauthorized If the requesting user is not authorized to execute the specified subscription An error message text/plain
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource. For example, the HTTP method was specified as DELETE but the resource can only support POST. An error message text/plain
409 Conflict If a subscription with the specified subscriptionId had been deleted previously An error message text/plain
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request. For example, a SQL error occurred, or an unexpected condition was encountered while processing the request An error message text/plain


GET : /event/eml

Query Event Subscriptions operation, returns a list of the subscriptions whose attributes match those specified in the query string. If a query string is omitted, all subscriptions in the subscription database will be returned for which the requesting user is authorized to read. If query parameters are included, they are used to filter that set of subscriptions based on their attributes.

Query parameters:

Query parameters are specified as key=value pairs, multiple pairs must be delimited with ampersands (&), and only a single value should be specified for a particular key. The following query parameter keys are allowed:

  • creator
  • scope
  • identifier
  • revision
  • url

If a query parameter is specified, and a subscription's respective attribute does not match it, that subscription will not be included in the group of subscriptions returned. If scope, identifier, or revision are used, their values must together constitute a syntactically and semantically correct EML packageId - either partial or complete. If url is used, its value must not contain ampersands. Therefore, if a subscription's URL contains ampersands, it cannot be filtered based on its URL.

Responses:

If the request is successful, the response entity will be an XML representation of the subscription group with the following syntax:

 <subscriptions>

    <subscription type="eml">
       <id>id</id>
       <creator>creator</creator>
       <packageId>packageId</packageId>
       <url>url</url>
    </subscription>

    ...

 </subscriptions>
 
Status Reason Entity MIME type
200 OK If the request was successful. The matching subscriptions. application/xml
400 Bad Request If the query string contains an error. An error message. text/plain
401 Unauthorized If the requesting user is not authorized to read subscriptions. An error message. text/plain


GET : /event/eml/{subscriptionId}

Get Event Subscription operation, returns the event subscription with the specified ID.

Responses:

If the request is successful, the response will contain an XML entity with the following syntax:

    <subscription type="eml">
       <id>id</id>
       <creator>creator</creator>
       <packageId>packageId</packageId>
       <url>url</url>
    </subscription>
 

The difference between this response entity and the request entity used to create the subscription is the addition of the id and creator elements, which are determined by the Event Manager upon subscription creation.

Status Reason Entity MIME type
200 OK If the request was successful. The specified subscription's attributes. application/xml
400 Bad Request If the specified identification number cannot be parsed as an integer. An error message. text/plain
401 Unauthorized If the requesting user is not authorized to read the specified subscription. An error message. text/plain
404 Not Found If a subscription has never existed in the subscription database with the specified identification number. An error message. text/plain
410 Gone If the specified subscription has been previously deleted. An error message. text/plain


GET : /event/eml/schema

Get Event Subscription Schema operation, returns the XML schema for event subscription creation request entities.

Responses:

Status Reason Entity MIME type
200 OK If the request was successful. The XML schema. application/xml


POST : /citation/eml

Create Journal Citation operation, creates a new journal citation entry in PASTA.

Request entity:

The request entity should be an XML document (MIME type application/xml) that contains the journal citation metadata. For example:

		 <journalCitation>
		 <packageId>edi.0.3</packageId>
		 <articleDoi>10.5072/FK2/06dccc7b0cb2a2d5f6fef62cb4b36dae</articleDoi>
		 <articleTitle>Tree Survey in Southern Arizona</articleTitle>
		 <articleUrl>http://swtrees.com/articles/12345</articleUrl>
		 <journalTitle>Journal of Southwestern Trees</journalTitle>
		 </journalCitation>
 

Responses:

Status Reason Entity MIME type
201 Created If the request was successful. None N/A
400 Bad Request If the request entity contains an error, such as improperly formatted XML, EML packageId, or URL. An error message. text/plain
401 Unauthorized If the requesting user is not authorized to create journal citations. An error message. text/plain
404 Not Found A data package with the specified package identifier was not found in the repository. An error message. text/plain
409 Conflict If a journal citation already exists with the same creator and attributes. An error message. text/plain


PUT : /citation/eml/{journalCitationId}

Update Journal Citation operation, updates an existing journal citation entry in PASTA.

Request entity:

The request entity should be an XML document (MIME type application/xml) that contains the journal citation metadata. For example:

		 <journalCitation>
		 <packageId>edi.0.3</packageId>
		 <articleDoi>10.5072/FK2/06dccc7b0cb2a2d5f6fef62cb4b36dae</articleDoi>
		 <articleTitle>Tree Survey in Southern Arizona</articleTitle>
		 <articleUrl>http://swtrees.com/articles/12345</articleUrl>
		 <journalTitle>Journal of Southwestern Trees</journalTitle>
		 </journalCitation>
 

Responses:

Status Reason Entity MIME type
201 Update If the request was successful. None N/A
400 Bad Request If the request entity contains an error, such as improperly formatted XML, EML packageId, or URL. An error message. text/plain
401 Unauthorized If the requesting user is not authorized to create journal citations. An error message. text/plain
404 Not Found A data package with the specified package identifier was not found in the repository. An error message. text/plain
409 Conflict If a journal citation already exists with the same creator and attributes. An error message. text/plain


DELETE : /citation/eml/{journalCitationId}

Delete Journal Citation operation, deletes the journal citation entry with the specified ID from the journal citation database.

Responses:

Status Reason Entity MIME type
200 OK If the request was successful. None N/A
400 Bad Request If the specified identification number cannot be parsed as an integer. An error message. text/plain
401 Unauthorized If the requesting user is not authorized to delete the specified journal citation entry. An error message. text/plain
404 Not Found If a journal citation entry does not exist in the database with the specified identification number. An error message. text/plain


GET : /citation/eml/{journalCitationId}

Get Journal Citation operation, returns metadata for a journal citation with the specified ID.

Responses:

If the request is successful, the response will contain an XML entity with the following syntax:

		 <journalCitation>
		 <journalCitationId>15</journalCitationId>
		 <principalOwner>uid=LNO,o=LTER,dc=ecoinformatics,dc=org</principalOwner>
		 <packageId>edi.0.3</packageId>
		 <articleDoi>10.5072/FK2/06dccc7b0cb2a2d5f6fef62cb4b36dae</articleDoi>
		 <articleTitle>Tree Survey in Southern Arizona</articleTitle>
		 <articleUrl>http://swtrees.com/articles/12345</articleUrl>
		 <journalTitle>Journal of Southwestern Trees</journalTitle>
		 </journalCitation>
 

The difference between this response entity and the request entity used to create the citation is the addition of the journalCitationId and principalOwner elements, which are determined upon journal citation creation.

Status Reason Entity MIME type
200 OK If the request was successful. The specified journal citation's attributes. application/xml
400 Bad Request If the specified identification number cannot be parsed as an integer. An error message. text/plain
401 Unauthorized If the requesting user is not authorized to read the specified journal citation. An error message. text/plain
404 Not Found If a journal citation entry does not exist in the database with the specified identification number. An error message. text/plain


GET : /citations/eml/{scope}/{identifier}/{revision}

List Data Package Citations operation, specifying the scope, identifier, and revision values to match in the URI.

Return all citations for a given data package series if the "?all" query parameter is appended to the URL.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/citations/eml/edi/1/1
none none curl -i -X GET https://pasta.lternet.edu/package/citations/eml/edi/1/1?all

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The list request was successful An XML-formatted list representing journal citations application/xml
		 <?xml version="1.0" encoding="UTF-8"?>
		 <journalCitations>
		 <journalCitation>
		 <journalCitationId>15</journalCitationId>
		 <packageId>edi.0.3</packageId>
		 <principalOwner>uid=LNO,o=LTER,dc=ecoinformatics,dc=org</principalOwner>
		 <dateCreated>2017-12-21T14:28:26.235</dateCreated>
		 <articleDoi>10.5072/FK2/06dccc7b0cb2a2d5f6fef62cb4b36dae</articleDoi>
		 <articleTitle>Tree Survey in Rio Rico, Arizona</articleTitle>
		 <articleUrl>http://myscience.com/articles/12345</articleUrl>
		 <journalTitle>Arizona Highways</journalTitle>
		 </journalCitation>
		 </journalCitations>
 
400 Bad Request The request contains an error, such as an illegal identifier or revision value An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to access a list of journal citations for the specified data package An error message text/plain Error message
404 Not Found An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message


GET : /citations/eml/{principalOwner}

List Principal Owner Citations operation, specifying the principal owner of the citations to be listed.

Requests:

Message Body MIME type Sample Request
none none curl -i -X GET https://pasta.lternet.edu/package/citations/eml/principalOwner

Responses:

Status Reason Message Body MIME type Sample Message Body
200 OK The list request was successful An XML-formatted list representing journal citations created by the specified principal owner application/xml
		 <?xml version="1.0" encoding="UTF-8"?>
		 <journalCitations>
		 <journalCitation>
		 <journalCitationId>15</journalCitationId>
		 <packageId>edi.0.3</packageId>
		 <principalOwner>uid=LNO,o=LTER,dc=ecoinformatics,dc=org</principalOwner>
		 <dateCreated>2017-12-21T14:28:26.235</dateCreated>
		 <articleDoi>10.5072/FK2/06dccc7b0cb2a2d5f6fef62cb4b36dae</articleDoi>
		 <articleTitle>Tree Survey in Rio Rico, Arizona</articleTitle>
		 <articleUrl>http://myscience.com/articles/12345</articleUrl>
		 <journalTitle>Arizona Highways</journalTitle>
		 </journalCitation>
		 </journalCitations>
 
400 Bad Request The request contains an error An error message text/plain Error message
401 Unauthorized The requesting user is not authorized to access a list of journal citations for the specified principal owner An error message text/plain Error message
405 Method Not Allowed The specified HTTP method is not allowed for the requested resource An error message text/plain Error message
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request An error message text/plain Error message