Skip to content

Commit

Permalink
updated docs to include bulk source
Browse files Browse the repository at this point in the history
  • Loading branch information
ktuite committed Feb 24, 2024
1 parent ee298bf commit f0c1658
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions docs/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10077,7 +10077,7 @@ paths:
description: |-
Creates one or more Entities in the Dataset.

For creating a single Entity, the request body takes a JSON representation of the Entity, which has the following properties:
For creating **a single Entity**, the request body takes a JSON representation of the Entity, which has the following properties:

1. A `data` object containing values for the user-defined Dataset properties. (Not all properties have to have values.)
2. A `label` property, which cannot be blank or an empty string. (This is used as a human-readable label in Forms that consume Entities.)
Expand All @@ -10093,9 +10093,15 @@ paths:
}
`

For creating multiple Entities in bulk, the request body takes a property `entities` containing a list of Entities as described above, as well as an optional `source` property.
The value type of all properties is `string`.

Value type of all properties is `string`.
For creating **multiple Entities** in bulk, the request body takes an array `entities` containing a list of Entity objects as described above. The bulk entity version also takes a `source` property with a required `name` field and optional `size`, for example to capture the filename and size of a bulk upload source.

`
{
"entities": [...], "source": {"name": "file.csv", "size": 100}
}
`

You can provide header `X-Action-Notes` to store the metadata about the request. The metadata can retrieved using [Entity Audit Log](/central-api-entity-management/#entity-audit-log)
operationId: Creating an Entity
Expand Down Expand Up @@ -13568,6 +13574,18 @@ components:
type: string
description: The name of the property that is changed.
example: name
EntityBulkSource:
type: object
properties:
name:
type: string
description: A name to identify the bulk source, filename or API run
example: myfile.csv
size:
type: number
description: Optional, meant to indicate filesize (in MB)
example: 100
description: An object describing the source of this bulk create action.
EntityOdata:
type: object
properties:
Expand Down Expand Up @@ -13621,9 +13639,7 @@ components:
$ref: '#/components/schemas/EntityCreateSingle'
description: A list of Entities
source:
type: object
items: {}
description: An object describing the source of this bulk create action with `name` and `size`.
$ref: '#/components/schemas/EntityBulkSource'
DataExample:
type: object
properties:
Expand Down

0 comments on commit f0c1658

Please sign in to comment.