edgexfoundry/go-mod-core-contracts

Add device service name level to Add Event POST API

Closed this issue ยท 1 comments

๐Ÿš€ Feature Request

Relevant Package [REQUIRED]

This feature request is for core-data

Description [REQUIRED]

There should be an additional device service name level in the Add Event POST API in v3

ApiEventProfileNameDeviceNameSourceNameRoute = ApiEventRoute + "/{" + ProfileName + "}" + "/{" + DeviceName + "}" + "/{" + SourceName + "}"

The edgex-go should also be modified if the constant name is changed
https://github.com/edgexfoundry/edgex-go/blob/c6ae7449aad5f05f69153f6120284e804cf836f6/internal/core/data/router.go#L31

client should also be modified

func (ec *eventClient) Add(ctx context.Context, req requests.AddEventRequest) (
dtoCommon.BaseWithIdResponse, errors.EdgeX) {
path := path.Join(common.ApiEventRoute, req.Event.ProfileName, req.Event.DeviceName, req.Event.SourceName)