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

energy databus API test auth error #103

Closed
kurzum opened this issue Jul 26, 2023 · 0 comments
Closed

energy databus API test auth error #103

kurzum opened this issue Jul 26, 2023 · 0 comments
Assignees
Labels

Comments

@kurzum
Copy link
Member

kurzum commented Jul 26, 2023

Tested using https://energy.databus.dbpedia.org/api/#/general/publish

Seems like uploading doesn't work and it could be just a simple auth problem

curl -X 'POST' \
  'https://energy.databus.dbpedia.org/api/publish?verify-parts=true' \
  -H 'accept: text/plain' \
  -H 'X-API-KEY: d584b32b-a50a-418a-b22a-8c21dc2692e0' \
  -H 'Content-Type: application/json' \
  -d '{
  "@context": "https://downloads.dbpedia.org/databus/context.jsonld",
  "@graph": [
    {
      "@id": "https://energy.databus.dbpedia.org/kurzum/cleaned",
      "@type": "Group",
      "title": "Cleaned Data",
      "abstract": "Cleaned datasets from DBpedia",
      "description": "Cleaned datasets from DBpedia"
    },
    {
      "@type": "Dataset",
      "@id": "https://energy.databus.dbpedia.org/kurzum/cleaned/geonames/2022-02-09#Dataset",
      "hasVersion": "2022-02-09",
      "title": "Cleaned Geonames",
      "abstract": "Cleaned version of the geonames dataset from DBpedia",
      "description": "Cleaned version of the geonames dataset from DBpedia",
      "license": "http://creativecommons.org/licenses/by/4.0/",
      "distribution": [
        {
          "@id": "https://energy.databus.dbpedia.org/kurzum/cleaned/geonames/2022-02-09#geonames.ttl",
          "@type": "Part",
          "file": "https://energy.databus.dbpedia.org/kurzum/cleaned/geonames/2022-02-09/geonames.ttl",
          "formatExtension": "ttl",
          "compression": "none",
          "downloadURL": "https://holycrab13.github.io/webid.ttl"
        }
      ]
    }
  ]
}' -v -b tmp -L

returns 401

Note: Unnecessary use of -X or --request, POST is already inferred.
* WARNING: failed to open cookie file "tmp"
*   Trying 78.46.100.7:443...
* Connected to energy.databus.dbpedia.org (78.46.100.7) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=energy.databus.dbpedia.org
*  start date: Jun  7 09:30:32 2023 GMT
*  expire date: Sep  5 09:30:31 2023 GMT
*  subjectAltName: host "energy.databus.dbpedia.org" matched cert's "energy.databus.dbpedia.org"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* using HTTP/2
* h2h3 [:method: POST]
* h2h3 [:path: /api/publish?verify-parts=true]
* h2h3 [:scheme: https]
* h2h3 [:authority: energy.databus.dbpedia.org]
* h2h3 [user-agent: curl/7.88.1]
* h2h3 [accept: text/plain]
* h2h3 [x-api-key: d584b32b-a50a-418a-b22a-8c21dc2692e0]
* h2h3 [content-type: application/json]
* h2h3 [content-length: 1166]
* Using Stream ID: 1 (easy handle 0x56195d703680)
> POST /api/publish?verify-parts=true HTTP/2
> Host: energy.databus.dbpedia.org
> user-agent: curl/7.88.1
> accept: text/plain
> x-api-key: d584b32b-a50a-418a-b22a-8c21dc2692e0
> content-type: application/json
> content-length: 1166
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* We are completely uploaded and fine
< HTTP/2 401 
< date: Wed, 26 Jul 2023 14:15:08 GMT
< server: Caddy
* Added cookie connect.sid="s%3ATp90_wkBVxP3Tg-TLJD6FczvMC8d-tZ0.YUGBDcKa86GTLwHsLJQB4Y3eL2aSyWgeQUopVG0561k" for domain energy.databus.dbpedia.org, path /, expire 0
< set-cookie: connect.sid=s%3ATp90_wkBVxP3Tg-TLJD6FczvMC8d-tZ0.YUGBDcKa86GTLwHsLJQB4Y3eL2aSyWgeQUopVG0561k; Path=/; HttpOnly
< x-powered-by: Express
< 
* Connection #0 to host energy.databus.dbpedia.org left intact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants