---
title: "Modifies a PluginFile resource"
method: PUT
path: "/api/v1/plugins/{id}/files/{fileId}"
tags: ["Plugins"]
---

# Modifies a PluginFile resource

`PUT /api/v1/plugins/{id}/files/{fileId}`

## Path parameters

- `fileId` integer, required
- `id` integer, required

## Headers

- `X-Fields` string, mask

## Request body

- PluginFileMutableFields
  - `filename` string, required — Name of the PluginFile resource.
  - `contents` string, required — Contents of the file.
  - `tasks` PluginTaskContainer
    - `functions` FunctionTaskDump[]
      - `id` integer — Id of the PluginTask.
      - `name` string, required — Name of the PluginTask.
      - `inputParams` PluginTaskInputParameterDump[]
        - `name` string, required — Name of the PluginTaskParameter.
        - `parameterType` PluginParameterTypeRef
          - `id` integer — ID for the PluginParameterType resource.
          - `group` GroupRef
            - `id` integer — ID for the Group resource.
            - `name` string — Name of the Group resource.
            - `url` string — URL for accessing the full Group resource.
          - `url` string — URL for accessing the full PluginParameterType resource.
          - `name` string — Name of the PluginParameterType resource.
        - `required` boolean — Sets whether the input parameter is required (True) or optional (False). If True, then this parameter must be assigned a value in order to execute the PluginTask.
      - `outputParams` PluginTaskOutputParameterDump[]
        - `name` string, required — Name of the PluginTaskParameter.
        - `parameterType` PluginParameterTypeRef
          - `id` integer — ID for the PluginParameterType resource.
          - `group` GroupRef
            - `id` integer — ID for the Group resource.
            - `name` string — Name of the Group resource.
            - `url` string — URL for accessing the full Group resource.
          - `url` string — URL for accessing the full PluginParameterType resource.
          - `name` string — Name of the PluginParameterType resource.
    - `artifacts` ArtifactTaskDump[]
      - `id` integer — Id of the PluginTask.
      - `name` string, required — Name of the PluginTask.
      - `outputParams` PluginTaskOutputParameterDump[]
        - `name` string, required — Name of the PluginTaskParameter.
        - `parameterType` PluginParameterTypeRef
          - `id` integer — ID for the PluginParameterType resource.
          - `group` GroupRef
            - `id` integer — ID for the Group resource.
            - `name` string — Name of the Group resource.
            - `url` string — URL for accessing the full Group resource.
          - `url` string — URL for accessing the full PluginParameterType resource.
          - `name` string — Name of the PluginParameterType resource.
  - `description` string — Description of the PluginFile resource.

## Response `200`

Success

- PluginFileDump
  - `id` integer — ID for the PluginFile resource.
  - `snapshot` integer — ID for the underlying PluginFile snapshot.
  - `group` GroupRef
    - `id` integer — ID for the Group resource.
    - `name` string — Name of the Group resource.
    - `url` string — URL for accessing the full Group resource.
  - `user` UserRefDump
    - `id` integer — ID for the User resource.
    - `username` string — Username of the User resource.
    - `url` string — URL for accessing the full User resource.
  - `createdOn` string, date-time — Timestamp when the PluginFile resource was created.
  - `snapshotCreatedOn` string, date-time — Timestamp when the PluginFile resource snapshot was created.
  - `lastModifiedOn` string, date-time — Timestamp when the PluginFile resource was last modified.
  - `latestSnapshot` boolean — Whether or not the PluginFile resource is the latest version.
  - `hasDraft` boolean — Whether a draft exists for the PluginFile resource.
  - `tags` TagRefDump[]
    - `id` integer — ID for the Tag.
    - `name` string — Name of the Tag.
    - `group` GroupRef
      - `id` integer — ID for the Group resource.
      - `name` string — Name of the Group resource.
      - `url` string — URL for accessing the full Group resource.
    - `url` string — URL for accessing the full Tag.
  - `filename` string, required — Name of the PluginFile resource.
  - `contents` string, required — Contents of the file.
  - `tasks` PluginTaskContainer
    - `functions` FunctionTaskDump[]
      - `id` integer — Id of the PluginTask.
      - `name` string, required — Name of the PluginTask.
      - `inputParams` PluginTaskInputParameterDump[]
        - `name` string, required — Name of the PluginTaskParameter.
        - `parameterType` PluginParameterTypeRef
          - `id` integer — ID for the PluginParameterType resource.
          - `group` GroupRef
            - `id` integer — ID for the Group resource.
            - `name` string — Name of the Group resource.
            - `url` string — URL for accessing the full Group resource.
          - `url` string — URL for accessing the full PluginParameterType resource.
          - `name` string — Name of the PluginParameterType resource.
        - `required` boolean — Sets whether the input parameter is required (True) or optional (False). If True, then this parameter must be assigned a value in order to execute the PluginTask.
      - `outputParams` PluginTaskOutputParameterDump[]
        - `name` string, required — Name of the PluginTaskParameter.
        - `parameterType` PluginParameterTypeRef
          - `id` integer — ID for the PluginParameterType resource.
          - `group` GroupRef
            - `id` integer — ID for the Group resource.
            - `name` string — Name of the Group resource.
            - `url` string — URL for accessing the full Group resource.
          - `url` string — URL for accessing the full PluginParameterType resource.
          - `name` string — Name of the PluginParameterType resource.
    - `artifacts` ArtifactTaskDump[]
      - `id` integer — Id of the PluginTask.
      - `name` string, required — Name of the PluginTask.
      - `outputParams` PluginTaskOutputParameterDump[]
        - `name` string, required — Name of the PluginTaskParameter.
        - `parameterType` PluginParameterTypeRef
          - `id` integer — ID for the PluginParameterType resource.
          - `group` GroupRef
            - `id` integer — ID for the Group resource.
            - `name` string — Name of the Group resource.
            - `url` string — URL for accessing the full Group resource.
          - `url` string — URL for accessing the full PluginParameterType resource.
          - `name` string — Name of the PluginParameterType resource.
  - `description` string — Description of the PluginFile resource.
  - `plugin` PluginRef
    - `id` integer — ID for the Plugin resource.
    - `group` GroupRef
      - `id` integer — ID for the Group resource.
      - `name` string — Name of the Group resource.
      - `url` string — URL for accessing the full Group resource.
    - `url` string — URL for accessing the full Plugin resource.
    - `name` string — Name of the Plugin resource.

## Changes

- **2026-07-17** `a73101579c5c` — 3 breaking, 2 info
  - added `#/components/schemas/PluginTaskContainer` to the `tasks` request property `allOf` list
  - the `tasks` request property type changed from `array` to `object`
  - the `tasks` response's property type changed from `array` to `object` for status `200`
  - added the optional property `snapshotCreatedOn` to the response with the `200` status
  - …1 more
- **2024-07-24** `9a36b9043379` — 2 breaking, 2 warning, 1 info
  - the `tasks` request property type changed from `object` to `array`
  - the `tasks` response's property type changed from `object` to `array` for status `200`
  - removed `#/components/schemas/PluginTaskContainer` from the `tasks` request property `allOf` list
  - removed the optional property `snapshotCreatedOn` from the response with the `200` status
  - …1 more

[Change history](https://skmtc.dev/usnistgov/apis/dioptra-rest-api/changes/api/v1/plugins/:id/files/:fileId/put.md)

---

[API](https://skmtc.dev/usnistgov/apis/dioptra-rest-api.md) · [All operations](https://skmtc.dev/usnistgov/apis/dioptra-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/usnistgov/dioptra-rest-api/revisions/a73101579c5c/schema)
