Class ApiProductDocumentsApi

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

public class ApiProductDocumentsApi extends Object
  • Constructor Details

    • ApiProductDocumentsApi

      public ApiProductDocumentsApi()
    • ApiProductDocumentsApi

      public ApiProductDocumentsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • addAPIProductDocumentCall

      public okhttp3.Call addAPIProductDocumentCall(String apiProductId, DocumentDTO documentDTO, ApiCallback _callback) throws ApiException
      Build call for addAPIProductDocument
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentDTO - Document object that needs to be added (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • addAPIProductDocument

      public DocumentDTO addAPIProductDocument(String apiProductId, DocumentDTO documentDTO) throws ApiException
      Add a New Document to an API Product This operation can be used to add a new documentation to an API Product. This operation only adds the metadata of a document. To add the actual content we need to use **Upload the content of an API Product document ** API once we obtain a document Id by this operation.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentDTO - Document object that needs to be added (required)
      Returns:
      DocumentDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • addAPIProductDocumentWithHttpInfo

      public ApiResponse<DocumentDTO> addAPIProductDocumentWithHttpInfo(String apiProductId, DocumentDTO documentDTO) throws ApiException
      Add a New Document to an API Product This operation can be used to add a new documentation to an API Product. This operation only adds the metadata of a document. To add the actual content we need to use **Upload the content of an API Product document ** API once we obtain a document Id by this operation.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentDTO - Document object that needs to be added (required)
      Returns:
      ApiResponse<DocumentDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • addAPIProductDocumentAsync

      public okhttp3.Call addAPIProductDocumentAsync(String apiProductId, DocumentDTO documentDTO, ApiCallback<DocumentDTO> _callback) throws ApiException
      Add a New Document to an API Product (asynchronously) This operation can be used to add a new documentation to an API Product. This operation only adds the metadata of a document. To add the actual content we need to use **Upload the content of an API Product document ** API once we obtain a document Id by this operation.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentDTO - Document object that needs to be added (required)
      _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
    • addAPIProductDocumentContentCall

      public okhttp3.Call addAPIProductDocumentContentCall(String apiProductId, String documentId, String ifMatch, File file, String inlineContent, ApiCallback _callback) throws ApiException
      Build call for addAPIProductDocumentContent
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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
    • addAPIProductDocumentContent

      public DocumentDTO addAPIProductDocumentContent(String apiProductId, String documentId, String ifMatch, File file, String inlineContent) throws ApiException
      Upload the Content of an API Product Document Thid operation can be used to upload a file or add inline content to an API Product 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:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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
    • addAPIProductDocumentContentWithHttpInfo

      public ApiResponse<DocumentDTO> addAPIProductDocumentContentWithHttpInfo(String apiProductId, String documentId, String ifMatch, File file, String inlineContent) throws ApiException
      Upload the Content of an API Product Document Thid operation can be used to upload a file or add inline content to an API Product 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:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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
    • addAPIProductDocumentContentAsync

      public okhttp3.Call addAPIProductDocumentContentAsync(String apiProductId, String documentId, String ifMatch, File file, String inlineContent, ApiCallback<DocumentDTO> _callback) throws ApiException
      Upload the Content of an API Product Document (asynchronously) Thid operation can be used to upload a file or add inline content to an API Product 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:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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
    • deleteAPIProductDocumentCall

      public okhttp3.Call deleteAPIProductDocumentCall(String apiProductId, String documentId, String ifMatch, ApiCallback _callback) throws ApiException
      Build call for deleteAPIProductDocument
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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
    • deleteAPIProductDocument

      public void deleteAPIProductDocument(String apiProductId, String documentId, String ifMatch) throws ApiException
      Delete a Document of an API Product This operation can be used to delete a document associated with an API Product.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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
    • deleteAPIProductDocumentWithHttpInfo

      public ApiResponse<Void> deleteAPIProductDocumentWithHttpInfo(String apiProductId, String documentId, String ifMatch) throws ApiException
      Delete a Document of an API Product This operation can be used to delete a document associated with an API Product.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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
    • deleteAPIProductDocumentAsync

      public okhttp3.Call deleteAPIProductDocumentAsync(String apiProductId, String documentId, String ifMatch, ApiCallback<Void> _callback) throws ApiException
      Delete a Document of an API Product (asynchronously) This operation can be used to delete a document associated with an API Product.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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
    • getAPIProductDocumentCall

      public okhttp3.Call getAPIProductDocumentCall(String apiProductId, String documentId, String accept, String ifNoneMatch, ApiCallback _callback) throws ApiException
      Build call for getAPIProductDocument
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentId - Document Identifier (required)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      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
    • getAPIProductDocument

      public DocumentDTO getAPIProductDocument(String apiProductId, String documentId, String accept, String ifNoneMatch) throws ApiException
      Get a Document of an API Product This operation can be used to retrieve a particular document's metadata associated with an API.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentId - Document Identifier (required)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      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
    • getAPIProductDocumentWithHttpInfo

      public ApiResponse<DocumentDTO> getAPIProductDocumentWithHttpInfo(String apiProductId, String documentId, String accept, String ifNoneMatch) throws ApiException
      Get a Document of an API Product This operation can be used to retrieve a particular document's metadata associated with an API.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentId - Document Identifier (required)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      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
    • getAPIProductDocumentAsync

      public okhttp3.Call getAPIProductDocumentAsync(String apiProductId, String documentId, String accept, String ifNoneMatch, ApiCallback<DocumentDTO> _callback) throws ApiException
      Get a Document of an API Product (asynchronously) This operation can be used to retrieve a particular document's metadata associated with an API.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentId - Document Identifier (required)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      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
    • getAPIProductDocumentContentCall

      public okhttp3.Call getAPIProductDocumentContentCall(String apiProductId, String documentId, String accept, String ifNoneMatch, ApiCallback _callback) throws ApiException
      Build call for getAPIProductDocumentContent
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentId - Document Identifier (required)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      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
    • getAPIProductDocumentContent

      public void getAPIProductDocumentContent(String apiProductId, String documentId, String accept, String ifNoneMatch) throws ApiException
      Get the Content of an API Product 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:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentId - Document Identifier (required)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPIProductDocumentContentWithHttpInfo

      public ApiResponse<Void> getAPIProductDocumentContentWithHttpInfo(String apiProductId, String documentId, String accept, String ifNoneMatch) throws ApiException
      Get the Content of an API Product 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:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentId - Document Identifier (required)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPIProductDocumentContentAsync

      public okhttp3.Call getAPIProductDocumentContentAsync(String apiProductId, String documentId, String accept, String ifNoneMatch, ApiCallback<Void> _callback) throws ApiException
      Get the Content of an API Product 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:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (required)
      documentId - Document Identifier (required)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      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
    • getAPIProductDocumentsCall

      public okhttp3.Call getAPIProductDocumentsCall(String apiProductId, Integer limit, Integer offset, String accept, String ifNoneMatch, ApiCallback _callback) throws ApiException
      Build call for getAPIProductDocuments
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      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
    • getAPIProductDocuments

      public DocumentListDTO getAPIProductDocuments(String apiProductId, Integer limit, Integer offset, String accept, String ifNoneMatch) throws ApiException
      Get a List of Documents of an API Product This operation can be used to retrive a list of documents belonging to an API Product by providing the id of the API Product.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      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
    • getAPIProductDocumentsWithHttpInfo

      public ApiResponse<DocumentListDTO> getAPIProductDocumentsWithHttpInfo(String apiProductId, Integer limit, Integer offset, String accept, String ifNoneMatch) throws ApiException
      Get a List of Documents of an API Product This operation can be used to retrive a list of documents belonging to an API Product by providing the id of the API Product.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      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
    • getAPIProductDocumentsAsync

      public okhttp3.Call getAPIProductDocumentsAsync(String apiProductId, Integer limit, Integer offset, String accept, String ifNoneMatch, ApiCallback<DocumentListDTO> _callback) throws ApiException
      Get a List of Documents of an API Product (asynchronously) This operation can be used to retrive a list of documents belonging to an API Product by providing the id of the API Product.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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)
      accept - Media types acceptable for the response. Default is application/json. (optional, default to "application/json")
      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
    • updateAPIProductDocumentCall

      public okhttp3.Call updateAPIProductDocumentCall(String apiProductId, String documentId, DocumentDTO documentDTO, String ifMatch, ApiCallback _callback) throws ApiException
      Build call for updateAPIProductDocument
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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
    • updateAPIProductDocument

      public DocumentDTO updateAPIProductDocument(String apiProductId, String documentId, DocumentDTO documentDTO, String ifMatch) throws ApiException
      Update a Document of an API Product This operation can be used to update metadata of an API's document.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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
    • updateAPIProductDocumentWithHttpInfo

      public ApiResponse<DocumentDTO> updateAPIProductDocumentWithHttpInfo(String apiProductId, String documentId, DocumentDTO documentDTO, String ifMatch) throws ApiException
      Update a Document of an API Product This operation can be used to update metadata of an API's document.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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
    • updateAPIProductDocumentAsync

      public okhttp3.Call updateAPIProductDocumentAsync(String apiProductId, String documentId, DocumentDTO documentDTO, String ifMatch, ApiCallback<DocumentDTO> _callback) throws ApiException
      Update a Document of an API Product (asynchronously) This operation can be used to update metadata of an API's document.
      Parameters:
      apiProductId - **API Product ID** consisting of the **UUID** of the API Product. Using the **UUID** in the API call is recommended. (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