Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.02 KB

new.md

File metadata and controls

38 lines (27 loc) · 1.02 KB
description
is responsible for creating a new record in a given resource

New

Endpoint: /api/resources/[RESOURCE-ID]/actions/new

Method: POST

Request payload:

  • FormData object with all required fields for the given resource

Response:

  • meta
    • total - total number of records in the resource
    • perPage - number of records in a single page
    • page - number of requested page
    • direction- sorting direction, possible values asc,desc
    • sortBy- id of the sorting column
  • records - list of records with resource metadata

Example

Endpoint: https://demo.adminjs.co/admin/api/resources/User/actions/new

Payload:

{
    email: "[email protected]",
    firstName: "ClientName",
    lastName: "ClientSurname",
    gender: "male",
    isMyFavourite: true
}