Skip to content

WIP for #16883 - bulk audit via API for RFID #16904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Conversation

snipe
Copy link
Member

@snipe snipe commented May 9, 2025

Still a WIP for #16883 as some discussion is happening around the shape of the returned JSON, but this is 80% of the way there.

@snipe snipe marked this pull request as draft May 9, 2025 10:36
@snipe
Copy link
Member Author

snipe commented May 14, 2025

So the way I'm currently looking at this, the shape of the bulk anything responses on store is looking like this so far:

✨snipe@chodeblossom✨ snipe-it  (refactor_status_labels) $ curl --insecure --request POST --url https://snipe-it.test/api/v1/models/1/files --header 'Accept: application/json' --header 'Authorization: Bearer MY-BEARER' --form 'file[][email protected]' --form 'file[][email protected]' --form 'notes=Test' | jq .
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11569    0   711  100 10858    583   8907  0:00:01  0:00:01 --:--:--  9482
{
  "status": "success",
  "messages": "File(s) successfully uploaded.",
  "payload": {
    "total": 2,
    "rows": [
      {
        "id": 529,
        "filename": "model-1-ypIfxNhl-README.md",
        "url": "https://snipe-it.test/models/1/showfile/529",
        "created_by": {
          "id": 1,
          "name": "Admin User"
        },
        "note": "Test",
        "created_at": {
          "datetime": "2025-05-14 13:57:17",
          "formatted": "Wed May 14, 2025 1:57PM"
        },
        "deleted_at": null,
        "available_actions": {
          "delete": true
        }
      },
      {
        "id": 530,
        "filename": "model-1-UcewVb2o-CONTRIBUTING.md",
        "url": "https://snipe-it.test/models/1/showfile/530",
        "created_by": {
          "id": 1,
          "name": "Admin User"
        },
        "note": "Test",
        "created_at": {
          "datetime": "2025-05-14 13:57:17",
          "formatted": "Wed May 14, 2025 1:57PM"
        },
        "deleted_at": null,
        "available_actions": {
          "delete": true
        }
      }
    ]
  }
}

This particular example is for bulk file uploads, but the same format would apply everywhere I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant