Assistant Légal

Assistant Légal · Actions GPT

NinjaAPI

  • GET /v2/ping/Ping
  • GET /v2/search/text_search/Text Search
  • GET /v2/search/document_search/Document Search
Schéma original API
{
  "openapi": "3.1.0",
  "info": {
    "title": "NinjaAPI",
    "version": "1.0.0",
    "description": ""
  },
  "paths": {
    "/v2/ping/": {
      "get": {
        "operationId": "core_api_ping",
        "summary": "Ping",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PongResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomAPIKeyAuth": []
          }
        ]
      }
    },
    "/v2/search/text_search/": {
      "get": {
        "operationId": "search_api_text_search",
        "summary": "Text Search",
        "parameters": [
          {
            "in": "query",
            "name": "search",
            "schema": {
              "title": "Search",
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "order_id",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Order Id"
            },
            "required": false
          },
          {
            "in": "query",
            "name": "law_article__law_code",
            "schema": {
              "default": [],
              "items": {
                "type": "string"
              },
              "title": "Law Article  Law Code",
              "type": "array"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TextSearchResultResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomAPIKeyAuth": []
          }
        ]
      }
    },
    "/v2/search/document_search/": {
      "get": {
        "operationId": "search_api_document_search",
        "summary": "Document Search",
        "parameters": [
          {
            "in": "query",
            "name": "search",
            "schema": {
              "title": "Search",
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "order_id",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Order Id"
            },
            "required": false
          },
          {
            "in": "query",
            "name": "law_article__law_code",
            "schema": {
              "default": [],
              "items": {
                "type": "string"
              },
              "title": "Law Article  Law Code",
              "type": "array"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSearchResultResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomAPIKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "PongResponse": {
        "properties": {
          "pong": {
            "title": "Pong",
            "type": "string"
          }
        },
        "required": [
          "pong"
        ],
        "title": "PongResponse",
        "type": "object"
      },
      "TextSearchParameters": {
        "properties": {
          "search": {
            "title": "Search",
            "type": "string"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "law_article__law_code": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Law Article  Law Code",
            "type": "array"
          }
        },
        "required": [
          "search"
        ],
        "title": "TextSearchParameters",
        "type": "object"
      },
      "TextSearchResponse": {
        "properties": {
          "decisions": {
            "items": {
              "$ref": "#/components/schemas/WeaviateDecisionFull"
            },
            "title": "Decisions",
            "type": "array"
          },
          "articles": {
            "items": {
              "$ref": "#/components/schemas/WeaviateArticleFull"
            },
            "title": "Articles",
            "type": "array"
          }
        },
        "required": [
          "decisions",
          "articles"
        ],
        "title": "TextSearchResponse",
        "type": "object"
      },
      "TextSearchResultResponse": {
        "properties": {
          "results": {
            "$ref": "#/components/schemas/TextSearchResponse"
          }
        },
        "required": [
          "results"
        ],
        "title": "TextSearchResultResponse",
        "type": "object"
      },
      "WeaviateArticleFull": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "section": {
            "title": "Section",
            "type": "string"
          },
          "unique_id": {
            "title": "Unique Id",
            "type": "string"
          },
          "is_into_force": {
            "title": "Is Into Force",
            "type": "boolean"
          },
          "article_number": {
            "title": "Article Number",
            "type": "string"
          },
          "article_version": {
            "title": "Article Version",
            "type": "string"
          },
          "sentences": {
            "items": {
              "$ref": "#/components/schemas/WeaviateSentenceSimple"
            },
            "title": "Sentences",
            "type": "array"
          }
        },
        "required": [
          "id",
          "code",
          "section",
          "unique_id",
          "is_into_force",
          "article_number",
          "article_version",
          "sentences"
        ],
        "title": "WeaviateArticleFull",
        "type": "object"
      },
      "WeaviateDecisionFull": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "retrieved": {
            "format": "date-time",
            "title": "Retrieved",
            "type": "string"
          },
          "external_date": {
            "format": "date",
            "title": "External Date",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          },
          "published": {
            "title": "Published",
            "type": "boolean"
          },
          "chambre": {
            "title": "Chambre",
            "type": "string"
          },
          "juridiction": {
            "title": "Juridiction",
            "type": "string"
          },
          "order": {
            "title": "Order",
            "type": "string"
          },
          "sentences": {
            "items": {
              "$ref": "#/components/schemas/WeaviateSentenceSimple"
            },
            "title": "Sentences",
            "type": "array"
          }
        },
        "required": [
          "id",
          "retrieved",
          "external_date",
          "url",
          "published",
          "chambre",
          "juridiction",
          "order",
          "sentences"
        ],
        "title": "WeaviateDecisionFull",
        "type": "object"
      },
      "WeaviateSentenceSimple": {
        "properties": {
          "created": {
            "format": "date-time",
            "title": "Created",
            "type": "string"
          },
          "text": {
            "title": "Text",
            "type": "string"
          },
          "order": {
            "title": "Order",
            "type": "integer"
          },
          "distance": {
            "title": "Distance",
            "type": "number"
          }
        },
        "required": [
          "created",
          "text",
          "order",
          "distance"
        ],
        "title": "WeaviateSentenceSimple",
        "type": "object"
      },
      "DocumentSearchResultResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/WeaviateSentence"
            },
            "title": "Results",
            "type": "array"
          }
        },
        "required": [
          "results"
        ],
        "title": "DocumentSearchResultResponse",
        "type": "object"
      },
      "WeaviateArticle": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "section": {
            "title": "Section",
            "type": "string"
          },
          "unique_id": {
            "title": "Unique Id",
            "type": "string"
          },
          "is_into_force": {
            "title": "Is Into Force",
            "type": "boolean"
          },
          "article_number": {
            "title": "Article Number",
            "type": "string"
          },
          "article_version": {
            "title": "Article Version",
            "type": "string"
          }
        },
        "required": [
          "code",
          "section",
          "unique_id",
          "is_into_force",
          "article_number",
          "article_version"
        ],
        "title": "WeaviateArticle",
        "type": "object"
      },
      "WeaviateDecision": {
        "properties": {
          "retrieved": {
            "format": "date-time",
            "title": "Retrieved",
            "type": "string"
          },
          "external_date": {
            "format": "date",
            "title": "External Date",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          },
          "published": {
            "title": "Published",
            "type": "boolean"
          },
          "chambre": {
            "title": "Chambre",
            "type": "string"
          },
          "juridiction": {
            "title": "Juridiction",
            "type": "string"
          },
          "order": {
            "title": "Order",
            "type": "string"
          }
        },
        "required": [
          "retrieved",
          "external_date",
          "url",
          "published",
          "chambre",
          "juridiction",
          "order"
        ],
        "title": "WeaviateDecision",
        "type": "object"
      },
      "WeaviateSentence": {
        "properties": {
          "text": {
            "title": "Text",
            "type": "string"
          },
          "decision": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WeaviateDecision"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decision"
          },
          "law_article": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WeaviateArticle"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Law Article"
          },
          "created": {
            "format": "date-time",
            "title": "Created",
            "type": "string"
          }
        },
        "required": [
          "text",
          "decision",
          "law_article",
          "created"
        ],
        "title": "WeaviateSentence",
        "type": "object"
      }
    },
    "securitySchemes": {
      "CustomAPIKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "servers": [
    {
      "url": "https://recherche.hammurabi-droit.fr"
    }
  ]
}