# Which workspace an attachment's page is in

The Notes app's image route (`/notes/attachments/<id>`) holds only the
session's default-workspace token, so an image on a page in another
workspace would not be found (EAS-271). With this it finds that
workspace and exchanges the token for one there.

The same rules and answers as locatePage, applied to the attachment's
page: it answers only when the caller could read that page in its own
workspace. Every other case, including an attachment on no page, gets
the same 404, byte for byte. Shares locatePage's rate limits.


Canonical: https://easerix.com/docs/developers/api/notes/sharing/locateAttachment

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

export default function Layout(props) {
  const { APIPage, OpenAPIPage } = props.components ?? {};
  // "APIPage" is the old name from v10, this allows both for backward compatibility
  const Comp = OpenAPIPage ?? APIPage;
  return (
    <>
      {props.children}
      <Comp document="notes" operations={[{"path":"/v1/attachments/{id}/locate","method":"get"}]} />
    </>
  );
}
