{
  "opencollection": "1.0.0",
  "info": {
    "name": "Benchling AA Sequences Files API",
    "version": "2.0.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "client_credentials",
      "accessTokenUrl": "/api/v2/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Files",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List files",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v2/files",
            "params": [
              {
                "name": "pageSize",
                "value": "",
                "type": "query",
                "description": "Number of results to return."
              },
              {
                "name": "nextToken",
                "value": "Im5ldyB0ZXN0Ig==",
                "type": "query"
              },
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "Method by which to order search results. Valid sorts are modifiedAt (modified time, most recent first) createdAt (creation time, most recent first) and name (item name, alphabetical). Optionally add :asc or :desc to specify ascending or descending order. Default is modifiedAt.\n"
              },
              {
                "name": "archiveReason",
                "value": "",
                "type": "query",
                "description": "Archive reason. Restricts items to those with the specified archive reason. Use \"NOT_ARCHIVED\" to filter for unarchived items. Use \"ANY_ARCHIVED\" to filter for archived items regardless of reason. Use \"ANY_ARCHIVED_OR_NOT_ARCHIVED\" to return items for both archived and unarchived.\n"
              },
              {
                "name": "createdAt",
                "value": "",
                "type": "query",
                "description": "Datetime, in RFC 3339 format. Supports the > and < operators. Time zone defaults to UTC. Restricts results to those created in the specified range. e.g. > 2017-04-30. Date ranges can be specified with the following nomenclature > YYYY-MM-DD AND <YYYY-MM-DD.\n"
              },
              {
                "name": "creatorIds",
                "value": "",
                "type": "query",
                "description": "Comma separated list of user IDs."
              },
              {
                "name": "folderId",
                "value": "",
                "type": "query",
                "description": "ID of a folder. Restricts results to those in the folder."
              },
              {
                "name": "mentionedIn",
                "value": "",
                "type": "query",
                "description": "Comma-separated list of entry IDs. Restricts results to items mentioned in those entries.\n"
              },
              {
                "name": "modifiedAt",
                "value": "",
                "type": "query",
                "description": "Datetime, in RFC 3339 format. Supports the > and < operators. Time zone defaults to UTC. Restricts results to those modified in the specified range. e.g. > 2017-04-30. Date ranges can be specified with the following nomenclature > YYYY-MM-DD AND <YYYY-MM-DD.\n"
              },
              {
                "name": "name",
                "value": "",
                "type": "query",
                "description": "Restricts results to those with the specified name."
              },
              {
                "name": "nameIncludes",
                "value": "",
                "type": "query",
                "description": "Name substring. Restricts results to those with names that include the provided substring.\n"
              },
              {
                "name": "names.anyOf.caseSensitive",
                "value": "",
                "type": "query",
                "description": "Comma-separated list of names. Maximum of 100. Restricts results to those that match any of the specified names, case sensitive.\n"
              },
              {
                "name": "names.anyOf",
                "value": "",
                "type": "query",
                "description": "Comma-separated list of names. Maximum of 100. Restricts results to those that match any of the specified names, case insensitive.  Warning - this filter can be non-performant due to case insensitivity.\n"
              },
              {
                "name": "originIds",
                "value": "",
                "type": "query",
                "description": "Comma-separated list of item IDs. Restricts results to those whose origin parent is any of the specified items."
              },
              {
                "name": "ids",
                "value": "",
                "type": "query",
                "description": "Comma-separated list of ids. Matches all of the provided IDs, or returns a 400 error that includes a list of which IDs are invalid.\n"
              },
              {
                "name": "displayIds",
                "value": "",
                "type": "query",
                "description": "Comma-separated list of display ids. Matches all of the provided IDs, or returns a 400 error that includes a list of which IDs are invalid.\n"
              },
              {
                "name": "returning",
                "value": "",
                "type": "query",
                "description": "Comma-separated list of fields to return. Modifies the output shape. To return all keys at a given level, enumerate them or use the wildcard, '*'. For more information, [click here](https://docs.benchling.com/docs/getting-started-1#returning-query-parameter)."
              }
            ]
          },
          "docs": "List files"
        },
        {
          "info": {
            "name": "Create a file",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "/api/v2/files",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a file of a supported type. Currently, we support these file extensions: .csv; .html;\n.jmp, .jrn, .jrp (JMP); .jpeg, .jpg (JPEG); .png; .pdf; .zip; and .txt.\n\nA successful file upload requires 3 calls in serial:\n1. [Create a file](#/Analyses/createFile), this endpoint, which returns an S3 `PUT` URL for the 2nd\n   call and a file ID for the 3rd call\n2. Upload the file contents to S3. Add `x-amz-server-side-encryption: AES256` to the request headers,\n   because we use server-side encryption"
        },
        {
          "info": {
            "name": "Get a file",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v2/files/:file_id",
            "params": [
              {
                "name": "file_id",
                "value": "",
                "type": "path",
                "description": "The ID of the file"
              }
            ]
          },
          "docs": "Get a file. This endpoint returns an S3 URL, from which you can download the file contents.\n\nNote: URL is valid for 1 hour after being returned from this endpoint. It should not be stored\npersistently for later use.\n"
        },
        {
          "info": {
            "name": "Update a file",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "/api/v2/files/:file_id",
            "params": [
              {
                "name": "file_id",
                "value": "file_Of5GuBSq",
                "type": "path",
                "description": "The ID of the file"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update a file. After you upload the file contents to S3, call this endpoint to mark the upload as `SUCCEEDED`. See [Create a file](#/Analyses/createFile) for documentation of the full upload flow.\n"
        },
        {
          "info": {
            "name": "Archive files",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "/api/v2/files:archive",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Archive files"
        },
        {
          "info": {
            "name": "Unarchive files.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "/api/v2/files:unarchive",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Unarchive files."
        }
      ]
    }
  ],
  "bundled": true
}