{
  "components": {
    "schemas": {
      "AvailableLocales": {
        "description": "The languages a methodology can run in: those every part of it is\nfully translated into.",
        "properties": {
          "available_locales": {
            "description": "BCP-47 tags, sorted; locales fully present on every descendant.",
            "items": {
              "type": "string"
            },
            "title": "Available Locales",
            "type": "array"
          },
          "methodology_id": {
            "format": "uuid",
            "title": "Methodology Id",
            "type": "string"
          }
        },
        "required": [
          "methodology_id",
          "available_locales"
        ],
        "title": "AvailableLocales",
        "type": "object"
      },
      "CompetencyListItem": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "name"
        ],
        "title": "CompetencyListItem",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "MethodologyListItem": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "core_release_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The content release this version was published against; null for a draft or an older version.",
            "title": "Core Release Number"
          },
          "default_locale": {
            "title": "Default Locale",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "owner_tenant_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The organisation that owns this methodology; null when Wiselook owns it.",
            "title": "Owner Tenant Id"
          },
          "state": {
            "default": "published",
            "enum": [
              "draft",
              "published"
            ],
            "title": "State",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "string"
          },
          "visibility": {
            "default": "private",
            "enum": [
              "public",
              "private"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "version",
          "default_locale"
        ],
        "title": "MethodologyListItem",
        "type": "object"
      },
      "MethodologyRead": {
        "description": "Methodology read response. `name`/`description` are the text served for\nthe request (the default-locale copy unless `?locale=` resolved to a\ntranslation); `translations` lists the stored non-default locales.",
        "properties": {
          "change_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Note"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "core_release_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The content release this version was published against; null for a draft or an older version.",
            "title": "Core Release Number"
          },
          "default_locale": {
            "description": "BCP-47 tag",
            "title": "Default Locale",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Default-locale copy; other locales in `translations`",
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "locale_set": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The languages verified when this version was published; null for a draft or an older version.",
            "title": "Locale Set"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Default-locale copy; other locales in `translations`",
            "title": "Name"
          },
          "owner_tenant_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The organisation that owns this methodology; null when Wiselook owns it.",
            "title": "Owner Tenant Id"
          },
          "state": {
            "default": "published",
            "description": "draft = editable; published = frozen",
            "enum": [
              "draft",
              "published"
            ],
            "title": "State",
            "type": "string"
          },
          "translations": {
            "description": "The stored non-default locales, independent of `?locale=`; sorted by locale.",
            "items": {
              "$ref": "#/components/schemas/MethodologyTranslationRead"
            },
            "title": "Translations",
            "type": "array"
          },
          "version": {
            "title": "Version",
            "type": "string"
          },
          "visibility": {
            "default": "private",
            "description": "public = all tenants; private = assigned only",
            "enum": [
              "public",
              "private"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "version",
          "default_locale"
        ],
        "title": "MethodologyRead",
        "type": "object"
      },
      "MethodologyTranslationRead": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "locale": {
            "description": "BCP-47 tag",
            "title": "Locale",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "locale",
          "name"
        ],
        "title": "MethodologyTranslationRead",
        "type": "object"
      },
      "Page_MethodologyListItem_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MethodologyListItem"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "page_size": {
            "title": "Page Size",
            "type": "integer"
          },
          "pages": {
            "title": "Pages",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "Page[MethodologyListItem]",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "bearerFormat": "JWT",
        "description": "OAuth2 access token: a client-credentials token for your backend, or the visitor session token for the widget. See Authentication.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "Wiselook Catalog Service",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/competencies": {
      "get": {
        "description": "Lists the competencies, with each name in the language you ask for with `locale`. A competency without that language is served in English (`en-US`); the response then carries `X-Wiselook-Locale-Fallback: true`.",
        "operationId": "list_competencies_v1_competencies_get",
        "parameters": [
          {
            "description": "BCP-47 tag",
            "in": "query",
            "name": "locale",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "BCP-47 tag",
              "title": "Locale"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CompetencyListItem"
                  },
                  "title": "Response List Competencies V1 Competencies Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List competencies",
        "tags": [
          "Competencies"
        ]
      }
    },
    "/v1/methodologies": {
      "get": {
        "description": "Lists the published methodologies available to your organisation, one entry per methodology (its newest version) unless you set `latest=false`. Names and descriptions are in the language you ask for with `locale`, or in each methodology's default language when it has no translation for it.",
        "operationId": "list_methodologies_v1_methodologies_get",
        "parameters": [
          {
            "description": "BCP-47 tag",
            "in": "query",
            "name": "locale",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "BCP-47 tag",
              "title": "Locale"
            }
          },
          {
            "description": "Lifecycle filter. Ignored on the public API, which only ever serves published methodologies.",
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "draft",
                    "published",
                    "all"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Lifecycle filter. Ignored on the public API, which only ever serves published methodologies.",
              "title": "State"
            }
          },
          {
            "description": "Return only the newest version of each methodology. Defaults to true on the public API; set false to list every version.",
            "in": "query",
            "name": "latest",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Return only the newest version of each methodology. Defaults to true on the public API; set false to list every version.",
              "title": "Latest"
            }
          },
          {
            "description": "Only this methodology code (all its versions).",
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this methodology code (all its versions).",
              "title": "Code"
            }
          },
          {
            "description": "1-indexed page number. When supplied, the response is a page: {items, total, page, page_size, pages}. When omitted, the response is a plain array.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "1-indexed page number. When supplied, the response is a page: {items, total, page, page_size, pages}. When omitted, the response is a plain array.",
              "title": "Page"
            }
          },
          {
            "description": "Rows per page (offset mode only). Clamped to 200; the applied value is echoed in the response's page_size field.",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Rows per page (offset mode only). Clamped to 200; the applied value is echoed in the response's page_size field.",
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "items": {
                        "$ref": "#/components/schemas/MethodologyListItem"
                      },
                      "type": "array"
                    },
                    {
                      "$ref": "#/components/schemas/Page_MethodologyListItem_"
                    }
                  ],
                  "title": "Response List Methodologies V1 Methodologies Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List methodologies",
        "tags": [
          "Methodologies"
        ]
      }
    },
    "/v1/methodologies/{methodology_id}": {
      "get": {
        "description": "Returns one methodology. Its name and description are in the language you ask for with `locale`, or in its default language when it has no translation for it; the response then carries `X-Wiselook-Locale-Fallback: true`.",
        "operationId": "get_methodology_v1_methodologies__methodology_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "methodology_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Methodology Id",
              "type": "string"
            }
          },
          {
            "description": "BCP-47 tag",
            "in": "query",
            "name": "locale",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "BCP-47 tag",
              "title": "Locale"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MethodologyRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get methodology",
        "tags": [
          "Methodologies"
        ]
      }
    },
    "/v1/methodologies/{methodology_id}/available-locales": {
      "get": {
        "description": "Lists the languages a methodology can run in: those every part of it (competencies, questions and their content) is fully translated into.",
        "operationId": "get_available_locales_v1_methodologies__methodology_id__available_locales_get",
        "parameters": [
          {
            "in": "path",
            "name": "methodology_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Methodology Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableLocales"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List available languages",
        "tags": [
          "Methodologies"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.wiselook.com",
      "description": "Wiselook public API"
    }
  ]
}
