---
title: Adding entity to OIP API
slug: oip-webservice
createdAt: 2025-06-27T15:20:49.046Z
---

{
  "id": "67afeAC5js9-eo-O2u1aw",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://oip-api-dev.fasst.tech/api/core/entities",
    "name": "Adding entity to OIP API",
    "description": "Adding entity from OIP CORE to OIP API",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "kind": "required",
          "name": "Authorization",
          "type": "string",
          "description": "<p>Bearer 9109331d-6c43-4d4d-aae7-888bdd446800</p>"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "request",
          "type": "object",
          "description": "entity body",
          "customType": "requests.EntityRequest",
          "schema": [
            {
              "name": "coreVersion",
              "kind": "required",
              "type": "string",
              "example": "1.0.0"
            },
            {
              "name": "description",
              "kind": "required",
              "type": "string",
              "example": "Structure du projet"
            },
            {
              "name": "isArray",
              "kind": "required",
              "type": "boolean",
              "example": true
            },
            {
              "name": "isDeprecated",
              "kind": "required",
              "type": "boolean",
              "example": true
            },
            {
              "name": "methods",
              "kind": "required",
              "type": "array",
              "example": "[\"get\",\"findAll\"]",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "example": "Project"
            },
            {
              "name": "properties",
              "kind": "optional",
              "type": "array",
              "description": "",
              "modelRef": "#/definitions/requests.PropertyRequest",
              "customType": "requests.PropertyRequest[]",
              "schema": [
                {
                  "name": "deprecatedMessage",
                  "kind": "optional",
                  "type": "string",
                  "example": "message"
                },
                {
                  "name": "description",
                  "kind": "required",
                  "type": "string",
                  "example": "description"
                },
                {
                  "name": "isDeprecated",
                  "kind": "required",
                  "type": "boolean",
                  "example": false
                },
                {
                  "name": "isReadonly",
                  "kind": "required",
                  "type": "boolean",
                  "example": false
                },
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "example": "name"
                },
                {
                  "name": "type",
                  "kind": "required",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/definitions/requests.TypeRequest",
                  "customType": "requests.TypeRequest",
                  "schema": [
                    {
                      "name": "enumValues",
                      "kind": "optional",
                      "type": "array",
                      "example": "[\"enum1\",\" enum2\"]",
                      "itemType": "string",
                      "customType": "string[]",
                      "itemExample": "",
                      "itemDefault": ""
                    },
                    {
                      "name": "isArray",
                      "kind": "required",
                      "type": "boolean",
                      "example": false
                    },
                    {
                      "name": "name",
                      "kind": "required",
                      "type": "string",
                      "example": "name"
                    }
                  ]
                },
                {
                  "name": "validator",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/definitions/requests.ValidatorRequest",
                  "customType": "requests.ValidatorRequest",
                  "schema": [
                    {
                      "name": "exactLength",
                      "kind": "required",
                      "type": "integer",
                      "example": 4
                    },
                    {
                      "name": "maxLength",
                      "kind": "required",
                      "type": "integer",
                      "example": 4
                    },
                    {
                      "name": "minLength",
                      "kind": "required",
                      "type": "integer",
                      "example": 4
                    },
                    {
                      "name": "type",
                      "kind": "required",
                      "type": "array",
                      "example": "[\"mail\",\" postal\"]",
                      "itemType": "string",
                      "customType": "string[]",
                      "itemExample": "",
                      "itemDefault": ""
                    }
                  ]
                }
              ]
            },
            {
              "name": "relations",
              "kind": "optional",
              "type": "array",
              "description": "",
              "modelRef": "#/definitions/requests.RelationRequest",
              "customType": "requests.RelationRequest[]",
              "schema": [
                {
                  "name": "propertyName",
                  "kind": "required",
                  "type": "string",
                  "example": "name"
                },
                {
                  "name": "propertyType",
                  "kind": "required",
                  "type": "string",
                  "example": "string"
                }
              ]
            }
          ],
          "modelRef": "#/definitions/requests.EntityRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "OK",
            "customType": "responses.EntityResponse",
            "schema": [
              {
                "name": "coreVersion",
                "kind": "optional",
                "type": "string",
                "example": "1.0.0"
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "example": "Structure du projet"
              },
              {
                "name": "isArray",
                "kind": "optional",
                "type": "boolean",
                "example": true
              },
              {
                "name": "isDeprecated",
                "kind": "optional",
                "type": "boolean",
                "example": true
              },
              {
                "name": "methods",
                "kind": "optional",
                "type": "array",
                "example": "[\"get\",\"findAll\"]",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "example": "Project"
              },
              {
                "name": "properties",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/definitions/responses.PropertyResponse",
                "customType": "responses.PropertyResponse[]",
                "schema": [
                  {
                    "name": "deprecatedMessage",
                    "kind": "optional",
                    "type": "string",
                    "example": "message"
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "example": "description"
                  },
                  {
                    "name": "isDeprecated",
                    "kind": "optional",
                    "type": "boolean",
                    "example": false
                  },
                  {
                    "name": "isReadonly",
                    "kind": "optional",
                    "type": "boolean",
                    "example": false
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "example": "name"
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/definitions/responses.TypeResponse",
                    "customType": "responses.TypeResponse",
                    "schema": [
                      {
                        "name": "enumValues",
                        "kind": "optional",
                        "type": "array",
                        "example": "[\"enum1\",\" enum2\"]",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      },
                      {
                        "name": "isArray",
                        "kind": "required",
                        "type": "boolean",
                        "example": false
                      },
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "example": "name"
                      }
                    ]
                  },
                  {
                    "name": "validator",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/definitions/responses.ValidatorResponse",
                    "customType": "responses.ValidatorResponse",
                    "schema": [
                      {
                        "name": "exactLength",
                        "kind": "required",
                        "type": "integer",
                        "example": 4
                      },
                      {
                        "name": "maxLength",
                        "kind": "required",
                        "type": "integer",
                        "example": 4
                      },
                      {
                        "name": "minLength",
                        "kind": "required",
                        "type": "integer",
                        "example": 4
                      },
                      {
                        "name": "type",
                        "kind": "required",
                        "type": "array",
                        "example": "[\"mail\",\" postal\"]",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "relations",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/definitions/responses.RelationResponse",
                "customType": "responses.RelationResponse[]",
                "schema": [
                  {
                    "name": "isArray",
                    "kind": "required",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "name": "propertyName",
                    "kind": "required",
                    "type": "string",
                    "example": "name"
                  },
                  {
                    "name": "propertyType",
                    "kind": "required",
                    "type": "string",
                    "example": "string"
                  }
                ]
              }
            ],
            "modelRef": "#/definitions/responses.EntityResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "ckXTWXU-BwJhMmLlK7sOs",
          "language": "curl",
          "label": "cURL",
          "code": "curl --location 'https://oip-api-dev.fasst.tech/api/core/entities' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data '{\"request\":{\"coreVersion\":\"string\",\"description\":\"string\",\"isArray\":false,\"isDeprecated\":false,\"methods\":[],\"name\":\"string\"}}'"
        },
        {
          "id": "L8D8_CdXHhNTPqdRrsmH9",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"request\": {\n      \"coreVersion\": \"string\",\n      \"description\": \"string\",\n      \"isArray\": false,\n      \"isDeprecated\": false,\n      \"methods\": [],\n      \"name\": \"string\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://oip-api-dev.fasst.tech/api/core/entities\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "AnR_XcRaweePImYDRQ6jI",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://oip-api-dev.fasst.tech/api/core/entities\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"request\": {\n      \"coreVersion\": \"string\",\n      \"description\": \"string\",\n      \"isArray\": false,\n      \"isDeprecated\": false,\n      \"methods\": [],\n      \"name\": \"string\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "TvIDKsyTuTY5DB8bldHTQ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://oip-api-dev.fasst.tech/api/core/entities\"\n\npayload = json.dumps({\n   \"request\": {\n      \"coreVersion\": \"string\",\n      \"description\": \"string\",\n      \"isArray\": False,\n      \"isDeprecated\": False,\n      \"methods\": [],\n      \"name\": \"string\"\n   }\n})\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "ckXTWXU-BwJhMmLlK7sOs"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"coreVersion\": \"1.0.0\",\n  \"description\": \"Structure du projet\",\n  \"isArray\": true,\n  \"isDeprecated\": true,\n  \"methods\": [\n    \"\"\n  ],\n  \"name\": \"Project\",\n  \"properties\": [\n    {\n      \"deprecatedMessage\": \"message\",\n      \"description\": \"description\",\n      \"isDeprecated\": false,\n      \"isReadonly\": false,\n      \"name\": \"name\",\n      \"type\": {\n        \"enumValues\": [\n          \"\"\n        ],\n        \"isArray\": false,\n        \"name\": \"name\"\n      },\n      \"validator\": {\n        \"exactLength\": 4,\n        \"maxLength\": 4,\n        \"minLength\": 4,\n        \"type\": [\n          \"\"\n        ]\n      }\n    }\n  ],\n  \"relations\": [\n    {\n      \"isArray\": false,\n      \"propertyName\": \"name\",\n      \"propertyType\": \"string\"\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}