Provide a README with examples of how to call each resource

Created on 20 September 2021, over 3 years ago
Updated 1 August 2024, 9 months ago

Problem/Motivation

At present, there is no documentation for this module. This presents an obstacle to JS developers who are new to Drupal and have to read through lots of code just to figure out how to call the resources.

Please provide a README with examples of how to actually use the module.

✨ Feature request
Status

Active

Version

1.0

Component

Documentation

Created by

πŸ‡―πŸ‡΅Japan ptmkenny

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States grasmash

    For resetting password, POST a request to /jsonapi/user/password/reset with either a mail or name property in the body.

  • πŸ‡ΊπŸ‡ΈUnited States grasmash

    For user registration:

    curl --location 'https://www.example.com/jsonapi/user/register' \
    --header 'Content-Type: application/vnd.api+json' \
    --header 'Accept: application/vnd.api+json' \
    --data-raw '{
        "data": {
            "type": "user--user",
            "attributes": {
                "name": "test 123",
                "mail": "test@test123456.com",
                "pass": "test"
            }
            
        }
    }'
  • πŸ‡ΊπŸ‡ΈUnited States grasmash

    And, if you want to change the email address or password for the user, you need to make a request like this. Current password is required for changing either mail or password.

    curl --location --request PATCH 'https://www.example.com/jsonapi/user/user/1876ac28-5163-4ada-9ab7-481f60e6ed34' \
    --header 'Content-Type: application/vnd.api+json' \
    --header 'Accept: application/vnd.api+json' \
    --header 'Authorization: Bearer [token]' \
    --data-raw '{
        "data": {
            "type": "user--user",
            "id": "1876ac28-5163-4ada-9ab7-481f60e6ed34",
            "attributes": {
                "name": "test 1234",
                "mail": "test@example.com",
                "pass": { "existing": "test", "value": "test1" }
            }
        }
    }'
    
  • πŸ‡ΊπŸ‡ΈUnited States grasmash

    Added to the project page.

Production build 0.71.5 2024