> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dataerai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Post apiassets lock



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/assets/{id}/lock/
openapi: 3.0.3
info:
  title: Console API
  version: 1.0.0
  description: Central control plane API for the Dataerai platform.
servers:
  - url: https://{server}
    description: Your Dataerai deployment (the API is served under /api)
    variables:
      server:
        default: your-deployment.dataerai.com
        description: Host of your Dataerai deployment
security: []
paths:
  /api/assets/{id}/lock/:
    post:
      tags:
        - api
      operationId: assets_lock
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetLock'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AssetLock'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AssetLock'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
          description: ''
      security:
        - cookieAuthCsrfExempt: []
components:
  schemas:
    AssetLock:
      type: object
      properties:
        locked:
          type: boolean
      required:
        - locked
    Asset:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        title:
          type: string
          maxLength: 255
        description:
          type: string
        alias:
          type: string
          maxLength: 255
        record_type:
          $ref: '#/components/schemas/RecordTypeEnum'
        tags:
          type: array
          items:
            type: string
            maxLength: 100
        metadata: {}
        is_locked:
          type: boolean
        owner_type:
          type: string
          readOnly: true
        owner_id:
          type: string
          format: uuid
          readOnly: true
        owner_name:
          type: string
          nullable: true
          readOnly: true
        creator_id:
          type: string
          format: uuid
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        current_content:
          oneOf:
            - $ref: '#/components/schemas/AssetContent'
          nullable: true
          readOnly: true
        creator_name:
          type: string
          nullable: true
          readOnly: true
        effective_flags:
          type: integer
          readOnly: true
        preferred_repository_id:
          type: string
          format: uuid
          readOnly: true
          nullable: true
        is_migrating:
          type: boolean
          readOnly: true
        is_starred:
          type: boolean
          readOnly: true
        provenance_token:
          type: string
          nullable: true
          readOnly: true
        authors:
          type: array
          items:
            $ref: '#/components/schemas/AssetAuthor'
          readOnly: true
        image_url:
          type: string
          nullable: true
          readOnly: true
        did:
          type: string
          readOnly: true
        cited_work:
          allOf:
            - $ref: '#/components/schemas/WorkCitation'
          readOnly: true
        access_scope:
          type: string
          readOnly: true
      required:
        - access_scope
        - authors
        - created_at
        - creator_id
        - creator_name
        - current_content
        - did
        - effective_flags
        - id
        - image_url
        - is_migrating
        - is_starred
        - owner_id
        - owner_name
        - owner_type
        - preferred_repository_id
        - title
        - updated_at
    RecordTypeEnum:
      enum:
        - dataset
        - sample_specimen
        - synthesis
        - fabrication
        - processing
        - assembly
        - measurement
        - imaging
        - spectroscopy
        - diffraction_scattering
        - mechanical_testing
        - thermal_analysis
        - electrical_testing
        - chemical_assay
        - biological_assay
        - environmental_observation
        - calibration
        - quality_control
        - simulation
        - analysis
        - protocol_workflow
        - software_code
      type: string
      description: |-
        * `dataset` - Dataset
        * `sample_specimen` - Sample / Specimen
        * `synthesis` - Synthesis
        * `fabrication` - Fabrication
        * `processing` - Processing
        * `assembly` - Assembly
        * `measurement` - Measurement
        * `imaging` - Imaging
        * `spectroscopy` - Spectroscopy
        * `diffraction_scattering` - Diffraction / Scattering
        * `mechanical_testing` - Mechanical Testing
        * `thermal_analysis` - Thermal Analysis
        * `electrical_testing` - Electrical Testing
        * `chemical_assay` - Chemical Assay
        * `biological_assay` - Biological Assay
        * `environmental_observation` - Environmental Observation
        * `calibration` - Calibration
        * `quality_control` - Quality Control
        * `simulation` - Simulation
        * `analysis` - Analysis
        * `protocol_workflow` - Protocol / Workflow
        * `software_code` - Software / Code
    AssetContent:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        asset_id:
          type: string
          format: uuid
          readOnly: true
        allocation_id:
          type: string
          format: uuid
          readOnly: true
          nullable: true
        allocation:
          allOf:
            - $ref: '#/components/schemas/ContentAllocationSummary'
          readOnly: true
          nullable: true
        storage_path:
          type: string
          readOnly: true
        size_bytes:
          type: integer
          readOnly: true
        files: {}
        status:
          allOf:
            - $ref: '#/components/schemas/AssetContentStatusEnum'
          readOnly: true
        source:
          allOf:
            - $ref: '#/components/schemas/SourceEnum'
          readOnly: true
        external_record_id:
          type: string
          readOnly: true
        external_filename:
          type: string
          readOnly: true
        external_download_url:
          type: string
          format: uri
          nullable: true
          readOnly: true
        external_download_is_landing_page:
          type: boolean
          readOnly: true
        extracted_metadata:
          readOnly: true
          nullable: true
        data_type:
          type: string
          nullable: true
          readOnly: true
        data_type_confidence:
          type: number
          format: double
          readOnly: true
          nullable: true
        extraction_status:
          allOf:
            - $ref: '#/components/schemas/ExtractionStatusEnum'
          readOnly: true
        extraction_error:
          type: string
          readOnly: true
        extraction_attempted_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - allocation
        - allocation_id
        - asset_id
        - created_at
        - data_type
        - data_type_confidence
        - external_download_is_landing_page
        - external_download_url
        - external_filename
        - external_record_id
        - extracted_metadata
        - extraction_attempted_at
        - extraction_error
        - extraction_status
        - id
        - size_bytes
        - source
        - status
        - storage_path
        - updated_at
    AssetAuthor:
      type: object
      description: |-
        Authorship credit on an Asset — distinct from Asset.creator_id.

        The ``person`` field carries a compact ``AuthorPersonSummary`` so
        callers don't need a second round-trip to render author names.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        position:
          type: integer
          readOnly: true
        is_corresponding_author:
          type: boolean
          readOnly: true
        affiliation_snapshot:
          type: string
          readOnly: true
        person:
          allOf:
            - $ref: '#/components/schemas/AuthorPersonSummary'
          readOnly: true
      required:
        - affiliation_snapshot
        - id
        - is_corresponding_author
        - person
        - position
    WorkCitation:
      type: object
      description: >-
        An OpenAlex Work shaped for the sidebar citation exporter.


        ``authors`` / ``venue`` / ``biblio`` are read off the stored OpenAlex

        ``metadata`` payload — the same extraction beta's unified works search
        uses

        for its result rows (``works_search_views._authors_from_work_dict`` /

        ``_venue_from_work_dict``) — so rendering one linked work needs NO

        WorkAuthor / Person / Source joins. Read-only; Works are ingested data.


        Defined above ``AssetSerializer`` so its ``cited_work`` field can
        reference

        this class in ``@extend_schema_field`` (which also registers the
        component).
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        openalex_id:
          type: string
          readOnly: true
        doi:
          type: string
          readOnly: true
        title:
          type: string
          readOnly: true
        display_name:
          type: string
          readOnly: true
        publication_year:
          type: integer
          readOnly: true
          nullable: true
        publication_date:
          type: string
          format: date
          readOnly: true
          nullable: true
        authors:
          type: array
          items:
            type: object
            properties:
              full_name:
                type: string
          readOnly: true
        venue:
          type: string
          nullable: true
          readOnly: true
        biblio:
          type: object
          properties:
            volume:
              type: string
              nullable: true
            issue:
              type: string
              nullable: true
            first_page:
              type: string
              nullable: true
            last_page:
              type: string
              nullable: true
          readOnly: true
      required:
        - authors
        - biblio
        - display_name
        - doi
        - id
        - openalex_id
        - publication_date
        - publication_year
        - title
        - venue
    ContentAllocationSummary:
      type: object
      description: Compact allocation projection embedded inside AssetContentSerializer.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        alias:
          type: string
          readOnly: true
        repository_name:
          type: string
          readOnly: true
        is_default:
          type: boolean
          readOnly: true
        current_bytes:
          type: integer
          readOnly: true
        data_volume_limit:
          type: integer
          readOnly: true
        current_record_count:
          type: integer
          readOnly: true
        max_records:
          type: integer
          readOnly: true
      required:
        - alias
        - current_bytes
        - current_record_count
        - data_volume_limit
        - id
        - is_default
        - max_records
        - repository_name
    AssetContentStatusEnum:
      enum:
        - uploading
        - available
        - failed
      type: string
      description: |-
        * `uploading` - Uploading
        * `available` - Available
        * `failed` - Failed
    SourceEnum:
      enum:
        - native
        - zenodo
        - databank
        - figshare
        - mdf
        - dryad
        - osf
        - mendeley
        - dataverse
        - huggingface
        - fourtu
        - cern
        - sciencebase
        - gbif
        - biostudies
        - pdb
        - pride
        - nomad
        - pangaea
        - cmr
        - pubchem
        - uniprot
        - ncbigeo
        - chembl
        - openml
        - datacite
        - dataone
        - noaa
        - cod
        - clinicaltrials
        - worldbank
        - ena
        - openneuro
        - empiar
        - mast
        - tcia
        - internetarchive
        - fooddata
        - nga
      type: string
      description: |-
        * `native` - Native
        * `zenodo` - Zenodo
        * `databank` - Illinois Data Bank
        * `figshare` - Figshare
        * `mdf` - Materials Data Facility
        * `dryad` - Dryad
        * `osf` - OSF
        * `mendeley` - Mendeley
        * `dataverse` - Dataverse
        * `huggingface` - Hugging Face
        * `fourtu` - 4TU.ResearchData
        * `cern` - CERN Open Data
        * `sciencebase` - USGS ScienceBase
        * `gbif` - GBIF
        * `biostudies` - EMBL-EBI BioStudies
        * `pdb` - RCSB Protein Data Bank
        * `pride` - EMBL-EBI PRIDE
        * `nomad` - NOMAD
        * `pangaea` - PANGAEA
        * `cmr` - NASA Earthdata (CMR)
        * `pubchem` - PubChem
        * `uniprot` - UniProt
        * `ncbigeo` - NCBI GEO
        * `chembl` - ChEMBL
        * `openml` - OpenML
        * `datacite` - DataCite
        * `dataone` - DataONE
        * `noaa` - NOAA NCEI
        * `cod` - Crystallography Open Database
        * `clinicaltrials` - ClinicalTrials.gov
        * `worldbank` - World Bank
        * `ena` - ENA
        * `openneuro` - OpenNeuro
        * `empiar` - EMPIAR
        * `mast` - MAST
        * `tcia` - TCIA
        * `internetarchive` - Internet Archive
        * `fooddata` - FoodData Central
        * `nga` - National Gallery of Art
    ExtractionStatusEnum:
      enum:
        - pending
        - succeeded
        - skipped
        - failed
      type: string
      description: |-
        * `pending` - Pending
        * `succeeded` - Succeeded
        * `skipped` - Skipped
        * `failed` - Failed
    AuthorPersonSummary:
      type: object
      description: |-
        Compact person summary embedded in asset-author entries.

        Carries just enough (``id``, ``full_name``, ``orcid_id``) to render
        an author credit without a follow-up lookup.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        full_name:
          type: string
          readOnly: true
        orcid_id:
          type: string
          readOnly: true
      required:
        - full_name
        - id
        - orcid_id

````