openapi: 3.0.0
servers:
  - url: https://api.fungenerators.com
info:
  contact:
    name: Fun Generators
    url: https://fungenerators.com/
  description: |
    A full featured, REST based UUID generator with json/xml/jsonp result support. You can try them out right here. [Click here to subscribe](http://fungenerators.com/api/uuid/)
  termsOfService: https://fungenerators.com/terms
  title: UUID Generation API
  version: "1.5"
  x-apisguru-categories:
    - text
  x-origin:
    - format: openapi
      url: https://fungenerators.com/yaml/uuid.yaml
      version: "3.0"
  x-providerName: fungenerators.com
  x-serviceName: uuid
tags:
  - description: Generate different versions of UUID easily.
    externalDocs:
      description: Find out more
      url: https://fungenerators.com/api/uuid/
    name: UUID Generation
  - description: Parse UUID string and check for its validity and return version details
    externalDocs:
      description: Find out more
      url: https://fungenerators.com/api/uuid/
    name: UUID Parsing
paths:
  /uuid:
    get:
      description: Generate a random UUID (v4).
      parameters:
        - description: Number of UUID's to generate (defaults to 1)
          in: query
          name: count
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 4
                      },
                      "contents": {
                        "uuid": [
                          {
                            "uuid": "b201b88e-b0d2-4e82-9ea8-d2d1e25b3bd0",
                            "version": 4
                          },
                          {
                            "uuid": "75becbbb-ae68-4e1a-95b1-c2dfc7a5891a",
                            "version": 4
                          },
                          {
                            "uuid": "3cffa9ad-00a9-4d7a-87f3-85626808444f",
                            "version": 4
                          },
                          {
                            "uuid": "d2c477c2-a2e3-463a-a3c5-0f131c9826c2",
                            "version": 4
                          }
                        ],
                        "copyright": {
                            "year": "2020",
                            "url": "  https://fungenerators.com/random/uuid"
                        }
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
      security:
        - X-Fungenerators-Api-Secret: []
      tags:
        - UUID Generation
    post:
      description: Parse a UUID string and return its version and check whether it is valid.
      parameters:
        - description: UUID String to parse
          in: query
          name: uuidstr
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                        "uuid": [
                          {
                            "is_valid": true,
                            "uuid": "14cdb9b4-de01-3faa-aff5-65bc2f771745",
                            "version": 3
                          }
                        ],
                        "copyright": {
                          "year": "2020",
                          "url": "  https://fungenerators.com/random/uuid"
                        }
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
      security:
        - X-Fungenerators-Api-Secret: []
      tags:
        - UUID Parsing
  "/uuid/version/{version}":
    get:
      description: Generate a random UUID (v4).
      parameters:
        - description: Number of UUID's to generate (defaults to 1)
          in: query
          name: count
          required: false
          schema:
            format: integer
            type: integer
        - description: Version of the UUID spec to use. (0-5), Use '0' for nil (00000000-0000-0000-0000-000000000000) UUID.
          in: path
          name: version
          required: true
          schema:
            format: integer
            type: integer
        - description: For v3 and v5 of UUID Spec you can supply the type (dns/url/oid/x500/nil).
          in: query
          name: type
          required: false
          schema:
            format: string
            type: string
        - description: For v3 and v5 of UUID Spec supply the text value for the type specified dns/url/oid/x500/nil. For example specify a dns/domain string if the type is "dns"
          in: query
          name: text
          required: false
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 4
                      },
                      "contents": {
                        "uuid": [
                          {
                            "uuid": "b201b88e-b0d2-4e82-9ea8-d2d1e25b3bd0",
                            "version": 4
                          },
                          {
                            "uuid": "75becbbb-ae68-4e1a-95b1-c2dfc7a5891a",
                            "version": 4
                          },
                          {
                            "uuid": "3cffa9ad-00a9-4d7a-87f3-85626808444f",
                            "version": 4
                          },
                          {
                            "uuid": "d2c477c2-a2e3-463a-a3c5-0f131c9826c2",
                            "version": 4
                          }
                        ],
                        "copyright": {
                            "year": "2020",
                            "url": "  https://fungenerators.com/random/uuid"
                        }
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
      security:
        - X-Fungenerators-Api-Secret: []
      tags:
        - UUID Generation
components:
  securitySchemes:
    X-Fungenerators-Api-Secret:
      in: header
      name: X-Fungenerators-Api-Secret
      type: apiKey
