Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

account-json-api

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

account-json-api

RESTful API-blueprint for all things user accounts

  • 2.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

account-json-api

RESTful JSON API-blueprint for all things user accounts

NPM version Build Status

This is a JSON API v1.0 compliant specification for a generic REST API for all things user accounts.

Summary

PUT    /session
GET    /session
DELETE /session
PUT    /session/account
GET    /session/account
PATCH  /session/account
DELETE /session/account
GET    /session/account/profile
PATCH  /session/account/profile

# Password resets, upgrades, etc.
GET    /requests
POST   /requests
GET    /requests/{id}
DELETE /requests/{id}

# Admin only
POST   /accounts
GET    /accounts
GET    /accounts/{id}
PATCH  /accounts/{id}
DELETE /accounts/{id}
GET    /accounts/{id}/profile
PATCH  /accounts/{id}/profile
POST   /accounts/{id}/sessions

Find the full spec at http://docs.accountjsonapi.apiary.io

Example

Request

PUT /session
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
{
    "data": {
        "type": "session",
        "attributes": {
            "username": "john-doe",
            "password": "secret"
        }
    }
}

Response

{
    "links": {
        "self": "https://example.com/session"
    },
    "data": {
        "id": "sessionid123",
        "type": "session",
        "relationships": {
            "account": {
                "links": {
                    "related": "https://example.com/session/account"
                },
                "data": {
                    "id": "abc1234",
                    "type": "account"
                }
            }
        }
    },
    "included": [{
        "id": "abc1234",
        "type": "account",
        "attributes": {
            "username": "jane-doe"
        },
        "relationships": {
            "profile": {
                "links": {
                    "related": "https://example.com/session/account/profile"
                },
                "data": {
                    "id": "abc1234-profile",
                    "type": "accountProfile"
                }
            }
        }
    }]
}

Implementations

The account-json-api is currently being implemented by Hoodie in the hoodie-server-account module.

License

MIT

Keywords

FAQs

Package last updated on 25 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc