Closed toddb closed 1 year ago
@joaonlforte So, I have found where the API is versioned. It is on the health-check
resource. Looking at the source, it is not an external API resource (so you can't use the ApiKey token) and need to hijack your JWT. I did that by copying a request and then changing it. I don't get why this isn't at the root of the API.
~ curl 'http://localhost:3000/v1/health-check' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NGM5YTc1ZmUxOGQ3ZjJjYjk3ODcxNjMiLCJmaXJzdE5hbWUiOiJ0IiwibGFzdE5hbWUiOiJub3Z1IiwiZW1haWwiOiJ0K25vdnUtbG9jYWwuZGV2QHBpY21pLmlvIiwib3JnYW5pemF0aW9uSWQiOiI2NGM5YTc3NWUxOGQ3ZjJjYjk3ODcxNzAiLCJyb2xlcyI6WyJhZG1pbiJdLCJlbnZpcm9ubWVudElkIjoiNjRjOWE3NzZlMThkN2YyY2I5Nzg3MTc2IiwiaWF0IjoxNjkyNTc0NjU1LCJleHAiOjE2OTUxNjY2NTUsImlzcyI6Im5vdnVfYXBpIn0.9-iVXXsWKfR7DaBojrhlMtRjMBjXSAJGiZXt0GIxZYU' \
--compressed
{"status":"error","info":{"db":{"status":"up"},"apiVersion":{"version":"0.17.1","status":"up"},"triggerQueue":{"status":"up"}},"error":{"inMemory":{"status":"down"}},"details":{"db":{"status":"up"},"apiVersion":{"version":"0.17.1","status":"up"},"triggerQueue":{"status":"up"},"inMemory":{"status":"down"}}}%
_Originally posted by @toddb in https://github.com/novuhq/novu-dotnet/pull/46#discussion_r1301437791_
So the answer in production is: 0.18.0
~ curl 'https://api.novu.co/v1/health-check' \
-H 'authority: api.novu.co' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8,mi;q=0.7' \
-H 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6I ...-bfSmesKN2w' \
--compressed
{"data":{"status":"ok","info":{"db":{"status":"up"},"inMemory":{"status":"up"},"apiVersion":{"version":"0.18.0","status":"up"},"triggerQueue":{"status":"up"},"cacheService":{"status":"up"}},"error":{},"details":{"db":{"status":"up"},"inMemory":{"status":"up"},"apiVersion":{"version":"0.18.0","status":"up"},"triggerQueue":{"status":"up"},"cacheService":{"status":"up"}}}}% ➜ ~
_Originally posted by @toddb in https://github.com/novuhq/novu-dotnet/pull/46#discussion_r1301441164_
The latest version SaaS version of Novu (cloud), and i'm using this package v0.2.2
The error i'm getting upon deserialising the response is
but the part i find odd is this one
Path 'data._id', line 1, position 15.
. It seems that the entire response of theGetSubscriber
is now wrapped in adata
property (similarly what is happening with theCreateTopic
endpoint where aTopicCreateResponseDto
is returned )In summary seems that the response contract has changed for the Subscriber endpoints and now the actual response object is wrapped in a
Data
propSo instead of returning a
SubscriberDto
should be returning it in an envelope, something like_Originally posted by @joaonlforte in https://github.com/novuhq/novu-dotnet/pull/46#discussion_r1301371319_