From e07ae1698ae71c9cb81fc5037df0681fd2dab404 Mon Sep 17 00:00:00 2001 From: Ankit Singh <101859999+ankitmashu@users.noreply.github.com> Date: Tue, 18 Jun 2024 15:24:05 +0530 Subject: [PATCH] updated docs --- docs/openapi.yaml | 113 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 5a96539..e808d1f 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -392,6 +392,77 @@ paths: "$ref": "#/components/schemas/standardInvalidTokenErrorResponse" description: 'Unauthorized' + /entities: + get: + servers: + - url: 'https://example.com/ngsi-ld/v1' + description: 'Development Server URL' + tags: + - Discovery + summary: search for files + operationId: search-files + parameters: + - name: id + in: query + description: valid DX group or resource id + required: true + schema: + type: string + format: uuid + - name: georel + in: query + description: 'The relation type of geoquery to be performed.
This should be one from the available options in the Enum list.
The relation near should be always accomodated with a maxdistance property.
Apart from maxdistance , all other fields in the Enum list are case sensitive fields.
The relation near;maxdistance is applicable only for a point .
The relation within and intersects are applicable only for bbox, polygon and linestring.' + required: true + schema: + type: string + enum: [near;maxdistance=, within, intersects] + - name: geometry + in: query + description: 'The geometry type of geoquery to be performed.
This should be one from the available options in the Enum list.
The list is case sensitive ' + required: true + schema: + type: string + enum: [Point (or) point, Polygon (or) polygon, LineString (or) linestring, bbox] + - name: coordinates + in: query + description: 'The coordinates for a specific geometry query type.
This parameter accepts both one dimentional array and multi dimentional arrays based on the geometry type.
For e.g, [longitude-1,latitude-1] should be used for geometry point.
[[[longitude-1,latitude-1], [longitude-2,latitude-2],...., [longitude-n,latitude-n]]] should be used for geometry polygon.
[[longitude-1,latitude-1], [longitude-2,latitude-2],...., [longitude-n,latitude-n]] should be used for geometry bbox and linestring .
Maximum of 10 latitude, longitude pairs can be used for geometry polygon, bbox and linestring .
Note: The data-type of this field is a string, therefore the coordinates are a string encoded multidimensional array.
Maximum precision allowed is upto 6 decimal places.' + required: true + schema: + type: array + minItems: 2 + maxItems: 10 + items: + type: number + format: double + + x-codeSamples: + - lang: 'cURL' + label: 'search for a file' + source: | + curl --location --request GET 'https://example-fs.com/ngsi-ld/v1/entities?id=8a728957-1530-43a2-b844-88a593a94608georel=near;maxDistance=10000&geometry=point&coordinates=[72.79,21.16]' \ + --header 'token: ' + + + responses: + '200': + description: 'Query result' + content: + application/json: + schema: + $ref: '#/components/schemas/standardQueryResponse2' + '400': + description: 'Bad query' + content: + application/json: + schema: + $ref: '#/components/schemas/standardBadRequestErrorResponse' + '401': + content: + application/json: + schema: + "$ref": "#/components/schemas/standardInvalidTokenErrorResponse" + description: 'Unauthorized' + /list: get: tags: @@ -535,6 +606,48 @@ components: "limit": 5000, "offset": 0, "totalHits": 1 + + standardQueryResponse2: + title: standardBadRequestErrorResponse + properties: + type: + type: string + title: + type: string + results: + description: An array of objects + type: array + items: + type: object + limit: + type: integer + offset: + type: integer + totalHits: + type: integer + example: + type: 200 + title: urn:dx:rs:success + results: [ + { + "id": "8a728957-1530-43a2-b844-88a593a94608", + "timeRange": { + "gte": "2020-09-05T00:00:00Z", + "lte": "2020-09-15T00:00:00Z" + }, + "fileId": "8a728957-1530-43a2-b844-88a593a94608/0cb04afb-32f5-44dd-982d-323b5900bcca.txt", + "location": { + "type": "point", + "coordinates": [ + 72.81, + 21.16 + ] + } + } + ] + "limit": 5000, + "offset": 0, + "totalHits": 1 standardDeleteSuccessResponse: title: standardDeleteSuccessResponse properties: