@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api QnAMaker Client
@version 4.0
@auth ApiKey Ocp-Apim-Subscription-Key in header
@endpoints 15
@toc endpointSettings(2), endpointkeys(2), alterations(2), knowledgebases(8), operations(1)

@group endpointSettings
@endpoint GET /endpointSettings
@desc Gets endpoint settings for an endpoint.
@returns(200) Response with endpoint settings info in it.

@endpoint PATCH /endpointSettings
@desc Updates endpoint settings for an endpoint.
@required {endpointSettingsPayload: map # Post body of the request.}
@returns(204) HTTP 204 No Content.

@endgroup

@group endpointkeys
@endpoint GET /endpointkeys
@desc Gets endpoint keys for an endpoint
@returns(200) Response with endpoint info in it.

@endpoint PATCH /endpointkeys/{keyType}
@desc Re-generates an endpoint key.
@required {keyType: any # Type of Key}
@returns(200) Details of the endpoint keys generated.

@endgroup

@group alterations
@endpoint GET /alterations
@desc Download alterations from runtime.
@returns(200) Alterations data.

@endpoint PUT /alterations
@desc Replace alterations data.
@required {wordAlterations: map # New alterations data.}
@returns(204) HTTP 204 No Content.

@endgroup

@group knowledgebases
@endpoint GET /knowledgebases
@desc Gets all knowledgebases for a user.
@returns(200) Collection of knowledgebases.

@endgroup

@group operations
@endpoint GET /operations/{operationId}
@desc Gets details of a specific long running operation.
@required {operationId: any # Operation id.}
@returns(200) Details of the long running operation.

@endgroup

@group knowledgebases
@endpoint GET /knowledgebases/{kbId}
@desc Gets details of a specific knowledgebase.
@required {kbId: any # Knowledgebase id.}
@returns(200) Details of the knowledgebase.

@endpoint DELETE /knowledgebases/{kbId}
@desc Deletes the knowledgebase and all its data.
@required {kbId: any # Knowledgebase id.}
@returns(204) HTTP 204 No content.

@endpoint POST /knowledgebases/{kbId}
@desc Publishes all changes in test index of a knowledgebase to its prod index.
@required {kbId: any # Knowledgebase id.}
@returns(204) HTTP 204 No content.

@endpoint PUT /knowledgebases/{kbId}
@desc Replace knowledgebase contents.
@required {kbId: any # Knowledgebase id., replaceKb: map # An instance of ReplaceKbDTO which contains list of qnas to be uploaded}
@returns(204) HTTP 204 No content.

@endpoint PATCH /knowledgebases/{kbId}
@desc Asynchronous operation to modify a knowledgebase.
@required {kbId: any # Knowledgebase id., updateKb: map # Post body of the request.}
@returns(202) Details of the asynchronous operation.

@endpoint POST /knowledgebases/create
@desc Asynchronous operation to create a new knowledgebase.
@required {createKbPayload: map # Post body of the request.}
@returns(202) Details of the asynchronous operation.

@endpoint GET /knowledgebases/{kbId}/{environment}/qna
@desc Download the knowledgebase.
@required {kbId: any # Knowledgebase id., environment: any # Specifies whether environment is Test or Prod.}
@optional {source: any # The source property filter to apply. Sample value: Editorial, smartLight%20FAQ.tsv ., changedSince: any # changedSince property is used to return all QnAs created or updated after a specific time duration. The user can filter QnAs by seconds (s), minutes (m), hours (h) and days (d). The user may use any integral value along with the suffix for time. For instance, the value of 5m returns all QnA pairs updated or created in the last 5 minutes.}
@returns(200) Collection of all Q-A in the knowledgebase.

@endgroup

@end
