AlayaCare Attachment Directory API
The Attachment Directory API from AlayaCare — 2 operation(s) for attachment directory.
The Attachment Directory API from AlayaCare — 2 operation(s) for attachment directory.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/alayacare-attachment-directory-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: External Employee Attachment Directory API
version: 1.0.8
description: "**AlayaCare IDs:**\nThe following terms are used to reference IDs that identify resources in AlayaCare:\n- employee_id\n- contact_id\n\n**External IDs**\nThe following terms are used to reference IDs that identify resources systems external to AlayaCare:\n- external_employee_id\n- external_contact_id\n\nExternal IDs are required to be unique.\nNo other assumptions are made regarding their format they are treated as strings.\n\n**Remarks**\n- All dates must be in ISO 8601 format with timezone data\n\n**Employee Status Considerations**\n- When updating the `status` of an employee to `terminated`, it is possible to add a `comment`. This `comment` is saved as an Employee Note with a `note_type` of type `terminated`.\n- Updating the `status` of an employee will have repercussions in the AlayaCare application. Please refer to this link for more information: \n https://alayacare.zendesk.com/hc/en-us/articles/360020774691\n"
servers:
- url: https://homecare.alayacare.ca/ext/api/v2/employees
tags:
- name: Attachment Directory
paths:
/employees/{employee_id}/attachments/{directory_path}/:
parameters:
- name: employee_id
in: path
required: true
description: 'AlayaCare internal ID of the employee
'
schema:
type: integer
- name: directory_path
in: path
required: true
description: 'Path where the directory lives
'
schema:
type: string
get:
tags:
- Attachment Directory
summary: Get the content of a directory
responses:
200:
$ref: '#/components/responses/SuccessResponseDirectoryContent'
404:
description: Directory not found
content:
application/json:
schema:
$ref: '#/components/schemas/DirectoryNotFoundSchema'
post:
tags:
- Attachment Directory
summary: Create a new directory
description: 'Create a directory at the `path` location, along with the underlying directory structure if it doesn''t exist already.
The path location represents the destination of the directory.
'
responses:
201:
$ref: '#/components/responses/SuccessResponseAttachmentDirectoryCreate'
400:
$ref: '#/components/responses/ErrorResponseDirectoryInvalidRequest'
404:
$ref: '#/components/responses/ErrorResponseEmployeeNotFound'
409:
$ref: '#/components/responses/ErrorResponseDirectoryAlreadyExists'
put:
tags:
- Attachment Directory
summary: Copy, move or rename directory
description: 'Copy, move or rename a directory and create the underlying directory structure of the new location if it doesn''t already exist.
The url of the `PUT` request is the path to the source location.
The payload must indicate whether the intention of the action is to copy, move or rename the file.
If a directory is being copied or moved, the destination is mandatory in the payload.
The url of the `PUT` request is the path to the source location.
i.e., if we have the following directories:
- `dir1/child1/`
- `dir2/child2/`
and we want to copy `child1/` inside `dir2/` (the goal is to have `dir2/child1/`), the action to copy must be specified in the payload and must be: `dir2/child1/`. The `source` URL request has to be `dir1/child1/`.
'
responses:
200:
$ref: '#/components/responses/SuccessResponseAttachmentDirectoryUpdate'
400:
$ref: '#/components/responses/ErrorResponseDirectoryStructureInvalidRequest'
404:
description: Source Directory not found
content:
application/json:
schema:
$ref: '#/components/schemas/DirectoryNotFoundSchema'
409:
$ref: '#/components/responses/ErrorResponseDirectoryAlreadyExists'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AttachmentAction'
description: Object with fields to be updated
required: true
delete:
tags:
- Attachment Directory
summary: Delete a directory
description: "Delete a directory which does not contain underlying directory or files.\n\nIf the directory contains underlying directories or files, a `forced-delete` field set to `true` must be provided in the request payload for the directory to be deleted. \n.\n"
responses:
204:
description: Directory deleted
400:
$ref: '#/components/responses/ErrorResponseHeaderMissing'
404:
description: Directory not found
content:
application/json:
schema:
$ref: '#/components/schemas/DirectoryNotFoundSchema'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteDirectoryActionSchema'
description: required to delete a directory
/employees/by_id/{external_employee_id}/attachments/{directory_path}/:
parameters:
- name: external_employee_id
in: path
required: true
schema:
type: string
- name: directory_path
in: path
required: true
schema:
type: string
get:
tags:
- Attachment Directory
summary: Get the content of a directory
responses:
200:
$ref: '#/components/responses/SuccessResponseDirectoryContent'
404:
description: Directory not found
content:
application/json:
schema:
$ref: '#/components/schemas/DirectoryNotFoundSchema'
post:
tags:
- Attachment Directory
summary: Create a new directory
description: 'Create a directory at the `path` location, along with the underlying directory structure if it doesn''t exist already
'
responses:
201:
$ref: '#/components/responses/SuccessResponseAttachmentDirectoryCreate'
400:
$ref: '#/components/responses/ErrorResponseDirectoryInvalidRequest'
404:
$ref: '#/components/responses/ErrorResponseEmployeeNotFound'
409:
$ref: '#/components/responses/ErrorResponseDirectoryAlreadyExists'
put:
tags:
- Attachment Directory
summary: Copy, move or rename a directory
description: 'Copy, move or rename a directory and create the underlying directory structure of the new location if it doesn''t already exist.
The url of the `PUT` request is the path to the source location.
The payload must indicate whether the intention of the action is to copy, move or rename the file.
If a directory is being copied or moved, the destination is mandatory in the payload.
The url of the `PUT` request is the path to the source location.
i.e., if we have the following directories:
- `dir1/child1/`
- `dir2/child2/`
and we want to copy `child1/` inside `dir2/` (the goal is to have `dir2/child1/`), the action to copy must be specified in the payload and must be: `dir2/child1/`. The `source` URL request has to be `dir1/child1/`.
'
responses:
200:
$ref: '#/components/responses/SuccessResponseAttachmentDirectoryUpdate'
400:
$ref: '#/components/responses/ErrorResponseDirectoryStructureInvalidRequest'
404:
description: Source Directory not found
content:
application/json:
schema:
$ref: '#/components/schemas/DirectoryNotFoundSchema'
409:
$ref: '#/components/responses/ErrorResponseDirectoryAlreadyExists'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AttachmentAction'
description: Object with fields to be updated
required: true
delete:
tags:
- Attachment Directory
summary: Delete a directory
description: "Delete a directory which does not contain underlying directory or files.\n\nIf the directory contains underlying directories or files, a `forced-delete` field set to `true` must be provided in the request payload for the directory to be deleted. \n"
responses:
204:
description: Directory deleted
400:
$ref: '#/components/responses/ErrorResponseHeaderMissing'
404:
description: Directory not found
content:
application/json:
schema:
$ref: '#/components/schemas/DirectoryNotFoundSchema'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteDirectoryActionSchema'
description: required to delete a directory
components:
responses:
ErrorResponseDirectoryStructureInvalidRequest:
description: Can't move a directory to one of its own sub-directories
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: http status response code
example: 400
message:
type: string
description: Detail on the error
example: Can't move a directory to one of its own sub-directories
ErrorResponseDirectoryAlreadyExists:
description: Directory already exists.
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: http status response code
example: 409
message:
type: string
description: Detail on the error
example: Directory "Ghost Directory" already exists.
SuccessResponseAttachmentDirectoryCreate:
description: Directory created
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: http status response code
example: 201
name:
type: string
description: Url to the directory created
example: /new_directory/
ErrorResponseEmployeeNotFound:
description: Employee not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
code: 404
message: Employee not found.
SuccessResponseAttachmentDirectoryUpdate:
description: Directory copied, moved or renamed
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: http status response code
example: 200
name:
type: string
description: 'Url to the new location of the copied or moved directory
'
example: /new_directory_copied/
ErrorResponseDirectoryInvalidRequest:
description: Can't post a file when creating a directory
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: http status response code
example: 400
message:
type: string
description: Detail on the error
example: Can't post a file when creating a directory
SuccessResponseDirectoryContent:
description: Content of a directory
content:
application/json:
schema:
type: array
items:
type: object
properties:
code:
type: integer
description: http status response code
example: 200
name:
type: string
description: Path to directory
example: employee/1002/report.pdf
last_modified:
type: string
format: date-time
description: 'When the directory was last modified (ISO 8601)
example: ''2020-07-08T13:30:00+00:00''
'
size:
type: integer
description: Size of the file in bytes
example:
employee_id: 1002
employee_external_id: ext_id
entries:
- last_modified: '2020-01-14T18:58:44+00:00'
name: Physician Order/
size: 0
- last_modified: '2020-01-14T18:58:44+00:00'
name: Physician Order/file.pdf
size: 123456
ErrorResponseHeaderMissing:
description: 'Missing `forced-delete` set to true in body.
'
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: http status response code
example: 400
message:
type: string
description: Detail on the error
example: This action will delete the directory and its content. Please confirm.
schemas:
ErrorResponse:
description: Error response
type: object
properties:
code:
type: integer
description: Response code
message:
type: string
description: Detailed error message
required:
- code
- message
DeleteDirectoryActionSchema:
type: object
properties:
forced-delete:
type: boolean
description: required to delete a non-empty directory
example: true
AttachmentAction:
description: Attachment actions
type: object
properties:
action:
type: string
example: move
enum:
- move
- copy
- rename
destination:
type: string
example: dir2/child1/
DirectoryNotFoundSchema:
type: object
properties:
code:
type: integer
description: http status response code
example: 404
message:
type: string
description: Detail on the error
example: Directory "Ghost Directory" not found
securitySchemes:
basic_auth:
type: http
scheme: basic
description: Basic HTTP auth over https