Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query Parameter for GetAllAssetAdministrationShellIdsByAssetLink faces implicit length limit #19

Open
sebbader opened this issue Sep 27, 2022 · 7 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@sebbader
Copy link
Contributor

What?

The GET /lookup/shells?assetIds is limited by URL length limits.
A long value of assetIds can exceed the length.

How?

Introduce a POST /lookup/shells where the assetIds can be provided in the payload.

This issue relates to finding Fe#6.

@sebbader sebbader added this to the 3.x milestone Sep 27, 2022
@sebbader
Copy link
Contributor Author

sebbader commented Nov 15, 2022

I think the underlying problem is that the assetIds Parameter points to SpecificAssetId while it actually should be a string with the content=Base64(SpecificAssetId)...

Then

name: assetIds
in: query
description: A list of specific Asset identifiers, encoded as a base64 string
...
schema:
     type: string
     maxLength: 1852

can somehow control the problem.

@sebbader
Copy link
Contributor Author

sebbader commented Nov 15, 2022

Why 1852 characters?

Total URL limit (assumption) - max length of endpoint URL (2KiB):
8192/4 - 2048/4 = 2064 - 812 = 1852

Better number is appreciated...

@sebbader sebbader self-assigned this Nov 15, 2022
@sebbader sebbader added the bug Something isn't working label Nov 15, 2022
@sebbader sebbader modified the milestones: 3.x, 3.0 Nov 15, 2022
@sebbader
Copy link
Contributor Author

Full proposal for the parameter:

- name: assetIds
          in: query
          description: A list of specific Asset identifiers
          required: false
          style: form
          explode: true
          schema:
            type: string
            format: byte
           maxLength: 1852
            example: "WyB7ICJuYW1lIjogInNvbWUtYXNzZXQtaWQiLCAidmFsdWUiOiAiaHR0cDovL2V4YW1wbGUtY29tcGFueS5jb20vbXlBc3NldCIsICJleHRlcm5hbFN1YmplY3RJZCI6IHsgImtleXMiOiBbIHsgInR5cGUiOiAiR2xvYmFsUmVmZXJlbmNlIiwgInZhbHVlIjogImh0dHA6Ly9leGFtcGxlLWNvbXBhbnkuY29tL2V4YW1wbGUtY29tcGFueXMtYXNzZXQta2V5cyIgfSBdLCAidHlwZSI6ICJHbG9iYWxSZWZlcmVuY2UiIH0gfSwgeyAibmFtZSI6ICJzb21lLW90aGVyLWFzc2V0LWlkIiwgInZhbHVlIjogIjEyMzQ1QUJDIiwgImV4dGVybmFsU3ViamVjdElkIjogeyAia2V5cyI6IFsgeyAidHlwZSI6ICJHbG9iYWxSZWZlcmVuY2UiLCAidmFsdWUiOiAiaHR0cDovL215LW93bi1jb21wYW55LmNvbS9rZXlzIiB9IF0sICJ0eXBlIjogIkdsb2JhbFJlZmVyZW5jZSIgfSB9IF0="

@sebbader
Copy link
Contributor Author

The base64-encoded example contains the following array:

[
  {
    "name": "some-asset-id",
    "value": "http://example-company.com/myAsset",
    "externalSubjectId": {
      "keys": [
        {
          "type": "GlobalReference",
          "value": "http://example-company.com/example-companys-asset-keys"
        }
      ],
      "type": "GlobalReference"
    }
  },
  {
    "name": "some-other-asset-id",
    "value": "12345ABC",
    "externalSubjectId": {
      "keys": [
        {
          "type": "GlobalReference",
          "value": "http://my-own-company.com/keys"
        }
      ],
      "type": "GlobalReference"
    }
  }
]

@sebbader-sap
Copy link
Contributor

no practical implications at the moment, therefore postponing it.

@BirgitBoss
Copy link
Collaborator

BirgitBoss commented Nov 10, 2023

@BirgitBoss BirgitBoss modified the milestones: 3.x, 3.1 Nov 15, 2023
@BirgitBoss
Copy link
Collaborator

BirgitBoss commented Nov 15, 2023

Decision as of 14.11.2023: GET /lookup/shells?assetIds will be set to deprecated and instead a POST API-Operation will be introduced. A new class AssetLink will be created with the two attributes "name" and "value" only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants