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

# Get URL by ID

> Retrieve a short URL by its UUID



## OpenAPI

````yaml https://raw.githubusercontent.com/prefeitura-rio/url_shortener/refs/heads/main/docs/openapi-v3.json get /urls/{id}
openapi: 3.0.0
info:
  description: A high-performance URL shortener service with metadata support and caching.
  title: URL Shortener API
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://pref.rio/link/api
    description: Production
  - url: https://staging.app.dados.rio/link/api
    description: Staging
security: []
paths:
  /urls/{id}:
    get:
      tags:
        - urls
      summary: Get URL by ID
      description: Retrieve a short URL by its UUID
      parameters:
        - description: URL ID
          name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/database.URL'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
      security:
        - bearerAuth: []
components:
  schemas:
    database.URL:
      type: object
      properties:
        created_at:
          type: string
          example: '2024-01-01T12:00:00Z'
        description:
          type: string
          example: A great website
        destination:
          type: string
          example: https://example.com
        expires_at:
          type: string
          example: '2024-12-31T23:59:59Z'
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        image_url:
          type: string
          example: https://example.com/image.jpg
        short_path:
          type: string
          example: abc123
        title:
          type: string
          example: My Website
        updated_at:
          type: string
          example: '2024-01-01T12:00:00Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````