diff --git a/static/api-specs/idn/beta/paths/discovered-application.yaml b/static/api-specs/idn/beta/paths/discovered-application.yaml new file mode 100644 index 00000000000..d186cccd887 --- /dev/null +++ b/static/api-specs/idn/beta/paths/discovered-application.yaml @@ -0,0 +1,150 @@ +get: + operationId: getDiscoveredApplicationByID + tags: + - Application Discovery + summary: Get Discovered Application by ID + description: > + This API returns a discovered application with its associated sources based on the ID provided. + security: + - UserContextAuth: + - 'idn:application-discovery:read' + parameters: + - name: "id" + in: "path" + required: true + schema: + type: "string" + description: ID of the discovered application. + example: "123e4567-e89b-12d3-a456-426655440000" + responses: + '200': + description: Returns the discovered application along with its associated sources. + content: + application/json: + example: + id: "app-123" + name: "Example App" + discoverySource: "csv" + discoveredVendor: "Example Vendor" + description: "An application for managing examples." + recommendedConnectors: [ "ConnectorA", "ConnectorB" ] + discoveredAt: "2023-07-01T12:00:00Z" + createdAt: "2024-06-01T12:00:00Z" + status: "ACTIVE" + associatedSources: [ + "4e2d7605-833f-4c34-8d03-5b2c7d2f4f66", + "f9b7e2ce-aced-4117-a95f-4ffad8b33989", + "a3b159f2-5f09-43c9-b40e-a6f317aa5b8f" + ] + '400': + $ref: '../../v3/responses/400.yaml' + '401': + $ref: '../../v3/responses/401.yaml' + '403': + $ref: '../../v3/responses/403.yaml' + '429': + $ref: '../../v3/responses/429.yaml' + '500': + $ref: '../../v3/responses/500.yaml' +patch: + operationId: patchDiscoveredApplicationByID + tags: + - Application Discovery + summary: Patch Discovered Application by Id + description: >- + This API updates an existing discovered application using a limited version of the [JSON Patch](https://tools.ietf.org/html/rfc6902) syntax. + + The following fields are patchable: + - **associatedSources** + - **dismissed** + security: + - UserContextAuth: + - 'idn:application-discovery:write' + parameters: + - name: "id" + in: "path" + required: true + schema: + type: "string" + description: ID of the discovered application. + example: "123e4567-e89b-12d3-a456-426655440000" + requestBody: + content: + application/json-patch+json: + schema: + type: array + items: + $ref: '../schemas/discovered-applications/JsonPatchOperations.yaml' + example: [ + { + "op": "replace", + "path": "/dismissed", + "value": false + } + ] + examples: + Dismiss an app: + description: This example shows how use patch to set the dismissal status of a correlated application to true + value: + [ + { + "op": "replace", + "path": "/dismissed", + "value": true + }, + ] + Replace associated sources: + description: This example shows how use patch to replace the values of the associatedSources field. + value: + [ + { + "op": "replace", + "path": "/associatedSources", + "value": [ + "4e2d7605-833f-4c34-8d03-5b2c7d2f4f66", + "f9b7e2ce-aced-4117-a95f-4ffad8b33989", + "a3b159f2-5f09-43c9-b40e-a6f317aa5b8f" + ] + }, + ] + Add an associated source to a correlated application: + description: >- + This example shows how to use patch to add an associated source to a correlated application + value: + [ + { + "op": "add", + "path": "/associatedSources", + "value": "123e4567-e89b-a456-42655440005" + } + ] + responses: + '200': + description: Returns the single patched discovered application. + content: + application/json: + example: + id: "app-123" + name: "Example App" + discoverySource: "csv" + discoveredVendor: "Example Vendor" + description: "An application for managing examples." + recommendedConnectors: [ "ConnectorA", "ConnectorB" ] + discoveredAt: "2023-07-01T12:00:00Z" + createdAt: "2024-06-01T12:00:00Z" + status: "ACTIVE" + associatedSources: [ + "4e2d7605-833f-4c34-8d03-5b2c7d2f4f66", + "f9b7e2ce-aced-4117-a95f-4ffad8b33989", + "a3b159f2-5f09-43c9-b40e-a6f317aa5b8f" + ] + '400': + $ref: '../../v3/responses/400.yaml' + '401': + $ref: '../../v3/responses/401.yaml' + '403': + $ref: '../../v3/responses/403.yaml' + '429': + $ref: '../../v3/responses/429.yaml' + '500': + $ref: '../../v3/responses/500.yaml' \ No newline at end of file diff --git a/static/api-specs/idn/beta/paths/discovered-applications.yaml b/static/api-specs/idn/beta/paths/discovered-applications.yaml index fbf4bd616fe..045337c06ba 100644 --- a/static/api-specs/idn/beta/paths/discovered-applications.yaml +++ b/static/api-specs/idn/beta/paths/discovered-applications.yaml @@ -89,4 +89,4 @@ get: '429': $ref: '../../v3/responses/429.yaml' '500': - $ref: '../../v3/responses/500.yaml' + $ref: '../../v3/responses/500.yaml' \ No newline at end of file diff --git a/static/api-specs/idn/beta/schemas/discovered-applications/JsonPatchOperations.yaml b/static/api-specs/idn/beta/schemas/discovered-applications/JsonPatchOperations.yaml new file mode 100644 index 00000000000..adbd5d8ff10 --- /dev/null +++ b/static/api-specs/idn/beta/schemas/discovered-applications/JsonPatchOperations.yaml @@ -0,0 +1,34 @@ +type: object +description: A limited JSONPatch Operation as defined by [RFC 6902 - JSON Patch](https://tools.ietf.org/html/rfc6902) +required: + - "op" + - "path" +properties: + op: + type: string + description: The operation to be performed + enum: + - "add" + - "remove" + - "replace" + example: "replace" + path: + type: string + description: A string representing the target path to an element to be affected by the operation + example: "/dismissed" + value: + oneOf: + - type: string + example: "New description" + title: string + - type: boolean + example: true + title: boolean + - type: array + title: array + items: + anyOf: + - type: string + example: ["4e2d7605-833f-4c34-8d03-5b2c7d2f4f66","f9b7e2ce-aced-4117-a95f-4ffad8b33989","a3b159f2-5f09-43c9-b40e-a6f317aa5b8f"] + description: The value to be used for the operation, required for "add" and "replace" operations + example: true \ No newline at end of file diff --git a/static/api-specs/idn/sailpoint-api.beta.yaml b/static/api-specs/idn/sailpoint-api.beta.yaml index dbc52301a31..7401804d8b6 100644 --- a/static/api-specs/idn/sailpoint-api.beta.yaml +++ b/static/api-specs/idn/sailpoint-api.beta.yaml @@ -1854,6 +1854,8 @@ paths: $ref: "./beta/paths/manual-discover-applications.yaml" /discovered-applications: $ref: "./beta/paths/discovered-applications.yaml" + /discovered-applications/{id}: + $ref: "./beta/paths/discovered-application.yaml" /vendor-connector-mappings: $ref: "./beta/paths/vendor-connector-mappings.yaml" /icons/{objectType}/{objectId}: