Closed michielbdejong closed 1 year ago
Could you describe the setup you're using to do this? Is it straight from the GitHub repo, from the test suite that Yvo created, or the Docker images? That would help with reproducing the issue :-).
This is testing against your production server, note that the URL is https://timeld.org/api/import
You can just run this curl command as-is from any internet-connected machine, just make sure you set the $CREDENTIALS
env var to <your-user>
+ :
+ <your-key>
Ah. that helps! Added this in https://github.com/m-ld/timeld/pull/107
But I'm still getting {"code":"Forbidden","message":""}
as the response. That is probably because I need to replace the strings "org1/pr1"
and "org1/ts1"
. How do I know which values to put in there?
Ah, I think I found mine - "fedb/fedt"
and "fedb/from-ponder-source-testing"
, with the following I get a 200 response:
{"@type":"Project","@id":"fedb/fedt","external":{"@id":"http://ex.org/project/1"}}
{"@type":"Timesheet","@id":"fedb/from-ponder-source-testing","project":[{"@id":"fedb/fedt"}],"external":{"@id":"http://ex.org/timesheet/1"}}
{"@type":"Entry","session":{"@id":"fedb/from-ponder-source-testing"},"activity":"orging","duration":60,"start":{"@value":"2022-06-22T16:40:55.946Z","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},"vf:provider":{"@id":"test"},"external":{"@id":"http://ex.org/timesheet/1/entry/1"}}
Following the instructions from https://github.com/m-ld/timeld/blob/main/doc/api.md#import I see:
Did the API change or am I doing something wrong in my curl command?
This is the contents of example.ndjson: