# ai.newnal.illi.schedule.uploadImage

> Root or main admin uploads the image shown on the device's alarm card of one entry (JPEG or PNG, at most 5 MB; the media service normalises it to a JPEG of at most 2,000,000 bytes). Query homeId and rkey name the entry; both records of a grouped entry get it.

- Kind: procedure
- Authority: schedule.illi.newnal.ai
- Lexicon: 1
- Published by [illi-service.newnal.id](https://lexicon.garden/identity/did:plc:uztm7bi2ce42dez3uu3qafro), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.schedule.uploadImage)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.schedule.uploadImage/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.schedule.uploadImage/analytics)

## Procedure (`ai.newnal.illi.schedule.uploadImage`)

Type: procedure · POST

### Parameters (query string)

- `homeId` (string · tid, required)
- `rkey` (string · record-key, required)

### Input (*/*)


### Output (application/json)

- `imageUrl` (string, required)

### Errors

- `NotMember`: No description in schema.
- `NotAdmin`: No description in schema.
- `HomeNotFound`: No description in schema.
- `EntryNotFound`: No description in schema.
- `UnsupportedMedia`: No description in schema.
- `MediaTooLarge`: No description in schema.
- `MediaUnavailable`: No description in schema.
- `PdsUnavailable`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Root or main admin uploads the image shown on the device's alarm card of one entry (JPEG or PNG, at most 5 MB; the media service normalises it to a JPEG of at most 2,000,000 bytes). Query homeId and rkey name the entry; both records of a grouped entry get it.",
      "errors": [
        {
          "name": "NotMember"
        },
        {
          "name": "NotAdmin"
        },
        {
          "name": "HomeNotFound"
        },
        {
          "name": "EntryNotFound"
        },
        {
          "name": "UnsupportedMedia"
        },
        {
          "name": "MediaTooLarge"
        },
        {
          "name": "MediaUnavailable"
        },
        {
          "name": "PdsUnavailable"
        }
      ],
      "input": {
        "encoding": "*/*"
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "imageUrl": {
              "type": "string"
            }
          },
          "required": [
            "imageUrl"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "homeId": {
            "format": "tid",
            "type": "string"
          },
          "rkey": {
            "format": "record-key",
            "type": "string"
          }
        },
        "required": [
          "homeId",
          "rkey"
        ],
        "type": "params"
      },
      "type": "procedure"
    }
  },
  "id": "ai.newnal.illi.schedule.uploadImage",
  "lexicon": 1
}
```
