Skip to content

GCP Storage Bucket binding docs: payload examples wrong, sign operation undocumented, multiple typos #5156

@MyMirelHub

Description

@MyMirelHub

1. move payload is wrong

The example places destinationBucket inside metadata, but bucket.go#L559-L567 reads it from req.Data. Correct payload:

{
  "operation": "move",
  "metadata": { "key": "source-file.txt" },
  "data":     { "destinationBucket": "destination-bucket-name" }
}

2. copy payload is wrong (same root cause)

Docs put destinationBucket in metadata. bucket.go#L633-L641 reads it from req.Data. Correct payload:

{
  "operation": "copy",
  "metadata": { "key": "source-file.txt" },
  "data":     { "destinationBucket": "destination-bucket-name" }
}

3. rename payload is wrong (same root cause)

Docs put newName in metadata. bucket.go#L596-L604 reads it from req.Data. Correct payload:

{
  "operation": "rename",
  "metadata": { "key": "old-name.txt" },
  "data":     { "newName": "new-name.txt" }
}

The "metadata parameters are:" bullet lists for copy, move, and rename should be split into "metadata parameters" (just key) and "data parameters" (destinationBucket / newName).

4. sign operation is completely undocumented

The binding implements a sign operation that returns a v4 signed URL (bucket.go#L418-L467), registered alongside the others at bucket.go#L171-L183. It is missing from:

  • The "Binding support" operations list at the top of the page.
  • Any per-operation section.

A documented payload would be:

{
  "operation": "sign",
  "metadata": {
    "key": "my-test-file.txt",
    "signTTL": "15m"
  }
}

Response:

{ "signURL": "https://storage.googleapis.com/..." }

5. signTTL is missing from the spec metadata fields table

signTTL is read from both component metadata and per-request metadata (bucket.go#L390-L392) but is not in the spec metadata table. It's required for the sign operation and accepts any Go duration string (e.g. "15m", "1h").

6. Backward-compatible name metadata key is undocumented

The binding maps metadata.namemetadata.key for backward compatibility (bucket.go#L402-L409). Worth a one-line note so users on older payloads understand the alias still works but key is preferred.

7. bulkGet example JSON is invalid

{
  "operation": "bulkGet",
}

Trailing comma — not valid JSON. Should be:

{ "operation": "bulkGet" }

8. bulkGet curl examples use the wrong operation name

The curl examples send "bulkget" (lowercase), but the operation constant is "bulkGet" (bucket.go#L56). The switch in Invoke is exact-match, so the lowercase form will fail with unsupported operation bulkget.

9. Duplicate "GCP Credentials" section

The ## GCP Credentials heading and its paragraph appear twice back-to-back. One copy should be removed.

10. Anchor links in the operations list don't match the section headings

The bullet list at the top uses these anchors:

Bullet anchor Actual section
#get-file ### Get object
#delete-file ### Delete object
#list-files ### List objects
#copy-files ### Copy objects
#move-files ### Move objects
#rename-files ### Rename objects

Either rename the sections (e.g. ### Get file) or fix the anchors. Section names also drift between singular and plural ("Get object" vs "Copy objects") — worth normalizing.

11. Typo: "kobjects"

"it can be used to restrict the results to only the kobjects in the given 'directory'"

Should be "objects".

12. Typo: "retuned"

"An HTTP 204 (No Content) and empty body will be retuned if successful."

Should be "returned".

13. Trailing comma in the create response example

{
    "objectURL":"https://storage.googleapis.com/<your bucket>/<key>",
}

Trailing comma — not valid JSON.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions