Skip to content

switch API backend to use api.metacpan.org/v1 #3348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ with `precious path/to/file`

## Local Configuration Changes

The back end defaults to `fastapi.metacpan.org`. Running a local API server is
The back end defaults to `api.metacpan.org/v1`. Running a local API server is
optional and not required to hack on the front end. The address to the API being
used can be changed in the `metacpan_web.conf` file. Ideally you would create a
new file called `metacpan_web_local.conf` that contains
Expand Down
2 changes: 1 addition & 1 deletion metacpan_web.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: MetaCPAN::Web

api: https://fastapi.metacpan.org
api: https://api.metacpan.org/v1
source_host: https://st.aticpan.org
web_host: https://metacpan.org
consumer_key: metacpan.dev
Expand Down
4 changes: 2 additions & 2 deletions root/about/about.tx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ encourage more suggestions.
MetaCPAN has two parts:

* [metacpan.org](https://metacpan.org), a front end to...
* [fastapi.metacpan.org](https://fastapi.metacpan.org/) the API
* [api.metacpan.org](https://api.metacpan.org/) the API

So
[https://metacpan.org/pod/Moose](/pod/Moose)
vs [https://fastapi.metacpan.org/v1/module/Moose](https://fastapi.metacpan.org/v1/module/Moose)
vs [https://api.metacpan.org/v1/module/Moose](https://api.metacpan.org/v1/module/Moose)

MetaCPAN is [a community effort](/about/contributors), with all the code freely
available on GitHub ([www](https://github.com/metacpan/metacpan-web),
Expand Down
2 changes: 1 addition & 1 deletion root/about/development.tx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ A good first read is the "[How to contribute](https://github.com/metacpan/metacp

API: [https://github.com/metacpan/metacpan-api](https://github.com/metacpan/metacpan-api)

Swagger docs: [https://fastapi.metacpan.org/static/index.html](https://fastapi.metacpan.org/static/index.html)
Swagger docs: [https://api.metacpan.org/v1/static/index.html](https://api.metacpan.org/v1/static/index.html)

Example scripts: [https://github.com/metacpan/metacpan-examples](https://github.com/metacpan/metacpan-examples)

Expand Down
8 changes: 4 additions & 4 deletions root/about/faq.tx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ See [CPAN Bus Factor](https://www.olafalders.com/2021/06/30/cpan-bus-factor/).

## Where can I find the API docs?

The API docs can be found by visiting [fastapi.metacpan.org](https://fastapi.metacpan.org).
API requests need to be sent to fastapi.metacpan.org.
The API docs can be found by visiting [api.metacpan.org](https://api.metacpan.org).
API requests need to be sent to api.metacpan.org/v1/.

## How can I try the API?

Expand Down Expand Up @@ -108,7 +108,7 @@ and/or using multiple browsers.
To fix this:

1. Disconnect all identities
2. Remove all cookies from `metacpan.org` and `fastapi.metacpan.org`
2. Remove all cookies from `metacpan.org` and `api.metacpan.org`
3. Reconnect via one identity
4. Connect to PAUSE

Expand Down Expand Up @@ -160,7 +160,7 @@ in the MetaCPAN account is initialized from those sources
any changes made to those files.

If you, as a PAUSE author would like to keep them in sync, you can always export your MetaCPAN
account information in json format by accessing https://fastapi.metacpan.org/author/PAUSEID
account information in json format by accessing https://api.metacpan.org/v1/author/PAUSEID
(replacing the word PAUSEID by your own PAUSEID). Then you can upload the result as author-*.json
with a higher version number than the last one you uploaded.
The PAUSE account information need to be updated manually via
Expand Down
4 changes: 2 additions & 2 deletions root/base.tx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<li><a href="/recent">Recent</a></li>
<li><a href="/about/faq">FAQ</a></li>
<li><a href="/tools">Tools</a></li>
<li><a href="https://fastapi.metacpan.org/">API</a></li>
<li><a href="https://api.metacpan.org/">API</a></li>
</ul>
%% }
<ul class="nav navbar-nav navbar-right">
Expand Down Expand Up @@ -174,7 +174,7 @@
<a href="/tools">Tools</a>
</div>
<div class="footer-link">
<a href="https://fastapi.metacpan.org/">API</a>
<a href="https://api.metacpan.org/">API</a>
</div>
<div class="footer-link">
<a href="https://www.perl.org/">Perl.org</a>
Expand Down
2 changes: 1 addition & 1 deletion t/controller/source.t
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test_psgi app, sub {
my @versioned_link_tests = (
{
xpath => '//a[text()="Raw code"]/@href',
expected => qr{\bfastapi.metacpan.org/},
expected => qr{\bapi\.metacpan\.org/v1/},
desc => 'raw code points to fastapi'
},
{
Expand Down
Loading