Skip to content

API endpoint method not supported for Signed URL #10704

@nana-boateng

Description

@nana-boateng

I am attempting to use a signed URL to make changes to a file. Prior to signed URLS, we used /api/v1/edit/{fileID} with an xml payload in a POST request to make changes, but the same route doesn't seem work for signed URLs. I get this error back:

{ "status": "ERROR", "code": 405, "message": "API endpoint does not support this method. Consult our API guide at http://guides.dataverse.org.", "requestUrl": "https://demo.borealisdata.ca/api/v1/edit/40226?until=2024-07-19T21:22:41.852&user=n.boateng&method=POST&token=9050a37554152c4b8ed46b734698ce51a39a200280f32b9cd92194588bcd03ef826cddf30366fc5a23e59699b0ced2d694941441684da0456373f7a74608d319", "requestMethod": "POST" }

Here is an example of the data object returned in the initial signed request:

    "queryParameters": {
        "fileId": 40226,
        "fileMetadataId": 39564,
        "datasetPid": "doi:10.80240/FK2/KLPDSV"
    },
    "signedUrls": [
        {
            "name": "retrieveDataFile",
            "httpMethod": "GET",
            "signedUrl": "https://demo.borealisdata.ca/api/v1/access/datafile/40226/metadata/ddi?until=2024-07-19T21:22:41.851&user=n.boateng&method=GET&token=random32423423token",
            "timeOut": 270
        },
        {
            "name": "uploadDataFile",
            "httpMethod": "POST",
            "signedUrl": "https://demo.borealisdata.ca/api/v1/edit/40226?until=2024-07-19T21:22:41.852&user=n.boateng&method=POST&token=random32423423token",
            "timeOut": 270
        }
    ]
}

And I am using the second signed URL to upload changes.

Here is my manifest file:

{
  "displayName": "DataExplorer",
  "description": "Odesi Data Explorer for viewing, configuring and editing variables",
  "toolName": "explorer",
  "scope": "file",
  "type": "configure",
  "contentType": "text/tab-separated-values",
  "toolUrl": "https://demo.borealisdata.ca/data-explorer-test/",
  "toolParameters": {
    "queryParameters": [
      {
        "fileId": "{fileId}"
      },
      {
        "fileMetadataId": "{fileMetadataId}"
      },
      {
        "datasetPid": "{datasetPid}"
      },
      {
        "dvLocale": "{localeCode}"
      }
    ]
  },
  "allowedApiCalls": [
    {
      "name": "retrieveDataFile",
      "httpMethod": "GET",
      "urlTemplate": "/api/v1/access/datafile/{fileId}/metadata/ddi",
      "timeOut": 270
    },
    {
      "name": "uploadDataFile",
      "httpMethod": "POST",
      "urlTemplate": "/api/v1/edit/{fileId}",
      "timeOut": 270
    }
  ]
}

What steps does it take to reproduce the issue?
Apologies for the verbosity, but because this is related to signed URLs, I couldn't figure out an easy link to send.

  • When does this issue occur?
    When you attempt to use the signed URL to edit changes in a dataset.

  • Which page(s) does it occurs on?
    API call.

  • What happens?
    I get a message: "API endpoint does not support this method. Consult our API guide at http://guides.dataverse.org."

  • To whom does it occur (all users, curators, superusers)?
    Curators

  • What did you expect to happen?
    The upload to complete or maybe a new API endpoint

Which version of Dataverse are you using?

v6.2.8-SP

Any related open or closed issues to this bug report?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions