DatoCMS client v0.2.3 DatoCMS.Client.User

Summary

Functions

Calls POST /users

Calls DELETE /users/{(%2Fschemata%2Fuser%23%2Fdefinitions%2Fuser%2Fdefinitions%2Fidentity)}

Calls GET /users/{(%2Fschemata%2Fuser%23%2Fdefinitions%2Fuser%2Fdefinitions%2Fidentity)}

Calls GET /users

Calls POST /users/reset_password

Calls PUT /users/{(%2Fschemata%2Fuser%23%2Fdefinitions%2Fuser%2Fdefinitions%2Fidentity)}

Functions

create(params)

Calls POST /users

params is JSON encoded and passed as the request body.

params Schema

{
  "additionalProperties": false,
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "attributes": {
          "additionalProperties": false,
          "properties": {
            "email": {
              "description": "Email",
              "example": "mark.smith@example.com",
              "type": "string"
            },
            "first_name": {
              "description": "First name",
              "example": "Mark",
              "type": "string"
            },
            "last_name": {
              "description": "Last name",
              "example": "Smith",
              "type": "string"
            }
          },
          "required": [
            "email",
            "first_name",
            "last_name"
          ],
          "type": "object"
        },
        "type": {
          "description": "JSON API type field",
          "example": "user",
          "pattern": "^user$",
          "type": [
            "string"
          ]
        }
      },
      "required": [
        "type",
        "attributes"
      ],
      "type": "object"
    }
  },
  "required": [
    "data"
  ],
  "type": "object"
}
destroy()

Calls DELETE /users/{(%2Fschemata%2Fuser%23%2Fdefinitions%2Fuser%2Fdefinitions%2Fidentity)}

get()

Calls GET /users/{(%2Fschemata%2Fuser%23%2Fdefinitions%2Fuser%2Fdefinitions%2Fidentity)}

index()

Calls GET /users

reset_password(params)

Calls POST /users/reset_password

params is JSON encoded and passed as the request body.

params Schema

{
  "additionalProperties": false,
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "attributes": {
          "additionalProperties": false,
          "properties": {
            "email": {
              "description": "Email",
              "example": "mark.smith@example.com",
              "type": "string"
            }
          },
          "required": [
            "email"
          ],
          "type": "object"
        },
        "type": {
          "description": "JSON API type field",
          "example": "user",
          "pattern": "^user$",
          "type": [
            "string"
          ]
        }
      },
      "required": [
        "type",
        "attributes"
      ],
      "type": "object"
    }
  },
  "required": [
    "data"
  ],
  "type": "object"
}
update(params)

Calls PUT /users/{(%2Fschemata%2Fuser%23%2Fdefinitions%2Fuser%2Fdefinitions%2Fidentity)}

params is JSON encoded and passed as the request body.

params Schema

{
  "additionalProperties": false,
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "attributes": {
          "additionalProperties": false,
          "properties": {
            "email": {
              "description": "Email",
              "example": "mark.smith@example.com",
              "type": "string"
            },
            "first_name": {
              "description": "First name",
              "example": "Mark",
              "type": "string"
            },
            "last_name": {
              "description": "Last name",
              "example": "Smith",
              "type": "string"
            },
            "password": {
              "description": "Password",
              "example": "supersecret",
              "type": "string"
            }
          },
          "type": "object"
        },
        "id": {
          "description": "ID of editor",
          "example": "312",
          "type": "string"
        },
        "type": {
          "description": "JSON API type field",
          "example": "user",
          "pattern": "^user$",
          "type": [
            "string"
          ]
        }
      },
      "required": [
        "type",
        "id",
        "attributes"
      ],
      "type": "object"
    }
  },
  "required": [
    "data"
  ],
  "type": "object"
}