dev.knotless.defineLabel

lexicons.knotless.dev

Documentation

Adds the label to the repository's dev.knotless.repo record, in place of any of its name, as `knotless labels add` does. Only its owner, logged in to this appview's web pages, can: the appview writes with the session it keeps for that account, which the pages' session cookie names.

main procedure

Adds the label to the repository's dev.knotless.repo record, in place of any of its name, as `knotless labels add` does. Only its owner, logged in to this appview's web pages, can: the appview writes with the session it keeps for that account, which the pages' session cookie names.

Input

Encodingapplication/json
color string Optional

A hex color, as #d73a4a.

maxLength: 7 bytes
description string Optional

What the label means, for those who put it on.

maxLength: 1000 bytesmaxGraphemes: 200 graphemes
exclusive boolean Optional

Whether, of its scope's exclusive labels, it stands alone: setting one takes the others off.

name string Required

Up to its last `/`, if it has one, its scope, as kind/bug's is kind.

maxLength: 100 bytesmaxGraphemes: 50 graphemes
repo stringat-uri Required

The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.

Output

Encodingapplication/json
labels array Required

The labels it defines now.

Errors

NotFound No such repository.
InvalidRequest The name is empty or too long, or the color is no hex color.
AuthenticationRequired No account is logged in to the pages, or its session has ended.
Forbidden The account logged in is not the repository's owner.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://bsky.social)
Enter valid JSON for the request body
View raw schema
{
  "description": "Adds the label to the repository's dev.knotless.repo record, in place of any of its name, as `knotless labels add` does. Only its owner, logged in to this appview's web pages, can: the appview writes with the session it keeps for that account, which the pages' session cookie names.",
  "errors": [
    {
      "description": "No such repository.",
      "name": "NotFound"
    },
    {
      "description": "The name is empty or too long, or the color is no hex color.",
      "name": "InvalidRequest"
    },
    {
      "description": "No account is logged in to the pages, or its session has ended.",
      "name": "AuthenticationRequired"
    },
    {
      "description": "The account logged in is not the repository's owner.",
      "name": "Forbidden"
    }
  ],
  "input": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "color": {
          "description": "A hex color, as #d73a4a.",
          "maxLength": 7,
          "type": "string"
        },
        "description": {
          "description": "What the label means, for those who put it on.",
          "maxGraphemes": 200,
          "maxLength": 1000,
          "type": "string"
        },
        "exclusive": {
          "description": "Whether, of its scope's exclusive labels, it stands alone: setting one takes the others off.",
          "type": "boolean"
        },
        "name": {
          "description": "Up to its last `/`, if it has one, its scope, as kind/bug's is kind.",
          "maxGraphemes": 50,
          "maxLength": 100,
          "type": "string"
        },
        "repo": {
          "description": "The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.",
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "repo",
        "name"
      ],
      "type": "object"
    }
  },
  "output": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "labels": {
          "description": "The labels it defines now.",
          "items": {
            "ref": "dev.knotless.repo#label",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "labels"
      ],
      "type": "object"
    }
  },
  "type": "procedure"
}

Lexicon Garden

@