Draft Securities
Can Create
Overview
The "Can Create" endpoint determines whether a user has the necessary permissions to create a draft version of a document identified by the provided uid
. It checks the user's access rights based on the specified security context and metadata associated with the document. This endpoint is essential for ensuring that only authorized users can initiate or modify draft documents within the system.
Endpoint
GET /api/v2013/documents/{uid}/versions/draft/securities/create
Headers
The request must include the following headers:
Field | Type | Description |
---|---|---|
Content-Type | String | Specifies 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. |
Authorization | String | Provides 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. |
Realm | String | Defines 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. |
Accept | String | Specifies 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:
Field | Type | Description |
---|---|---|
schema | String | Defines the format or schema of the document being posted. This field specifies the type and structure of the document to ensure it conforms to a predefined format or standard. It helps the system interpret and validate the incoming data correctly. The value for schema typically corresponds to a specific schema definition that outlines the required fields, data types, and constraints for the document. This ensures that the document adheres to the expected structure and is compatible with the system's processing rules. |
metadata | Object | Optional. Contains additional information about the document that can be used to determine security access and other attributes. The metadata object can include various parameters depending on the document type and its requirements. This may encompass information such as access permissions, document classification, or other contextual data that helps manage the document effectively. The structure and content of metadata may vary based on the specific needs and configuration of the document type. |
government | String | Optional. Specifies the government code associated with the record for national records. The value should adhere to the "ISO 3166-1 alpha-2" standard, which uses two-letter country codes to represent different countries. This field is used to assign or categorize the record under a specific national jurisdiction or government entity. For records that are not tied to a national context, this field may be omitted or left blank. |
URL Parameters
The following URL parameter is required:
Field | Type | Description |
---|---|---|
uid | String | A unique identifier for the document. This value is case-sensitive and must conform to the regular expression /^[A-Za-z0-9\-_]{11,128}$/ . This pattern allows for a combination of uppercase and lowercase letters, numbers, hyphens, and underscores, with a length ranging from 11 to 128 characters. The uid is crucial for uniquely identifying and retrieving the document within the system, ensuring that each document can be distinctly referenced and managed. It plays a key role in operations such as fetching, updating, or deleting the document, as well as in maintaining the integrity of document management processes. |
Playground
Swagger playground is loading, please wait...
Can Delete
Overview
The "Can Delete" endpoint checks whether the current user has the necessary permissions to delete a draft version of a document specified by the uid
. This endpoint is crucial for verifying that a user has the appropriate authorization to remove a draft document from the system. It ensures that deletion operations are performed only by users with the correct access rights.
Endpoint
GET /api/v2013/documents/{uid}/versions/draft/securities/delete
Headers
The request must include the following headers:
Field | Type | Description |
---|---|---|
Content-Type | String | Specifies 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. |
Authorization | String | Provides 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. |
Realm | String | Defines 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. |
Accept | String | Specifies 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.
URL Parameters
The following URL parameter is required:
Field | Type | Description |
---|---|---|
uid | String | A unique identifier for the document. This value is case-sensitive and must conform to the regular expression /^[A-Za-z0-9\-_]{11,128}$/ . This pattern allows for a combination of uppercase and lowercase letters, numbers, hyphens, and underscores, with a length ranging from 11 to 128 characters. The uid is crucial for uniquely identifying and retrieving the document within the system, ensuring that each document can be distinctly referenced and managed. It plays a key role in operations such as fetching, updating, or deleting the document, as well as in maintaining the integrity of document management processes. |
Playground
Swagger playground is loading, please wait...
Can Update
Overview
The "Can Update" endpoint is used to determine if the current user has the necessary permissions to update a draft version of a document specified by the uid
. This endpoint plays a crucial role in ensuring that only authorized users can make changes to draft documents, thereby protecting the integrity and security of document updates within the system.
Endpoint
GET /api/v2013/documents/{uid}/versions/draft/securities/update
Headers
The request must include the following headers:
Field | Type | Description |
---|---|---|
Content-Type | String | Specifies 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. |
Authorization | String | Provides 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. |
Realm | String | Defines 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. |
Accept | String | Specifies 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:
Field | Type | Description |
---|---|---|
schema | String | Defines the format or schema of the document being posted. This field specifies the type and structure of the document to ensure it conforms to a predefined format or standard. It helps the system interpret and validate the incoming data correctly. The value for schema typically corresponds to a specific schema definition that outlines the required fields, data types, and constraints for the document. This ensures that the document adheres to the expected structure and is compatible with the system's processing rules. |
metadata | Object | Optional. Contains additional information about the document that can be used to determine security access and other attributes. The metadata object can include various parameters depending on the document type and its requirements. This may encompass information such as access permissions, document classification, or other contextual data that helps manage the document effectively. The structure and content of metadata may vary based on the specific needs and configuration of the document type. |
government | String | Optional. Specifies the government code associated with the record for national records. The value should adhere to the "ISO 3166-1 alpha-2" standard, which uses two-letter country codes to represent different countries. This field is used to assign or categorize the record under a specific national jurisdiction or government entity. For records that are not tied to a national context, this field may be omitted or left blank. |
URL Parameters
The following URL parameter is required:
Field | Type | Description |
---|---|---|
uid | String | A unique identifier for the document. This value is case-sensitive and must conform to the regular expression /^[A-Za-z0-9\-_]{11,128}$/ . This pattern allows for a combination of uppercase and lowercase letters, numbers, hyphens, and underscores, with a length ranging from 11 to 128 characters. The uid is crucial for uniquely identifying and retrieving the document within the system, ensuring that each document can be distinctly referenced and managed. It plays a key role in operations such as fetching, updating, or deleting the document, as well as in maintaining the integrity of document management processes. |
Playground
Swagger playground is loading, please wait...