AssetLab Upload URLs API
Generate signed upload URLs for file storage
Generate signed upload URLs for file storage
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/assetlab-ca:assetlab-ca-upload-urls-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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: Assetlab Ca Upload URLs API
version: '1.0'
contact:
name: AssetLab Support
url: https://assetlab.ca
email: support@assetlab.ca
license:
name: Proprietary
description: 'Operations tagged Upload URLs across 2 of this provider''s published API definitions: assetlab-ca-openapi.yaml, assetlab-ca-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://ksirnjovowpvamgcnapt.supabase.co/functions/v1/api-gateway/v1
description: Production
security:
- BearerAuth: []
tags:
- name: Upload URLs
description: Generate signed upload URLs for file storage
paths:
/upload-urls:
post:
operationId: createUploadUrl
summary: Create signed upload URL
tags:
- Upload URLs
description: 'Generate a signed upload URL for uploading a file directly to AssetLab storage.
**Upload flow:**
1. Call this endpoint to get a `signed_url`
2. PUT the file binary directly to the `signed_url`
3. Store the returned `path` on the target record:
- **Asset image:** bucket `asset-images` → PATCH `/assets/{id}` with `image_url` = `path`
- **Asset document:** bucket `documents` → POST `/asset-documents` with `file_path` = `path`
- **Work order image:** bucket `attachments` → PATCH `/work-orders/{id}` with `image_url` = `path`
- **WO/WR/PM attachment:** bucket `attachments` → POST `/attachments` with `file_url` = `path`
- **Project document:** bucket `project-documents` → POST `/project-documents` with `file_path` = `path`
- **Contract document:** bucket `contract-documents` → POST `/contract-documents` with `file_path` = `path`
AssetLab storage buckets are private. Reads are served as short-lived signed
URLs, so store the `path` on the record and never a storage URL.
Requires `upload_urls:write` scope.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UploadUrlRequest'
responses:
'201':
description: Signed upload URL created
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/UploadUrlResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
servers:
- url: https://ksirnjovowpvamgcnapt.supabase.co/functions/v1/api-gateway/v1
description: Production
/upload-files:
post:
operationId: uploadFile
summary: Upload a file inline (base64)
tags:
- Upload URLs
description: 'Upload a file to AssetLab storage by sending its bytes inline as base64.
The AssetLab backend performs the Supabase Storage upload server-side.
Use this endpoint when the client cannot (or should not) perform a direct
HTTP PUT to a signed Supabase Storage URL — for example, MCP integrations
where outbound network is restricted by host allowlist.
Limits:
- Decoded file size ≤ 10 MB (hard server limit)
- Clients on arg-size-constrained channels (e.g. MCP tool calls) should
prefer smaller files and fall back to `/upload-urls` for large uploads.
After a successful upload, store the returned `path` on the target record
(assets, work orders, attachments, project / contract / asset documents) —
same mapping as `/upload-urls`.
Requires `upload_urls:write` scope.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UploadFileRequest'
responses:
'201':
description: File uploaded
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/UploadFileResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'413':
description: File exceeds 10 MB server limit
'429':
$ref: '#/components/responses/RateLimited'
servers:
- url: https://ksirnjovowpvamgcnapt.supabase.co/functions/v1/api-gateway/v1
description: Production
components:
schemas:
UploadUrlResponse:
type: object
properties:
signed_url:
type: string
path:
type: string
token:
type: string
bucket:
type: string
expires_in:
type: integer
UploadFileResponse:
type: object
properties:
path:
type: string
bucket:
type: string
file_size:
type: integer
description: Decoded file size in bytes
content_type:
type: string
UploadFileRequest:
type: object
required:
- bucket
- file_name
- content_base64
properties:
bucket:
type: string
enum:
- documents
- attachments
- project-documents
- contract-documents
- asset-images
file_name:
type: string
description: File name including extension
content_base64:
type: string
description: File bytes base64-encoded. Data URI prefixes (e.g. 'data:image/png;base64,') are stripped automatically.
content_type:
type: string
description: MIME type (e.g. image/jpeg, application/pdf). Defaults to application/octet-stream.
nullable: true
Error:
type: object
properties:
error:
type: string
example: Asset not found
UploadUrlRequest:
type: object
required:
- bucket
- file_name
properties:
bucket:
type: string
enum:
- documents
- attachments
- project-documents
- contract-documents
- asset-images
file_name:
type: string
responses:
Unauthorized:
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
BadRequest:
description: Invalid request (validation error or malformed input)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
description: Insufficient permissions - missing scope, or a resource the organization's plan does not include
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
RateLimited:
description: Rate limit exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: API key from AssetLab Settings > API Keys
x-refined-from:
- assetlab-ca-openapi.yaml
- assetlab-ca-openapi.yaml
x-tagGroups:
- name: Core
tags:
- Assets
- Work Orders
- Work Requests
- PM Schedules
- PM Templates
- name: Facilities
tags:
- Sites
- Buildings
- Locations
- name: Feature Classification
tags:
- Systems
- System Groups
- System Classes
- Asset Types
- Asset Type Groups
- Manufacturers
- name: Projects
tags:
- Projects
- Project Sites
- Project Buildings
- Project Locations
- Project System Classes
- Project System Groups
- Project Systems
- Project Assets
- Project Tasks
- Project Milestones
- Project Phases
- Project Budget Items
- Project Time Entries
- Project Comments
- Project Risks
- Project Document Folder Templates
- name: Financial
tags:
- Budgets
- Invoices
- Purchase Orders
- Expenses
- Change Orders
- Cost Categories
- Asset Costs
- Asset Replacement Plans
- name: Vendors & Contracts
tags:
- Vendors
- Contracts
- Vendor Site Assignments
- Contract Sites
- name: Compliance
tags:
- Compliance
- Compliance Records
- name: Parts & Inventory
tags:
- Parts
- Part Categories
- name: Comments & Documents
tags:
- Asset Comments
- Work Order Comments
- Asset Documents
- Project Documents
- Contract Documents
- Attachments
- Upload URLs
- name: Level of Service
tags:
- Service Areas
- Service Area System Classes
- Service Area Sites
- LoS Measures
- LoS Measurements
- LoS Proposed Targets
- LoS Targets History
- System LoS Targets
- Infrastructure LoS Targets
- Criticality Modifiers
- LoS Consequences
- LoS Status Snapshots
- name: Infrastructure
tags:
- Infrastructure Feature Classes
- Infrastructure Networks
- Infrastructure Assets
- Infrastructure Asset Inspections
- name: Dashboard & Analytics
tags:
- Dashboard
- Dashboard Snapshots
- Site FCI History
- Asset Risk History
- Asset Condition Assessments
- name: Configuration
tags:
- Asset Statuses
- Work Categories
- Building Types
- Location Types
- Custom Field Definitions
- Custom Field Values