Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pleroma pleroma
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 646
    • Issues 646
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 87
    • Merge requests 87
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PleromaPleroma
  • pleromapleroma
  • Issues
  • #1710
Closed
Open
Issue created Apr 26, 2020 by Alex Gleason@alexgleasonContributor

Consolidate /api/v1/instance, /nodeinfo/2.0.json, and /api/statusnet/config.json

Instance meta endpoints:

  • /api/v1/instance
  • /nodeinfo/2.0.json
  • /api/statusnet/config.json

The frontend needs to request all 3 of these endpoints in order for it to function. That's 3 HTTP requests to get instance info. Each one has some data that's exclusive to it, while most of the data is overlapping and duplicated.

I understand there are historical reasons for all 3 endpoints, but for a modern frontend I'm wondering if they can be consolidated into 1 HTTP request.

/api/v1/instance

Exclusive values:

  • urls.streaming_api, Websocket streaming URI (eg "wss://example.tld").

/nodeinfo/2.0.json

Exclusive values:

  • metadata.features, needed for conditionally rendering certain UI features based on Pleroma settings.
  • metadata.federation, needed to display federation restrictions on the About page.

/api/statusnet/config.json

Exclusive values:

  • vapidPublicKey, required for push notifications to work.

There are other exclusive values, but I tried to showcase the ones that seem especially necessary. There are other "nice to have" fields like nodeinfo's restrictedNicknames field which lets you do username validation on the frontend.

Most essential values can be found in /api/v1/instance, which you'll want to pull from anyway if you intend to support Mastodon.

My instinct is that they should all be smashed into /api/v1/instance. Maybe under a pleroma tree to keep it clean.

Assignee
Assign to
Time tracking