Custom module with config exposed in json api I have a module with two pieces of config set using an admin form and Drupal the drupal config service.
Like this
  /**
   * {@inheritdoc}
   */
  public function submitForm(array &amp;$form, FormStateInterface $form_state) {
    parent::submitForm($form, $form_state);

    $this-&gt;config('mars_spot_collection.defaultcollections')
      -&gt;set('default_collection_title', $form_state-&gt;getValue('default_collection_title'))
      -&gt;set('default_collection_description', $form_state-&gt;getValue('default_collection_description'))
      -&gt;save();
  }

How do I make this conig available in the JSONAPI?
Cheers
You can't do it. Not with the core JSON:API module. Out of the box, the resources JSON:API exposes are all the entity definitions from EntityTypeManager which includes content &amp; config entities (defined by extending ConfigEntityBase).
However, arbitrarily set config values will not be exposed. JSON:API also doesn't support custom resources, as JSON:API docs state:

The JSON:API module provides no PHP API to modify its behavior. It
is designed to have zero configuration.
• Adding new resources/resource types is unsupported: all
entities/entity types are exposed automatically. If you want to expose
more data via the JSON:API module, the data must be defined as entity.
See the &quot;Resources&quot; section.

The JSON:API Resources project attempts to fill this in if you want to design your own endpoint with custom responses.