openapi: 3.0.3
info:
  title: 'SHRT API Documentation'
  description: 'URL Shortener API - Create, manage and redirect short URLs'
  version: 1.0.0
servers:
  -
    url: 'http://shrt-production-alb-132772302.us-east-1.elb.amazonaws.com'
tags:
  -
    name: Endpoints
    description: ''
paths:
  /api/urls:
    get:
      summary: ''
      operationId: getApiUrls
      description: ''
      parameters: []
      responses:
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Device ID required'
                properties:
                  error:
                    type: string
                    example: 'Device ID required'
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                search:
                  type: string
                  description: 'Search term to filter URLs by original URL or short code. Must not be greater than 255 characters.'
                  example: example.com
                  nullable: false
                per_page:
                  type: integer
                  description: 'Number of items to return per page (1-100). Must be at least 1. Must not be greater than 100.'
                  example: 15
                  nullable: false
                page:
                  type: integer
                  description: 'Page number for pagination. Must be at least 1.'
                  example: 1
                  nullable: false
      security: []
    post:
      summary: ''
      operationId: postApiUrls
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  description: 'The URL to be shortened. Must be a valid RFC 1738 compliant URL. Must not be greater than 2048 characters.'
                  example: 'https://www.example.com/very/long/path/to/resource'
                  nullable: false
              required:
                - url
      security: []
  '/api/urls/{id}':
    get:
      summary: ''
      operationId: getApiUrlsId
      description: ''
      parameters: []
      responses:
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: ''
                properties:
                  message:
                    type: string
                    example: ''
      tags:
        - Endpoints
      security: []
    put:
      summary: ''
      operationId: putApiUrlsId
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  description: 'The new URL to replace the existing one. Must be a valid RFC 1738 compliant URL. Must not be greater than 2048 characters.'
                  example: 'https://www.updated-example.com/new/path'
                  nullable: false
              required:
                - url
      security: []
    delete:
      summary: ''
      operationId: deleteApiUrlsId
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the url.'
        example: architecto
        required: true
        schema:
          type: string
  '/api/resolve/{code}':
    get:
      summary: ''
      operationId: getApiResolveCode
      description: ''
      parameters: []
      responses:
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No se encontró la URL solicitada.'
                properties:
                  message:
                    type: string
                    example: 'No se encontró la URL solicitada.'
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: code
        description: ''
        example: NG4
        required: true
        schema:
          type: string
