hej,
can i upload routes- and rewrites.yml via the ghost admin- or content-api?
This should be possible. A good starting point would be to open your browser network tab and watch the network call that occurs when you use the admin panel.
Youāll also need to read the docs for how to authenticate with the admin api.
thanks, i guess it will be only available by session-authentication?
it is not listed as an available endpoint: Ghost Admin API Documentation
Thereās quite a bit off the admin and members api that isnāt super well documented. Iād try passing it a jwt and see if itāll take it. :) (Tip: Try an endpoint you know works first, to debug any issues with jwt generation.)
I just tested it.
Ghost api returns 501 not implemented
when authenticated via jwt.
It works with session based authentication, which is not ideal if used within a CI/CD pipeline.
I hope this functionality will be implemented soon.
Iād encourage you to open an issue, or better yet submit a PR, fir it.
i will eventually.
i ran into problems in my production setup which runs ghost pro as it validates session sign ins with a sign-in verification email.
is there any other way to obtain a valid session cookie, instead of using the admin/session
endpoint?
as stated in /ghost/core/core/server/web/api/endpoints/admin/middleware.js
// @NOTE: integrations & staff tokens have limited access to the API
...
settings: ['GET'],
So i think itās not a matter of making a PR. Its a decision that those routes are not accessible via apikey.
I think that you might make an argument for why you need api key based access to that endpoint. The team accepted my pr last year for the api key access to signin url endpoint (used to turn magic link tokens into member cookies), so I donāt think itās impossible, but you will need to explain the why behind your request.
is there an other way to contact the dev team then to open a PR?
PR does not make sense in this case as its merely a change in a config file.
Itās not just a change to a config file. Itās going to look roughly like this:
You could open an issue over on the repo, if you want to discuss before filing a PR. GitHub - TryGhost/Ghost: Independent technology for modern publishing, memberships, subscriptions and newsletters.
Or you could add to the Ideas category.