Skip to main content
PATCH
/
api
/
v1
/
files
/
{id}
Update a file
curl --request PATCH \
  --url https://api.scholarlysoftware.com/api/v1/files/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "type": "file",
    "attributes": {
      "name": "<string>"
    },
    "relationships": {
      "folder": {
        "data": {
          "type": "folder",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      }
    }
  }
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "type": "file",
    "attributes": {
      "name": "annual_report.pdf",
      "content_type": "application/pdf",
      "byte_size": 1024000,
      "checksum_md5": "<string>",
      "url": "<string>",
      "created_at": "<string>",
      "updated_at": "<string>",
      "locked": true,
      "state": "<string>"
    },
    "relationships": {
      "folder": {
        "links": {
          "related": "<string>"
        },
        "meta": {}
      },
      "created_by": {
        "links": {
          "related": "<string>"
        },
        "meta": {}
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer token

Path Parameters

id
string
required

File UUID

Body

application/vnd.api+json
data
object
required

Response

file moved to top-level root

data
object
required