Class ApiDocumentsApi

java.lang.Object
org.wso2.am.integration.clients.publisher.api.v1.ApiDocumentsApi

public class ApiDocumentsApi extends Object
  • Constructor Details

    • ApiDocumentsApi

      public ApiDocumentsApi()
    • ApiDocumentsApi

      public ApiDocumentsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • addAPIDocumentCall

      public okhttp3.Call addAPIDocumentCall(String apiId, DocumentDTO documentDTO, String ifMatch, ApiCallback _callback) throws ApiException
      Build call for addAPIDocument
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentDTO - Document object that needs to be added (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • addAPIDocument

      public DocumentDTO addAPIDocument(String apiId, DocumentDTO documentDTO, String ifMatch) throws ApiException
      Add a New Document to an API This operation can be used to add a new documentation to an API. This operation only adds the metadata of a document. To add the actual content we need to use **Upload the content of an API document ** API once we obtain a document Id by this operation.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentDTO - Document object that needs to be added (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      Returns:
      DocumentDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • addAPIDocumentWithHttpInfo

      public ApiResponse<DocumentDTO> addAPIDocumentWithHttpInfo(String apiId, DocumentDTO documentDTO, String ifMatch) throws ApiException
      Add a New Document to an API This operation can be used to add a new documentation to an API. This operation only adds the metadata of a document. To add the actual content we need to use **Upload the content of an API document ** API once we obtain a document Id by this operation.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentDTO - Document object that needs to be added (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      Returns:
      ApiResponse<DocumentDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • addAPIDocumentAsync

      public okhttp3.Call addAPIDocumentAsync(String apiId, DocumentDTO documentDTO, String ifMatch, ApiCallback<DocumentDTO> _callback) throws ApiException
      Add a New Document to an API (asynchronously) This operation can be used to add a new documentation to an API. This operation only adds the metadata of a document. To add the actual content we need to use **Upload the content of an API document ** API once we obtain a document Id by this operation.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentDTO - Document object that needs to be added (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • addAPIDocumentContentCall

      public okhttp3.Call addAPIDocumentContentCall(String apiId, String documentId, String ifMatch, File file, String inlineContent, ApiCallback _callback) throws ApiException
      Build call for addAPIDocumentContent
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      file - Document to upload (optional)
      inlineContent - Inline content of the document (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • addAPIDocumentContent

      public DocumentDTO addAPIDocumentContent(String apiId, String documentId, String ifMatch, File file, String inlineContent) throws ApiException
      Upload the Content of an API Document Thid operation can be used to upload a file or add inline content to an API document. **IMPORTANT:** * Either **file** or **inlineContent** form data parameters should be specified at one time. * Document's source type should be **FILE** in order to upload a file to the document using **file** parameter. * Document's source type should be **INLINE** in order to add inline content to the document using **inlineContent** parameter.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      file - Document to upload (optional)
      inlineContent - Inline content of the document (optional)
      Returns:
      DocumentDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • addAPIDocumentContentWithHttpInfo

      public ApiResponse<DocumentDTO> addAPIDocumentContentWithHttpInfo(String apiId, String documentId, String ifMatch, File file, String inlineContent) throws ApiException
      Upload the Content of an API Document Thid operation can be used to upload a file or add inline content to an API document. **IMPORTANT:** * Either **file** or **inlineContent** form data parameters should be specified at one time. * Document's source type should be **FILE** in order to upload a file to the document using **file** parameter. * Document's source type should be **INLINE** in order to add inline content to the document using **inlineContent** parameter.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      file - Document to upload (optional)
      inlineContent - Inline content of the document (optional)
      Returns:
      ApiResponse<DocumentDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • addAPIDocumentContentAsync

      public okhttp3.Call addAPIDocumentContentAsync(String apiId, String documentId, String ifMatch, File file, String inlineContent, ApiCallback<DocumentDTO> _callback) throws ApiException
      Upload the Content of an API Document (asynchronously) Thid operation can be used to upload a file or add inline content to an API document. **IMPORTANT:** * Either **file** or **inlineContent** form data parameters should be specified at one time. * Document's source type should be **FILE** in order to upload a file to the document using **file** parameter. * Document's source type should be **INLINE** in order to add inline content to the document using **inlineContent** parameter.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      file - Document to upload (optional)
      inlineContent - Inline content of the document (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • deleteAPIDocumentCall

      public okhttp3.Call deleteAPIDocumentCall(String apiId, String documentId, String ifMatch, ApiCallback _callback) throws ApiException
      Build call for deleteAPIDocument
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • deleteAPIDocument

      public void deleteAPIDocument(String apiId, String documentId, String ifMatch) throws ApiException
      Delete a Document of an API This operation can be used to delete a document associated with an API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteAPIDocumentWithHttpInfo

      public ApiResponse<Void> deleteAPIDocumentWithHttpInfo(String apiId, String documentId, String ifMatch) throws ApiException
      Delete a Document of an API This operation can be used to delete a document associated with an API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteAPIDocumentAsync

      public okhttp3.Call deleteAPIDocumentAsync(String apiId, String documentId, String ifMatch, ApiCallback<Void> _callback) throws ApiException
      Delete a Document of an API (asynchronously) This operation can be used to delete a document associated with an API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • getAPIDocumentByDocumentIdCall

      public okhttp3.Call getAPIDocumentByDocumentIdCall(String apiId, String documentId, String ifNoneMatch, ApiCallback _callback) throws ApiException
      Build call for getAPIDocumentByDocumentId
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getAPIDocumentByDocumentId

      public DocumentDTO getAPIDocumentByDocumentId(String apiId, String documentId, String ifNoneMatch) throws ApiException
      Get a Document of an API This operation can be used to retrieve a particular document's metadata associated with an API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Returns:
      DocumentDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPIDocumentByDocumentIdWithHttpInfo

      public ApiResponse<DocumentDTO> getAPIDocumentByDocumentIdWithHttpInfo(String apiId, String documentId, String ifNoneMatch) throws ApiException
      Get a Document of an API This operation can be used to retrieve a particular document's metadata associated with an API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Returns:
      ApiResponse<DocumentDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPIDocumentByDocumentIdAsync

      public okhttp3.Call getAPIDocumentByDocumentIdAsync(String apiId, String documentId, String ifNoneMatch, ApiCallback<DocumentDTO> _callback) throws ApiException
      Get a Document of an API (asynchronously) This operation can be used to retrieve a particular document's metadata associated with an API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • getAPIDocumentContentByDocumentIdCall

      public okhttp3.Call getAPIDocumentContentByDocumentIdCall(String apiId, String documentId, String ifNoneMatch, ApiCallback _callback) throws ApiException
      Build call for getAPIDocumentContentByDocumentId
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getAPIDocumentContentByDocumentId

      public String getAPIDocumentContentByDocumentId(String apiId, String documentId, String ifNoneMatch) throws ApiException
      Get the Content of an API Document This operation can be used to retrive the content of an API's document. The document can be of 3 types. In each cases responses are different. 1. **Inline type**: The content of the document will be retrieved in `text/plain` content type _Sample cURL_ : `curl -k -H \"Authorization:Bearer 579f0af4-37be-35c7-81a4-f1f1e9ee7c51\" -F inlineContent=@\"docs.txt\" -X POST \"https://localhost:9443/api/am/publisher/v4/apis/995a4972-3178-4b17-a374-756e0e19127c/documents/43c2bcce-60e7-405f-bc36-e39c0c5e189e/content` 2. **FILE type**: The file will be downloaded with the related content type (eg. `application/pdf`) 3. **URL type**: The client will recieve the URL of the document as the Location header with the response with - `303 See Other`
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Returns:
      String
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPIDocumentContentByDocumentIdWithHttpInfo

      public ApiResponse<String> getAPIDocumentContentByDocumentIdWithHttpInfo(String apiId, String documentId, String ifNoneMatch) throws ApiException
      Get the Content of an API Document This operation can be used to retrive the content of an API's document. The document can be of 3 types. In each cases responses are different. 1. **Inline type**: The content of the document will be retrieved in `text/plain` content type _Sample cURL_ : `curl -k -H \"Authorization:Bearer 579f0af4-37be-35c7-81a4-f1f1e9ee7c51\" -F inlineContent=@\"docs.txt\" -X POST \"https://localhost:9443/api/am/publisher/v4/apis/995a4972-3178-4b17-a374-756e0e19127c/documents/43c2bcce-60e7-405f-bc36-e39c0c5e189e/content` 2. **FILE type**: The file will be downloaded with the related content type (eg. `application/pdf`) 3. **URL type**: The client will recieve the URL of the document as the Location header with the response with - `303 See Other`
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Returns:
      ApiResponse<String>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPIDocumentContentByDocumentIdAsync

      public okhttp3.Call getAPIDocumentContentByDocumentIdAsync(String apiId, String documentId, String ifNoneMatch, ApiCallback<String> _callback) throws ApiException
      Get the Content of an API Document (asynchronously) This operation can be used to retrive the content of an API's document. The document can be of 3 types. In each cases responses are different. 1. **Inline type**: The content of the document will be retrieved in `text/plain` content type _Sample cURL_ : `curl -k -H \"Authorization:Bearer 579f0af4-37be-35c7-81a4-f1f1e9ee7c51\" -F inlineContent=@\"docs.txt\" -X POST \"https://localhost:9443/api/am/publisher/v4/apis/995a4972-3178-4b17-a374-756e0e19127c/documents/43c2bcce-60e7-405f-bc36-e39c0c5e189e/content` 2. **FILE type**: The file will be downloaded with the related content type (eg. `application/pdf`) 3. **URL type**: The client will recieve the URL of the document as the Location header with the response with - `303 See Other`
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • getAPIDocumentsCall

      public okhttp3.Call getAPIDocumentsCall(String apiId, Integer limit, Integer offset, String ifNoneMatch, ApiCallback _callback) throws ApiException
      Build call for getAPIDocuments
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      limit - Maximum size of resource array to return. (optional, default to 25)
      offset - Starting point within the complete list of items qualified. (optional, default to 0)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getAPIDocuments

      public DocumentListDTO getAPIDocuments(String apiId, Integer limit, Integer offset, String ifNoneMatch) throws ApiException
      Get a List of Documents of an API This operation can be used to retrieve a list of documents belonging to an API by providing the id of the API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      limit - Maximum size of resource array to return. (optional, default to 25)
      offset - Starting point within the complete list of items qualified. (optional, default to 0)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Returns:
      DocumentListDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPIDocumentsWithHttpInfo

      public ApiResponse<DocumentListDTO> getAPIDocumentsWithHttpInfo(String apiId, Integer limit, Integer offset, String ifNoneMatch) throws ApiException
      Get a List of Documents of an API This operation can be used to retrieve a list of documents belonging to an API by providing the id of the API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      limit - Maximum size of resource array to return. (optional, default to 25)
      offset - Starting point within the complete list of items qualified. (optional, default to 0)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Returns:
      ApiResponse<DocumentListDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPIDocumentsAsync

      public okhttp3.Call getAPIDocumentsAsync(String apiId, Integer limit, Integer offset, String ifNoneMatch, ApiCallback<DocumentListDTO> _callback) throws ApiException
      Get a List of Documents of an API (asynchronously) This operation can be used to retrieve a list of documents belonging to an API by providing the id of the API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      limit - Maximum size of resource array to return. (optional, default to 25)
      offset - Starting point within the complete list of items qualified. (optional, default to 0)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • updateAPIDocumentCall

      public okhttp3.Call updateAPIDocumentCall(String apiId, String documentId, DocumentDTO documentDTO, String ifMatch, ApiCallback _callback) throws ApiException
      Build call for updateAPIDocument
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      documentDTO - Document object that needs to be added (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • updateAPIDocument

      public DocumentDTO updateAPIDocument(String apiId, String documentId, DocumentDTO documentDTO, String ifMatch) throws ApiException
      Update a Document of an API This operation can be used to update metadata of an API's document.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      documentDTO - Document object that needs to be added (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      Returns:
      DocumentDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateAPIDocumentWithHttpInfo

      public ApiResponse<DocumentDTO> updateAPIDocumentWithHttpInfo(String apiId, String documentId, DocumentDTO documentDTO, String ifMatch) throws ApiException
      Update a Document of an API This operation can be used to update metadata of an API's document.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      documentDTO - Document object that needs to be added (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      Returns:
      ApiResponse<DocumentDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateAPIDocumentAsync

      public okhttp3.Call updateAPIDocumentAsync(String apiId, String documentId, DocumentDTO documentDTO, String ifMatch, ApiCallback<DocumentDTO> _callback) throws ApiException
      Update a Document of an API (asynchronously) This operation can be used to update metadata of an API's document.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      documentId - Document Identifier (required)
      documentDTO - Document object that needs to be added (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • validateDocumentCall

      public okhttp3.Call validateDocumentCall(String apiId, String name, String ifMatch, ApiCallback _callback) throws ApiException
      Build call for validateDocument
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      name - The name of the document which needs to be checked for the existance. (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • validateDocument

      public void validateDocument(String apiId, String name, String ifMatch) throws ApiException
      Check Whether a Document with the Provided Name Exist This operation can be used to verify the document name exists or not.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      name - The name of the document which needs to be checked for the existance. (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • validateDocumentWithHttpInfo

      public ApiResponse<Void> validateDocumentWithHttpInfo(String apiId, String name, String ifMatch) throws ApiException
      Check Whether a Document with the Provided Name Exist This operation can be used to verify the document name exists or not.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      name - The name of the document which needs to be checked for the existance. (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • validateDocumentAsync

      public okhttp3.Call validateDocumentAsync(String apiId, String name, String ifMatch, ApiCallback<Void> _callback) throws ApiException
      Check Whether a Document with the Provided Name Exist (asynchronously) This operation can be used to verify the document name exists or not.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      name - The name of the document which needs to be checked for the existance. (required)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object