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: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
I've edited the above comment a few times to add info. |
Beta Was this translation helpful? Give feedback.
-
@bsutton Thank you for the details. Unfortunately I'm still having issues. I've obtained the token with |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
So that is a cloudflare error, you need to provide the cloudflare ray id for me to see why it is blocking you. |
Beta Was this translation helpful? Give feedback.
-
are you in spain? |
Beta Was this translation helpful? Give feedback.
-
so cloudflare thinks you are a bot and is rejecting the request. |
Beta Was this translation helpful? Give feedback.
-
can you give me some more details on what you are trying to achieve? |
Beta Was this translation helpful? Give feedback.
-
@bsutton I'm configuring renovatebot for the repos in our organization, which uses some private packages published in onepub. |
Beta Was this translation helpful? Give feedback.
-
can you set a user agent? |
Beta Was this translation helpful? Give feedback.
-
I've just added an exception for the onepub user agent as above. Try that and let me know how it goes. |
Beta Was this translation helpful? Give feedback.
-
just added RenovateBot/* as well. |
Beta Was this translation helpful? Give feedback.
-
@bsutton That's working now. Thank you! |
Beta Was this translation helpful? Give feedback.
-
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 dependenciesBeta Was this translation helpful? Give feedback.
All reactions