Skip to content

Create a file for an entity

Request

Security
oauth2_client_credentials or oauth2_authorization_code
Path
entitystringrequired

The entity id.

Bodyapplication/json

Required. The file to create.

namestring(name)

(IDENTIFIER) The resource name of the file. Format: files/{file}

displayNamestring, [ 1 .. 200 ] characters(display_name)required

Optional. A mutable, user-settable field for providing a human-readable name for the file, to be used in user interfaces. Must be <= 200 characters.

contentstring, (byte), [ 1 .. 10485760 ] characters(content)required

The content of the file. Maximum file size is 10Mib.

curl -i -X POST \
  'https://docs.bndry.net/_mock/apis/openapi/v1alpha/entities/{entity}/files' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "displayName": "John Doe - Driver'\''s License",
    "content": "string",
    "createTime": "2023-01-15T01:30:15.01Z",
    "updateTime": "2023-01-15T01:30:15.01Z"
  }'

Responses

Success

Bodyapplication/json
namestring(name)

(IDENTIFIER) The resource name of the file. Format: files/{file}

displayNamestring, [ 1 .. 200 ] characters(display_name)required

Optional. A mutable, user-settable field for providing a human-readable name for the file, to be used in user interfaces. Must be <= 200 characters.

contentstring, (byte), [ 1 .. 10485760 ] characters(content)required

The content of the file. Maximum file size is 10Mib.

createTimestring, (date-time)(create_time)read-only

Output only. The timestamp when the file was created.

updateTimestring, (date-time)(update_time)read-only

Output only. The timestamp when the file was most recently updated.

sourcestring(source)read-only

(OPTIONAL) Output only. The resource name of the source that contributed this file. E.g. entities/{entity}, workspaces/{workspace}, or forms/{form}

Response
{ "name": "string", "displayName": "John Doe - Driver's License", "content": "string", "createTime": "2023-01-15T01:30:15.01Z", "updateTime": "2023-01-15T01:30:15.01Z", "source": "string" }