full_api.json 101 KB
Newer Older
canterafonsj's avatar
canterafonsj committed
{
  "openapi": "3.0.1",
  "info": {
    "description": "This OAS file describes the NGSI-LD API defined by the ETSI ISG CIM group. This Cross-domain Context Information Management API allows to provide, consume and subscribe to context information in multiple scenarios and involving multiple stakeholders",
    "version": "latest",
    "title": "ETSI ISG CIM / NGSI-LD API",
    "contact": {
      "email": "NGSI-LD@etsi.org"
    }
  },
  "externalDocs": {
    "description": "Find out more about the ETSI ISG Context Information Management",
    "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854"
  },
  "tags": [
    {
      "name": "ETSI",
      "description": "European Telecommunications Standards Institute",
      "externalDocs": {
        "description": "Find out more",
        "url": "http://www.etsi.org"
      }
    },
    {
      "name": "CIM",
      "description": "Context Information Management",
      "externalDocs": {
        "description": "Find out more",
        "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854"
      }
    },
    {
      "name": "JSON-LD",
      "description": "JSON for Linked Data",
      "externalDocs": {
        "description": "Find out more",
        "url": "https://json-ld.org/"
      }
    },
    {
      "name": "NGSI-LD API",
      "description": "API defined by the ETSI ISG CIM",
      "externalDocs": {
        "description": "Preliminary Specification",
        "url": "http://www.etsi.org/deliver/etsi_gs/CIM/001_099/004/01.01.01_60/gs_CIM004v010101p.pdf"
      }
    }
  ],
  "paths": {
    "/entities/": {
      "get": {
        "description": "Retrieve a set of entities which matches a specific query from an NGSI-LD system",
        "operationId": "queryEntities",
        "tags": [
          "Context Information"
        ],
        "parameters": [
          {
            "name": "id",
            "description": "Comma separated list of URIs to be retrieved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          },
          {
            "name": "idPattern",
            "description": "Regular expression that must be matched by Entity ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "regexp"
            }
          },
          {
            "name": "type",
            "description": "Comma separated list of Entity type names to be retrieved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "attrs",
            "description": "Comma separated list of attribute names (properties or relationships) to be retrieved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "q",
            "description": "Query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "georel",
            "description": "Geo-relationship",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "equals",
                    "disjoint",
                    "intersects",
                    "within",
                    "contains",
                    "overlaps"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^near;((maxDistance==\\d+)|(minDistance==\\d+))$"
                }
              ]
            }
          },
          {
            "name": "geometry",
            "description": "Geometry",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "Point",
                "MultiPoint",
                "LineString",
                "MultiLineString",
                "Polygon",
                "MultiPolygon"
              ]
            }
          },
          {
            "name": "coordinates",
            "description": "Coordinates serialized as a string",
            "in": "query",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/position"
                },
                {
                  "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/positionArray"
                },
                {
                  "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/lineString"
                },
                {
                  "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/polygon"
                }
              ]
            }
          },
          {
            "name": "geoproperty",
            "description": "The name of the property that contains the geo-spatial data that will be used to resolve the geoquery",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "csf",
            "description": "Context Source Filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "description": "Pagination limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "options",
            "description": "Options dictionary",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "keyValues",
                "sysAttrs"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entityOperations~1update/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityList-example.json"
canterafonsj's avatar
canterafonsj committed
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Create a new Entity within an NGSI-LD system",
        "operationId": "createEntity",
        "tags": [
          "Context Information"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uri"
                      },
                      "type": {
                        "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "modifiedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  },
                  {
                    "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Contains the resource URI of the created Entity"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "409": {
            "description": "Already exists",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/entities/{entityId}": {
      "get": {
        "description": "Retrieve an specific Entity from an NGSI-LD system. It's possible to specify the Entity attributes to be retrieved by using query parameters",
        "operationId": "retrieveEntityById",
        "tags": [
          "Context Information"
        ],
        "parameters": [
          {
            "name": "entityId",
            "description": "Entity Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          },
          {
            "name": "attrs",
            "description": "Comma separated list of attribute names (properties or relationships) to be retrieved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "type",
            "description": "Entity Type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
            }
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/11"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/Entity-example.json"
canterafonsj's avatar
canterafonsj committed
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Removes an specific Entity from an NGSI-LD system",
        "operationId": "removeEntityById",
        "tags": [
          "Context Information"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/2"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content. The entity was removed successfully"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/entities/{entityId}/attrs/": {
      "post": {
        "description": "Append new Entity attributes to an existing Entity within an NGSI-LD system",
        "operationId": "appendEntityAttrs",
        "tags": [
          "Context Information"
        ],
        "parameters": [
          {
            "name": "entityId",
            "description": "Entity Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          },
          {
            "name": "options",
            "description": "Indicates that no attribute overwrite shall be performed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "noOverwrite"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "@context": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uri"
                            },
                            {
                              "type": "object"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "location": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "GeoProperty"
                      },
                      "value": {
                        "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location"
                      },
                      "observedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdAt": {
                        "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt"
                      },
                      "modifiedAt": {
                        "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt"
                      },
                      "datasetId": {
                        "type": "string",
                        "format": "uri"
                      },
                      "instanceId": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "required": [
                      "type",
                      "value"
                    ],
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0"
                        },
                        {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1"
                        }
                      ]
                    }
                  },
                  "observationSpace": {
                    "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location"
                  },
                  "operationSpace": {
                    "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location"
                  }
                },
                "required": [
                  "id",
                  "type"
                ],
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "Property"
                        },
                        "value": {
                          "type": [
                            "string",
                            "number",
                            "boolean",
                            "array",
                            "object"
                          ]
                        },
                        "observedAt": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/observedAt"
                        },
                        "createdAt": {
                          "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt"
                        },
                        "modifiedAt": {
                          "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt"
                        },
                        "datasetId": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/datasetId"
                        },
                        "instanceId": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/instanceId"
                        }
                      },
                      "required": [
                        "type",
                        "value"
                      ],
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0"
                          },
                          {
                            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1"
                          }
                        ]
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "Relationship"
                        },
                        "object": {
                          "type": "string",
                          "format": "uri"
                        },
                        "observedAt": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/observedAt"
                        },
                        "createdAt": {
                          "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt"
                        },
                        "modifiedAt": {
                          "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt"
                        },
                        "datasetId": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/datasetId"
                        },
                        "instanceId": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/instanceId"
                        }
                      },
                      "required": [
                        "type",
                        "object"
                      ],
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0"
                          },
                          {
                            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1"
                          }
                        ]
                      }
                    },
                    {
                      "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location"
                    }
                  ]
                },
                "propertyNames": {
                  "type": "string",
                  "pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "207": {
            "description": "Partial Success. Only the attributes included in the response payload were successfully appended",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$schema": "http://json-schema.org/schema#",
                  "id": "https://uri.etsi.org/ngsi-ld/schema/UpdateResult.json",
                  "title": "NGSI-LD Update Result",
                  "description": "NGSI-LD Update Result",
                  "definitions": {
                    "UnchangedDetails": {
                      "attributeName": {
                        "type": "string",
                        "pattern": ""
                      },
                      "reason": {
                        "type": "string",
                        "minLenght": 1
                      }
                    },
                    "UpdateResult": {
                      "type": "object",
                      "properties": {
                        "updated": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": ""
                          }
                        },
                        "unchanged": {
                          "type": "array",
                          "items": {
                            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema/definitions/UnchangedDetails"
                          }
                        }
                      }
                    }
                  },
                  "allOf": [
                    {
                      "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema/definitions/UpdateResult"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update existing Entity attributes within an NGSI-LD system",
        "operationId": "updateEntityAttrs",
        "tags": [
          "Context Information"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content."
          },
          "207": {
            "description": "Partial Success. Only the attributes included in the response payload were successfully updated",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/entities/{entityId}/attrs/{attrId}": {
      "patch": {
        "description": "Update existing Entity attributes within an NGSI-LD system",
        "operationId": "partialAttrUpdate",
        "tags": [
          "Context Information"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0"
          },
          {
            "name": "attrId",
            "description": "Attribute Id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Removes an existing Entity attribute within an NGSI-LD system",
        "operationId": "removeEntityAttr",
        "tags": [
          "Context Information"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0"
          },
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/patch/parameters/1"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/": {
      "get": {
        "description": "Retrieves the subscriptions available in an NGSI-LD system",
        "operationId": "retrieveSubscriptions",
        "tags": [
canterafonsj's avatar
canterafonsj committed
          "Context Subscription"
canterafonsj's avatar
canterafonsj committed
        ],
        "parameters": [
          {
            "name": "limit",
            "description": "Pagination limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                  }
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json"
canterafonsj's avatar
canterafonsj committed
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Creates a new Subscription within an NGSI-LD system",
        "operationId": "createSubscription",
        "tags": [
canterafonsj's avatar
canterafonsj committed
          "Context Subscription"
canterafonsj's avatar
canterafonsj committed
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uri"
                      },
                      "type": {
                        "type": "string",
                        "const": "Subscription"
                      },
                      "notification": {
                        "type": "object",
                        "properties": {
                          "attributes": {
                            "type": "array",
                            "minItems": 1,
                            "items": {
                              "type": "string",
                              "minLength": 1
                            },
                            "uniqueItems": true
                          },
                          "format": {
                            "type": "string"
                          },
                          "endpoint": {
                            "type": "object",
                            "required": [
                              "uri"
                            ],
                            "properties": {
                              "uri": {
                                "type": "string",
                                "format": "uri"
                              },
                              "accept": {
                                "type": "string",
                                "enum": [
                                  "application/json",
                                  "application/ld+json"
                                ]
                              }
                            }
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "ok",
                              "failed"
                            ]
                          },
                          "timesSent": {
                            "type": "number",
                            "minimum": 1
                          },
                          "lastNotification": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastFailure": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastSuccess": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "endpoint"
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "active",
                          "paused",
                          "expired"
                        ]
                      },
                      "createdAt": {
                        "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt"
                      },
                      "modifiedAt": {
                        "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt"
                      }
                    },
                    "allOf": [
                      {
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "anyOf": [
                          {
                            "required": [
                              "entities"
                            ]
                          },
                          {
                            "required": [
                              "watchedAttributes"
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Contains the resource URI of the created Subscription"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "409": {
            "description": "Already exists",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}": {
      "get": {
        "description": "Retrieves a specific Subscription from an NGSI-LD system",
        "operationId": "retrieveSubscription",
        "tags": [
canterafonsj's avatar
canterafonsj committed
          "Context Subscription"
canterafonsj's avatar
canterafonsj committed
        ],
        "parameters": [
          {
            "name": "subscriptionId",
            "description": "Subscription Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json"
canterafonsj's avatar
canterafonsj committed
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Updates a specific Subscription within an NGSI-LD system",
        "operationId": "updateSubscription",
        "tags": [
canterafonsj's avatar
canterafonsj committed
          "Context Subscription"
canterafonsj's avatar
canterafonsj committed
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/parameters/0"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "@context": {
                    "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context"
                  },
                  "entities": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uri"
                        },
                        "type": {
                          "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
                        },
                        "idPattern": {
                          "type": "string",
                          "format": "regex"
                        }
                      },
                      "required": [
                        "type"
                      ]
                    },
                    "minItems": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1
                  },
                  "watchedAttributes": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
                    },
                    "uniqueItems": true
                  },
                  "timeInterval": {
                    "type": "number",
                    "minimum": 0
                  },
                  "expires": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "throttling": {
                    "type": "number",
                    "minimum": 1
                  },
                  "q": {
                    "type": "string"
                  },
                  "geoQ": {
                    "type": "object",
                    "required": [
                      "geometry",
                      "coordinates",
                      "georel"
                    ],
                    "properties": {
                      "georel": {
                        "$ref": "#/paths/~1entities~1/get/parameters/5/schema"
                      },
                      "coordinates": {
                        "$ref": "#/paths/~1entities~1/get/parameters/7/schema"
                      },
                      "geometry": {
                        "$ref": "#/paths/~1entities~1/get/parameters/6/schema"
                      }
                    }
                  },
                  "csf": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content. The Subscription was updated successfully"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Removes a specific Subscription from an NGSI-LD system",
        "operationId": "removeSubscription",
        "tags": [
canterafonsj's avatar
canterafonsj committed
          "Context Subscription"
canterafonsj's avatar
canterafonsj committed
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/parameters/0"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content. The Subscription was removed successfully"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/csourceRegistrations/": {
      "get": {
        "description": "Retrieve a set of context sources which matches a specific query from an NGSI-LD system",
        "operationId": "queryCsources",
        "tags": [
          "Context Sources"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/1"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/2"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/3"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/4"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/5"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/6"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/7"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/8"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/10"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                  }
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/ContextSourceRegistrationList-example.json"
canterafonsj's avatar
canterafonsj committed
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Registers a new context source within an NGSI-LD system",
        "operationId": "registerCsource",
        "tags": [
          "Context Sources"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "@context": {
                        "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context"
                      },
                      "information": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "object",
                          "required": [
                            "entities"
                          ],
                          "properties": {
                            "entities": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/entities/items"
                              }
                            },
                            "properties": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
                              },
                              "uniqueItems": true
                            },
                            "relationships": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
                              },
                              "uniqueItems": true
                            }
                          }
                        }
                      },
                      "timestamp": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "object",
                          "required": [
                            "start"
                          ],
                          "properties": {
                            "start": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "end": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        }
                      },
                      "location": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json",
canterafonsj's avatar
canterafonsj committed
                        "title": "geometry",
                        "description": "One geometry as defined by GeoJSON. Licensed as per original source is https://github.com/fge/sample-json-schemas/blob/master/geojson/geometry.json",
                        "type": "object",
                        "required": [
                          "type",
                          "coordinates"
                        ],
                        "oneOf": [
                          {
                            "title": "Point",
                            "properties": {
                              "type": {
                                "enum": [
                                  "Point"
                                ]
                              },
                              "coordinates": {
                                "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/position"
                              }
                            }
                          },
                          {
                            "title": "MultiPoint",
                            "properties": {
                              "type": {
                                "enum": [
                                  "MultiPoint"
                                ]
                              },
                              "coordinates": {
                                "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/positionArray"
                              }
                            }
                          },
                          {
                            "title": "LineString",
                            "properties": {
                              "type": {
                                "enum": [
                                  "LineString"
                                ]
                              },
                              "coordinates": {
                                "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/lineString"
                              }
                            }
                          },
                          {
                            "title": "MultiLineString",
                            "properties": {
                              "type": {
                                "enum": [
                                  "MultiLineString"
                                ]
                              },
                              "coordinates": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/lineString"
                                }
                              }
                            }
                          },
                          {
                            "title": "Polygon",
                            "properties": {
                              "type": {
                                "enum": [
                                  "Polygon"
                                ]
                              },
                              "coordinates": {
                                "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/polygon"
                              }
                            }
                          },
                          {
                            "title": "MultiPolygon",
                            "properties": {
                              "type": {
                                "enum": [
                                  "MultiPolygon"
                                ]
                              },
                              "coordinates": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/polygon"
                                }
                              }
                            }
                          }
                        ],
                        "definitions": {
                          "position": {
                            "description": "A single position",
                            "type": "array",
                            "minItems": 2,
                            "items": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "number"
                              }
                            ],
                            "additionalItems": false
                          },
                          "positionArray": {
                            "description": "An array of positions",
                            "type": "array",
                            "items": {
                              "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/position"
                            }
                          },
                          "lineString": {
                            "description": "An array of two or more positions",
                            "allOf": [
                              {
                                "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/positionArray"
                              },
                              {
                                "minItems": 2
                              }
                            ]
                          },
                          "linearRing": {
                            "description": "An array of four positions where the first equals the last",
                            "allOf": [
                              {
                                "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/positionArray"
                              },
                              {
                                "minItems": 4
                              }
                            ]
                          },
                          "polygon": {
                            "description": "An array of linear rings",
                            "type": "array",
                            "items": {
                              "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/linearRing"
                            }
                          }
                        }
                      },
                      "expires": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1
                      },
                      "endpoint": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "array",
                        "object"
                      ]
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uri"
                      },
                      "type": {
                        "type": "string",
                        "const": "ContextSourceRegistration"
                      },
                      "createdAt": {
                        "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt"
                      },
                      "modifiedAt": {
                        "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt"
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "endpoint",
                      "information"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Contains the resource URI of the created Registration"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "409": {
            "description": "Already exists",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/csourceRegistrations/{registrationId}": {
      "get": {
        "description": "Retrieves a specific context source registration from an NGSI-LD system",
        "operationId": "retrieveCsource",
        "tags": [
          "Context Sources"
        ],
        "parameters": [
          {
            "name": "registrationId",
            "description": "Registration Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/"
canterafonsj's avatar
canterafonsj committed
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Removes an specific context source registration within an NGSI-LD system",
        "operationId": "removeCsource",
        "tags": [
          "Context Sources"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1csourceRegistrations~1%7BregistrationId%7D/get/parameters/0"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content. The Registration was removed successfully"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/csourceSubscriptions/": {
      "get": {
        "description": "Retrieves the context source discovery subscriptions available in an NGSI-LD system",
        "operationId": "retrieveCSourceSubscriptions",
        "tags": [
          "Context Sources"
        ],
        "parameters": [
          {
            "name": "limit",
            "description": "Pagination limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1subscriptions~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json"
canterafonsj's avatar
canterafonsj committed
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Creates a context source discovery Subscription within an NGSI-LD system",
        "operationId": "createCSourceSubscription",
        "tags": [
          "Context Sources"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Contains the resource URI of the created Subscription"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "409": {
            "description": "Already exists",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/csourceSubscriptions/{subscriptionId}": {
      "get": {
        "description": "Retrieves a specific Subscription from an NGSI-LD system",
        "operationId": "retrieveSubscription",
        "tags": [
          "Context Sources"
        ],
        "parameters": [
          {
            "name": "subscriptionId",
            "description": "Subscription Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json"
canterafonsj's avatar
canterafonsj committed
1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Updates a specific context source discovery Subscription within an NGSI-LD system",
        "operationId": "updateCSourceSubscription",
        "tags": [
          "Context Sources"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1csourceSubscriptions~1%7BsubscriptionId%7D/get/parameters/0"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content. The Subscription was updated successfully"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Removes a specific Context Source Subscription from an NGSI-LD system",
        "operationId": "removeCSourceSubscription",
        "tags": [
          "Context Sources"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1csourceSubscriptions~1%7BsubscriptionId%7D/get/parameters/0"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content. The Subscription was removed successfully"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/entityOperations/create": {
      "post": {
        "description": "Batch Entity creation",
        "operationId": "batchEntityCreation",
        "tags": [
          "Batch Operations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "#/paths/~1entityOperations~1update/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entityOperations~1upsert/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/entityOperations/update": {
      "post": {
        "description": "Batch Entity update",
        "operationId": "batchEntityUpdate",
        "tags": [
          "Batch Operations"
        ],
        "parameters": [
          {
            "name": "options",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "noOverwrite"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entityOperations~1upsert/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/entityOperations/upsert": {
      "post": {
        "description": "Batch Entity upsert",
        "operationId": "batchEntityUpsert",
        "tags": [
          "Batch Operations"
        ],
        "parameters": [
          {
            "name": "options",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "replace",
                "update"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "#/paths/~1entityOperations~1update/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "error": {
                      "type": "array",
                      "items": {
                        "entityId": {
                          "type": "string",
                          "format": "uri"
                        },
                        "error": {
                          "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/entityOperations/delete": {
      "post": {
        "description": "Batch Entity delete",
        "operationId": "batchEntityDelete",
        "tags": [
          "Batch Operations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                },
                "minItems": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entityOperations~1upsert/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/temporal/entities/": {
      "get": {
        "description": "Query temporal evolution of Entities from an NGSI-LD system",
        "operationId": "queryTemporalEntities",
        "tags": [
          "Temporal Evolution"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/1"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/2"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/3"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/4"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/5"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/6"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/7"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/8"
          },
          {
            "name": "timerel",
            "description": "Time relationship",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "before",
                "after",
                "between"
              ]
            }
          },
          {
            "name": "timeproperty",
            "description": "The name of the property that contains the temporal data that will be used to resolve the temporal query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(\\d|[a-zA-Z]|_)+$",
              "minLength": 1,
              "description": "NGSI-LD Name"
            }
          },
          {
            "name": "time",
            "description": "start time for temporal query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endTime",
            "description": "end time for temporal query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/9"
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/10"
          },
          {
            "name": "options",
            "description": "Options dictionary",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "temporalValues",
                "sysAttrs"
              ]
            }
          },
          {
            "name": "lastN",
            "description": "Only retrieve last N instances",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "http://json-schema.org/schema#",
                    "id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json",
canterafonsj's avatar
canterafonsj committed
                    "title": "NGSI-LD Entity",
                    "description": "NGSI-LD Temporal Representation of an Entity",
                    "definitions": {
                      "EntityTemporalFragment": {
                        "type": "object",
                        "properties": {
                          "@context": {
                            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context"
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location"
                            },
                            "minItems": 1
                          },
                          "observationSpace": {
                            "type": "array",
                            "items": {
                              "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location"
                            },
                            "minItems": 1
                          },
                          "operationSpace": {
                            "type": "array",
                            "items": {
                              "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location"
                            },
                            "minItems": 1
                          }
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0"
                              },
                              "minItems": 1
                            },
                            {
                              "type": "array",
                              "items": {
                                "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1"
                              },
                              "minItems": 1
                            },
                            {
                              "type": "array",
                              "items": {
                                "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location"
                              },
                              "minItems": 1
                            }
                          ]
                        },
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
                        }
                      },
                      "EntityTemporal": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uri"
                              },
                              "type": {
                                "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
                              },
                              "createdAt": {
                                "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt"
                              },
                              "modifiedAt": {
                                "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt"
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ]
                          },
                          {
                            "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment"
                          }
                        ]
                      }
                    },
                    "allOf": [
                      {
                        "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal"
                      }
                    ]
                  }
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporalList-example.json"
canterafonsj's avatar
canterafonsj committed
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Create or update temporal representation of an Entity within an NGSI-LD system",
        "operationId": "createUpdateEntityTemporal",
        "tags": [
          "Temporal Evolution"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal"
              },
              "examples": {
                "simple": {
                  "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporal-example_C5.5.3.json"
canterafonsj's avatar
canterafonsj committed
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Contains the resource URI of the created Entity"
          },
          "204": {
            "description": "Updated. No Content"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "409": {
            "description": "Already exists",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/temporal/entities/{entityId}": {
      "get": {
        "description": "Retrieve the temporal representation of an specific Entity from an NGSI-LD system. It's possible to specify the Entity attributes to be retrieved by using query parameters",
        "operationId": "retrieveEntityTemporalById",
canterafonsj's avatar
canterafonsj committed
        "tags": [
          "Temporal Evolution"
        ],
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/1"
          },
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/2"
          },
          {
            "$ref": "#/paths/~1temporal~1entities~1/get/parameters/15"
          },
          {
            "$ref": "#/paths/~1temporal~1entities~1/get/parameters/9"
          },
          {
            "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10"
          },
          {
            "$ref": "#/paths/~1temporal~1entities~1/get/parameters/11"
          },
          {
            "$ref": "#/paths/~1temporal~1entities~1/get/parameters/12"
          },
          {
            "$ref": "#/paths/~1temporal~1entities~1/get/parameters/16"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal"
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporal-example_C5.5.3.json"
canterafonsj's avatar
canterafonsj committed
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Removes the temporal representation of an Entity from an NGSI-LD system",
        "operationId": "removeEntityTemporalById",
canterafonsj's avatar
canterafonsj committed
        "tags": [
          "Temporal Evolution"
        ],
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/2"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content. The entity was removed successfully"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/temporal/entities/{entityId}/attrs/": {
      "post": {
        "description": "Add new attributes to an existing Temporal Entity within an NGSI-LD system",
        "operationId": "addTemporalEntityAttrs",
        "tags": [
          "Temporal Evolution"
        ],
        "parameters": [
          {
            "name": "entityId",
            "description": "Entity Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/temporal/entities/{entityId}/attrs/{attrId}": {
      "delete": {
        "description": "Attribute from Temporal Representation of Entity deletion",
        "operationId": "removeEntityTemporalAttr",
        "tags": [
          "Temporal Evolution"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0"
          },
          {
            "name": "attrId",
            "description": "Attribute Id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/temporal/entities/{entityId}/attrs/{attrId}/{instanceId}": {
      "patch": {
        "description": "Allows modifying a specific Attribute (Property or Relationship) instance, identified by its instanceId, of a Temporal Representation of an Entity.",
        "operationId": "modifyEntityTemporalAttrInstance",
        "tags": [
          "Temporal Evolution"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0"
          },
          {
            "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/delete/parameters/1"
          },
          {
            "name": "instanceId",
            "description": "Instance Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Attribute Instance deletion by instance id.",
        "operationId": "removeEntityTemporalAttrInstance",
        "tags": [
          "Temporal Evolution"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0"
          },
          {
            "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/delete/parameters/1"
          },
          {
            "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D~1%7BinstanceId%7D/patch/parameters/2"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    }
  }
}