#reassignFacesById does not seem to work

1 messages · Page 1 of 1 (latest)

mystic garnet
#

Hello,
I’m on Immich 2.1 (Docker Compose) and I’m trying to move a misidentified face from person N to person R. I’m the only admin/user and the API key has full access. The asset is from an unshared external library.

What works

I can fetch the destination person (R):

curl -s "http://SERVER:PORT/api/people/
<R-person-id>"
-H "x-api-key: <API_KEY>"
{"id": "<R-person-id>", "name": "R", ...}

I can list faces on the asset:

curl -s "http://SERVER:PORT/api/faces?id=
<asset-id>"
-H "x-api-key: <API_KEY>"
[
{"id":"da0d22c9-...","person":{"id":"<N-person-id>","name":"N"}},
{"id":"05d25bc2-...","person":{"id":"<N-person-id>","name":"N"}},
{"id":"149c16e6-...","person":{"id":"<U-person-id>","name":"U"}}
]

What I am trying to do:

Move face 05d25bc2-… from N to R.

Call I’m making

curl -L -X PUT "http://SERVER:PORT/api/faces/05d25bc2-...
"
-H "x-api-key: <API_KEY>"
-H "Content-Type: application/json"
-d '{"id":"<R-person-id>"}'

API documentation

What I expect

The face gets reassigned to person R.

What i get:

Response (HTTP 400):

{"message":"Not found or no person.update access","error":"Bad Request","statusCode":400,"correlationId":"z4lgohai"}

Notes:

  • API key is from the admin account, no other accounts exist, nothing is shared
  • Face is visible on the asset and currently assigned to N.
  • No logs mention anything regarding API calls
  • Moving the faces manually on the webui works.
    Any ideas on what I’m missing or a different endpoint/payload I should be using? I also saw /people/{id}/reassign but as this call doesnt take the face_id as input (only asset and personID), I can only move both N faces to R and not only a single one. This call works but doesnt help me as i want to move only one face.

Thanks

lofty jasperBOT
#

:wave: Hey @mystic garnet,

Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich immich.

References

#

Checklist

I have...

  1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: read applicable release notes.
  3. :ballot_box_with_check: reviewed the FAQs for known issues.
  4. :ballot_box_with_check: reviewed Github for known issues.
  5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: uploaded the relevant information (see below).
  7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

Information

In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:

  • Your docker-compose.yml and .env files.
  • Logs from all the containers and their status (see above).
  • All the troubleshooting steps you've tried so far.
  • Any recent changes you've made to Immich or your system.
  • Details about your system (both software/OS and hardware).
  • Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
  • The version of the Immich server, mobile app, and other relevant pieces.
  • Any other information that you think might be relevant.

Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

lofty jasperBOT
runic parrot
#

I have no experience with the API @mystic garnet but could you track the request when you're changing in the GUI to see what is missing maybe?

mystic garnet
#

Hello, thanks for pointing me in the right direction. By checking out what the browser did i realized that it has to be

curl -L -X PUT "http://SERVER:PORT/api/faces/<R-person-id>
"
-H "x-api-key: <API_KEY>"
-H "Content-Type: application/json"
-d '{"id":"<face-id>"}'

the person id has to be in the url, the face id is in the content. Maybe this should be made more clear in the api documentation. Thanks😃