Skip to content

    Pre-launch API. The concepts described here are settled, but the API shape is not: request and response fields, parameters and defaults can still change. Build against it, and talk to your Luigi's Box contact before you put an integration into production.

    Create a repository

    View source
    POST
    /distribution/v1/repositories
    curl --request POST \
    --url https://api.eu1.luigisbox.ai/distribution/v1/repositories \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{ "channel_id": "example", "channel_name": "example", "name": "example", "organization_id": "example" }'

    Create a repository for an organization, seeded with the Luma scaffold.

    Media type application/json
    CreateRepositoryBody

    Fields accepted when creating a repository.

    object
    channel_id
    Any of:
    string
    channel_name
    Any of:
    string
    name
    Any of:
    string
    >= 1 characters <= 200 characters
    organization_id
    required
    Organization Id

    Organization that will own the repository, e.g. lbo_r2vn8c.

    string
    Example generated
    {
    "channel_id": "example",
    "channel_name": "example",
    "name": "example",
    "organization_id": "example"
    }

    Successful Response

    Media type application/json
    RepositoryView

    A repository and its current state.

    object
    created_at
    required
    Created At

    When the repository was created.

    string format: date-time
    git_url
    required
    Git Url

    Clone and push URL for git.

    string
    loader_script_url
    required
    Loader Script Url

    Public URL of the loader script. Published by the first push — it answers 404 until then.

    string
    name
    Any of:
    string
    organization_id
    required
    Organization Id

    Organization that owns the repository, e.g. lbo_r2vn8c.

    string
    repository_id
    required
    Repository Id

    Assigned repository id, e.g. lbdr_8w3k2p.

    string
    state
    required
    RepositoryState

    Whether the repository is ready to be used. active is the only state it can be cloned or pushed to in; provisioning and deleting mean a create or a delete did not finish.

    string
    Allowed values: provisioning active deleting
    updated_at
    required
    Updated At

    When the repository’s metadata last changed.

    string format: date-time
    Example
    {
    "state": "provisioning"
    }

    Missing or invalid credentials

    Media type application/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    validation_errors
    Any of:
    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example generated
    {
    "exception_details": {
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Authenticated but not permitted

    Media type application/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    validation_errors
    Any of:
    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example generated
    {
    "exception_details": {
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Request validation failed

    Media type application/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    validation_errors
    Any of:
    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example generated
    {
    "exception_details": {
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Upstream service failed

    Media type application/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    validation_errors
    Any of:
    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example generated
    {
    "exception_details": {
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }