Code Monkey home page Code Monkey logo

Comments (3)

georoen avatar georoen commented on August 26, 2024 1

THANK YOU VERY MUCH!

I had previously tested several URLs, but this one does finally work. That said, this is working code...:

apiKey <- "xxxx"
api_url <- "https://yzyiqfakm4.execute-api.eu-west-1.amazonaws.com/validator/v2"
inspireValidator = INSPIREMetadataValidator$new(url = api_url, apiKey = apiKey)
inspireValidator$getValidationReport(obj = ISOMetadata$new())

... and I am now closing this issue.

PS: Do you plan to update the respective URLs in R/INSPIREMetadataValidator.R?

from geometa.

georoen avatar georoen commented on August 26, 2024

Hey,

... unfortunately, I still do not progress. It is not possible to execute the example stated in INSPIREMetadataValidator():

apiKey <- "xxxx"
inspireValidator <- INSPIREMetadataValidator$new(apiKey = apiKey)
inspireValidator$getValidationReport(obj = ISOMetadata$new())

> [geometa][INFO] Sending metadata file to INSPIRE metadata validation web-service... 
> Forbidden (HTTP 403).Error in inspireValidator$getValidationReport(obj = ISOMetadata$new()) :

Not being an expert for API interactions; I wondered if pasting the url provided by JRC-INSPIRE-SUPPORT along with the requested API Key would help, but get the error mentioned initially:

api_url <- "inspire.ec.europa.eu/validator/v2/"
inspireValidator = INSPIREMetadataValidator$new(url = api_url, apiKey = apiKey)
inspireValidator$getValidationReport(obj = ISOMetadata$new())

> [geometa][INFO] Sending metadata file to INSPIRE metadata validation web-service... 
> Error in strsplit(uploaded$testObject$id, "EID") : non-character argument

Having had the feeling of progress, I then looked into the source code of getValidationReport() and found the returned object of uploadFile() having an unexpected structure (nested list where out$EtfItemCollection$testObjects$TestObject contains 546 entries with an EID respectively). Strange enough, this response is also different to what was reproduced using the swagger-ui.

Thus, eventually, I am questioning myself whether it's an input error - or some changes in httr, the API, or something else...,? I do not know further and am stuck ^^

Sorry for the inconvenience!

from geometa.

eblondel avatar eblondel commented on August 26, 2024

Sorry for the delay, i'm back from annual leave. From exchanges I had with the INSPIRE team in the past, we can't use the above URL for metadata validation. I was requested to use this URL: https://yzyiqfakm4.execute-api.eu-west-1.amazonaws.com/validator/v2 Just tested it with the API key I got from them and it works. Let me know if changing the URL works also for you.

from geometa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.