Pub API support? #547
Replies: 14 comments 8 replies
|
Yes.
The onepub API conforms to the standard pub.dev API.
know if you have any other questions
You can access the token by running 'onepub export'.
Let me know if you have any questions.
…On Thu, 19 Dec 2024, 9:26 pm David Martos, ***@***.***> wrote:
Hello!
Is it possible to access the pub API, like <host>/api/packages/<package>?
The private pub platform I'm coming from Jetbrains Spaces, allowed this
functionality by using the token as a Bearer token.
I belive this feature could be interesting because it would be useful for
tools like renovatebot, which automatically pull package dependencies
—
Reply to this email directly, view it on GitHub
<#547>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG32OGERUET47KQWYQK2BL2GKNNHAVCNFSM6AAAAABT4VBSUSVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXG4YTGOJSGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
|
Here is a curl command that I tested (and works): curl -H "Authorization: Bearer XXXXXXX" https://onepub.dev/api/yyyyyy/api/packages/node_mgmt_lib The 403 suggest that your token is invalid? The token is obtained from running: onepub export Exporting OnePub token for OnePub. Add the following environment variable to your CI/CD secrets. ONEPUB_TOKEN=XXXXX Note that the token may have a trailing '=' which MUST be included in the bearer token. |
|
I've edited the above comment a few times to add info. |
|
@bsutton Thank you for the details. Unfortunately I'm still having issues. I've obtained the token with |
|
|
|
So that is a cloudflare error, you need to provide the cloudflare ray id for me to see why it is blocking you. |
|
are you in spain? |
|
so cloudflare thinks you are a bot and is rejecting the request. |
|
can you give me some more details on what you are trying to achieve? |
|
@bsutton I'm configuring renovatebot for the repos in our organization, which uses some private packages published in onepub. |
|
can you set a user agent? |
|
I've just added an exception for the onepub user agent as above. Try that and let me know how it goes. |
|
just added RenovateBot/* as well. |

Uh oh!
There was an error while loading. Please reload this page.
Hello!
Is it possible to access the pub API, like
<host>/api/packages/<package>?The private pub platform I'm coming from Jetbrains Spaces, allowed this functionality by using the token as a Bearer token.
I belive this feature could be interesting because it would be useful for tools like
renovatebot, which automatically pull package dependenciesAll reactions