camaraproject / EdgeCloud

Repository to describe, develop, document and test the EdgeCloud API family
Apache License 2.0
16 stars 43 forks source link

EAM: Inconsistent handling of AppInstanceID scope #258

Closed gainsley closed 2 weeks ago

gainsley commented 3 months ago

Problem description The definition of AppInstanceId indicates that it is A globally unique identifier. However, the delete API /apps/{appId}/instances/{appInstanceId} indicates it is scoped under the AppId. If it is truly globally unique, there is no need to specify the appId, as just the appInstanceId is sufficient.

Expected behavior If the intent in the AppInstanceId definition is the correct intent, I would have expected the API path to delete an app instance to be something like DELETE /appinstances/{appInstanceId}, and then for consistency, to create an app instance would be POST /appinstances (where appId would then be part of the request body).

Alternative solution Alternatively we could define AppInstanceId as scoped to AppId, but that doesn't really make sense if they're UUIDs/server generated opaque IDs. That would really only make sense if they were user-provided names.

Additional context Federation EWBI does scope appInstanceId under appId, but we do not necessarily have to follow if it does not make sense. Also there it is defined as a string, not a UUID.

gainsley commented 2 weeks ago

Superseded by #299.