Skip to content

Draft Records

Overview

This endpoint provides a way to retrieve draft records from the Contact system. Draft records are documents that are still being prepared or are not yet finalized. This endpoint supports various query parameters to filter, sort, and paginate the results, making it easier to manage and review draft documents.

Endpoint

GET /api/v2013/documents

The request must include the following headers:

FieldTypeDescription
Content-TypeStringSpecifies the media type of the request body. This header indicates the format of the data being sent to the server. The allowed value is application/json, which means the request body is formatted as JSON. This helps the server understand how to parse and process the incoming data.
AuthorizationStringProvides the token used to authenticate the request. This header is essential for identifying and verifying the client making the request. The token should be included in the header to gain access to protected resources or services. Ensure that the token is kept secure and is valid for the requested operation.
RealmStringDefines the specific context or environment in which the Clearing-House request is being made. The allowed values are abs, chm, and bch, each representing different operational contexts. This helps the server route the request appropriately based on the specified realm.
AcceptStringSpecifies the format in which the client expects the server to return the response data. The allowed value is application/json, indicating that the client prefers the response in JSON format. This informs the server of the desired response format, ensuring that the client receives data in a readable and expected format.

Realm Values for Development:

  • abs-dev: Represents the development environment for ABS (Access and Benefit-sharing Clearing-House). Use this value when testing or developing features related to ABS in a non-production setting.
  • bch-dev: Indicates the development environment for BCH (Biosafety Clearing-House). This value is used for testing or development purposes related to BCH functionalities.
  • chm-dev: Specifies the development environment for CHM (Central Clearing-House Mechanism). This realm is used when working on features or testing in the CHM context within a development environment.

Headers required to authenticate and define the context and format of the request and response. The Authorization header must contain a valid token, while the Content-Type and Accept headers specify the format of the document and response, respectively. Here are the steps to get the Authorization token.

Query Parameters

The following query parameters can be used to refine the request:

FieldTypeDescription
collectionStringOptional. Specifies the collection or category of resources to query. This option allows clients to target specific sets of resources. The allowed values are my for a personal collection and mydrafts for draft items or documents. This helps in narrowing down the search to particular subsets of resources based on their classification or status.
$filterStringOptional. The $filter system query option allows clients to apply conditions to filter the results of a query. By using $filter, clients can retrieve only those resources that meet specific criteria, such as matching certain values or falling within a certain range. For detailed usage and examples, see the OData $filter documentation.
$orderbyStringOptional. The $orderby system query option allows clients to specify the order in which resources should be returned. This enables sorting of results based on one or more properties, such as sorting by date, name, or other attributes. The specified sorting order helps in organizing the results in a meaningful way. For detailed usage and examples, see the OData $orderby documentation.
$topStringOptional. The $top system query option limits the number of items returned in the query result. This is useful for controlling the size of the result set, particularly for pagination or for retrieving a specific subset of items. For example, setting $top=10 would return only the top 10 items from the query result. For detailed usage and examples, see the OData $top documentation.
$skipStringOptional. The $skip system query option specifies the number of items to be skipped from the beginning of the result set. This is often used in combination with $top to implement pagination, where $skip determines how many items to ignore before starting to include results. For example, setting $skip=20 would skip the first 20 items and start returning results from the 21st item onward. For detailed usage and examples, see the OData $skip documentation.

Playground

Swagger playground is loading, please wait...