Correlations: Add DeleteCorrelation HTTP API (#51801)
* Correlations: add DeleteCorrelation HTTP API * fix error message copy * add readonly check * add source_uid in delete condition * make path singular * Revert "make path singular" This reverts commit d15be89578e202e5cb64a3e964ee09521b72d87c. * add tests * fix lint errors * fix lint errors * change casing * update spec * Remove transaction * change casing in param name in docs
This commit is contained in:
@@ -31,3 +31,30 @@ type CreateCorrelationResponse struct {
|
||||
// in: body
|
||||
Body correlations.CreateCorrelationResponse `json:"body"`
|
||||
}
|
||||
|
||||
// swagger:route DELETE /datasources/uid/{uid}/correlations/{correlationUID} correlations deleteCorrelation
|
||||
//
|
||||
// Delete a correlation.
|
||||
//
|
||||
// Responses:
|
||||
// 200: deleteCorrelationResponse
|
||||
// 401: unauthorisedError
|
||||
// 403: forbiddenError
|
||||
// 404: notFoundError
|
||||
// 500: internalServerError
|
||||
|
||||
// swagger:parameters deleteCorrelation
|
||||
type DeleteCorrelationParams struct {
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceUID string `json:"uid"`
|
||||
// in:path
|
||||
// required:true
|
||||
CorrelationUID string `json:"correlationUID"`
|
||||
}
|
||||
|
||||
//swagger:response deleteCorrelationResponse
|
||||
type DeleteCorrelationResponse struct {
|
||||
// in: body
|
||||
Body correlations.DeleteCorrelationResponse `json:"body"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user