Skip to content

Commit 420c3d3

Browse files
committed
make path singular
1 parent 4585d81 commit 420c3d3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/sources/developers/http_api/correlations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ This API can be used to define correlations between data sources.
1919

2020
## Create correlations
2121

22-
`POST /api/datasources/uid/:sourceUid/correlations`
22+
`POST /api/datasources/uid/:sourceUid/correlation`
2323

2424
Creates a correlation between two data sources - the source data source indicated by the path UID, and the target data source which is specified in the body.
2525

2626
**Example request:**
2727

2828
```http
29-
POST /api/datasources/uid/uyBf2637k/correlations HTTP/1.1
29+
POST /api/datasources/uid/uyBf2637k/correlation HTTP/1.1
3030
Accept: application/json
3131
Content-Type: application/json
3232
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

pkg/api/docs/definitions/correlations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"github.com/grafana/grafana/pkg/services/correlations"
55
)
66

7-
// swagger:route POST /datasources/uid/{uid}/correlations correlations createCorrelation
7+
// swagger:route POST /datasources/uid/{uid}/correlation correlations createCorrelation
88
//
99
// Add correlation.
1010
//

pkg/services/correlations/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func (s *CorrelationsService) registerAPIEndpoints() {
1717
uidScope := datasources.ScopeProvider.GetResourceScopeUID(ac.Parameter(":uid"))
1818
authorize := ac.Middleware(s.AccessControl)
1919

20-
s.RouteRegister.Group("/api/datasources/uid/:uid/correlations", func(entities routing.RouteRegister) {
20+
s.RouteRegister.Group("/api/datasources/uid/:uid/correlation", func(entities routing.RouteRegister) {
2121
entities.Post("/", authorize(ac.ReqOrgAdmin, ac.EvalPermission(datasources.ActionWrite, uidScope)), routing.Wrap(s.createHandler))
2222
})
2323
}

0 commit comments

Comments
 (0)