openapi: 3.0.3 info: title: Opal Custom App Connector API version: "1.0" paths: /status: get: description: Returns the status of the custom connector API. operationId: getStatus parameters: - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": description: The status of the custom connector API. "401": $ref: "#/components/responses/InvalidRequestSignatureError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - status /users: get: description: Returns a list of users for your custom connector app. operationId: getUsers parameters: - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query name: cursor required: false schema: type: string style: form - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/UsersResponse" description: One page of users that exist for your custom app. "401": $ref: "#/components/responses/InvalidRequestSignatureError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - users /resources: get: description: Returns a list of resources for your organization. operationId: getResources parameters: - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query name: cursor required: false schema: type: string style: form - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/ResourcesResponse" description: One page of resources that exist for your custom app. "401": $ref: "#/components/responses/InvalidRequestSignatureError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - resources /resources/{resource_id}: get: description: Get a specific resource by its id. operationId: getResource parameters: - description: The id of the resource to fetch. example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: false name: resource_id required: true schema: type: string style: simple - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/ResourceResponse" description: The resource that was requested. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - resources /resources/{resource_id}/access_levels: get: description: Get the access level list of a resource. operationId: getResourceAccessLevels parameters: - description: The id of the resource example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: false name: resource_id required: true schema: type: string style: simple - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query name: cursor required: false schema: type: string style: form - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/ResourceAccessLevelsResponse" description: One page of access levels for the resource in question. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - resources /resources/{resource_id}/users: get: description: Get the user access list of a resource. operationId: getResourceUsers parameters: - description: The id of the resource example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: false name: resource_id required: true schema: type: string style: simple - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query name: cursor required: false schema: type: string style: form - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/ResourceUsersResponse" description: One page of users with access to the resource in question. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - resources post: description: Adds a user to the access list of the specified resource. operationId: addResourceUser parameters: - description: The id of the resource. example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: false name: resource_id required: true schema: type: string style: simple requestBody: required: true content: application/json: schema: properties: user_id: description: The ID of the user to add. example: 123 type: string app_id: description: The identifier of your custom app. example: my-custom-app type: string access_level_id: description: The ID of the access level to assign to the user. example: 123 type: string required: - user_id - app_id responses: "200": description: The user was successfully added to the resource. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - resources /resources/{resource_id}/users/{user_id}: delete: description: Remove a user from the access list of the specified resource. operationId: removeResourceUser parameters: - description: The id of the resource. example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: false name: resource_id required: true schema: type: string style: simple - description: The id of the user. example: 123 explode: true in: path name: user_id required: true schema: type: string style: simple - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form - description: The access level identifier. example: 123 explode: true in: query name: access_level_id required: false schema: type: string style: form responses: "200": description: The user was successfully removed from the resource. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - resources /groups: get: description: Returns a list of groups for your organization. operationId: getGroups parameters: - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query name: cursor required: false schema: type: string style: form - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/GroupsResponse" description: One page of groups that exist for your custom app. "401": $ref: "#/components/responses/InvalidRequestSignatureError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - groups /groups/{group_id}: get: description: Returns a group for your organization. operationId: getGroup parameters: - description: The id of the group. example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: true name: group_id required: true schema: type: string style: simple - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/GroupResponse" description: The group that exists for your custom app. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - groups /groups/{group_id}/member-groups: get: description: Get member groups for the specified group operationId: getGroupMemberGroups parameters: - description: The ID of the containing group example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: true name: group_id required: true schema: type: string style: simple - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query name: cursor required: false schema: type: string style: form - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/GroupMemberGroupResponse" description: The member groups for the specified group "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - groups post: description: Add a member group to the specified group operationId: addGroupMemberGroup parameters: - description: The ID of the containing group example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: true name: group_id required: true schema: type: string style: simple requestBody: required: true content: application/json: schema: properties: group_id: description: The ID of the member group to add. example: f454d283-ca67-4a8a-bdbb-df212eca5353 type: string app_id: description: The identifier of your custom app. example: my-custom-app type: string required: - group_id - app_id responses: "200": description: The member group was successfully added to the group. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - groups /groups/{group_id}/member-groups/{member_group_id}: delete: description: Remove a member group from the specified group operationId: removeGroupMemberGroup parameters: - description: The ID of the containing group example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: true name: group_id required: true schema: type: string style: simple - description: The ID of the member group to remove. example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: true name: member_group_id required: true schema: type: string style: simple - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": description: The member group was successfully removed from the group "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - groups /groups/{group_id}/users: get: description: Returns a list of users for the specified group. operationId: getGroupUsers parameters: - description: The id of the group. example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: true name: group_id required: true schema: type: string style: simple - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query name: cursor required: false schema: type: string style: form - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/GroupUsersResponse" description: One page of users that exist for your custom app. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - groups post: description: Adds a user to the specified group. operationId: addGroupUser parameters: - description: The id of the group. example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: true name: group_id required: true schema: type: string style: simple requestBody: required: true content: application/json: schema: properties: user_id: description: The id of the user. example: 123 type: string app_id: description: The identifier of your custom app. example: my-custom-app type: string required: - user_id - app_id responses: "200": description: The user was successfully added to the group. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - groups /groups/{group_id}/users/{user_id}: delete: description: Removes a user from the specified group. operationId: removeGroupUser parameters: - description: The id of the group. example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: true name: group_id required: true schema: type: string style: simple - description: The id of the user. example: 123 explode: true in: path name: user_id required: true schema: type: string style: simple - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": description: The user was successfully removed from the group. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - groups /groups/{group_id}/resources: get: description: Returns a list of resources for the specified group. operationId: getGroupResources parameters: - description: The id of the group. example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: true name: group_id required: true schema: type: string style: simple - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query name: cursor required: false schema: type: string style: form - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/GroupResourcesResponse" description: One page of resources that exist for your custom app. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - groups post: description: Adds a resource to the specified group. operationId: addGroupResource parameters: - description: The id of the group. example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: true name: group_id required: true schema: type: string style: simple requestBody: required: true content: application/json: schema: properties: resource_id: description: The id of the resource. example: 123 type: string app_id: description: The identifier of your custom app. example: my-custom-app type: string access_level_id: description: The id of the access level. example: 123 type: string required: - resource_id - app_id responses: "200": description: The resource was successfully added to the group. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - groups /groups/{group_id}/resources/{resource_id}: delete: description: Removes a resource from the specified group. operationId: removeGroupResource parameters: - description: The id of the group. example: f454d283-ca67-4a8a-bdbb-df212eca5353 in: path explode: true name: group_id required: true schema: type: string style: simple - description: The id of the resource. example: 123 explode: true in: path name: resource_id required: true schema: type: string style: simple - description: The identifier of your custom app. example: my-custom-app explode: true in: query name: app_id required: true schema: type: string style: form - description: The access level identifier. example: 123 explode: true in: query name: access_level_id required: false schema: type: string style: form responses: "200": description: The resource was successfully removed from the group. "401": $ref: "#/components/responses/InvalidRequestSignatureError" "404": $ref: "#/components/responses/EntityNotFoundError" default: $ref: "#/components/responses/UnexpectedError" security: - BearerAuth: [] tags: - groups components: responses: EntityNotFoundError: description: The entity was not found. content: application/json: schema: $ref: "#/components/schemas/Error" InvalidRequestSignatureError: description: The request signature is invalid. content: application/json: schema: $ref: "#/components/schemas/Error" UnexpectedError: description: An unexpected error occurred. content: application/json: schema: $ref: "#/components/schemas/Error" schemas: Error: type: object properties: code: type: integer message: type: string required: - code - message Resource: example: id: f454d283-ca67-4a8a-bdbb-df212eca5353 name: Admin Role description: This resource represents the admin role. properties: id: description: The id of the resource in your system. Opal will provide this id when making requests for the resource to your connector. example: f454d283-ca67-4a8a-bdbb-df212eca5353 type: string name: description: The name of the resource example: Admin Role type: string description: description: The description of the resource. If provided, it will be imported into Opal. example: This resource represents the admin role. type: string type: object required: - id - name AccessLevel: example: id: f454d283-ca67-4a8a-bdbb-df212eca5353 name: Admin properties: id: description: The id of the access level in your system. Opal will provide this id when making requests for the access level to your connector. example: f454d283-ca67-4a8a-bdbb-df212eca5353 type: string name: description: The name of the access level example: Admin type: string type: object required: - id - name User: example: id: f454d283-ca67-4a8a-bdbb-df212eca5353 email: john.doe@mycompany.com properties: id: description: The id of the user in your system. Opal will provide this id when making requests for the user to your connector. example: f454d283-ca67-4a8a-bdbb-df212eca5353 type: string email: description: The email of the user. Opal will use this to associate the user with the corresponding Opal user. example: john.doe@mycompany.com format: email type: string type: object required: - id - email ResourceResponse: example: resource: - id: f454d283-ca67-4a8a-bdbb-df212eca5353 name: Admin description: This resource represents the admin role. properties: resource: $ref: "#/components/schemas/Resource" type: object required: - resource UsersResponse: example: next_cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw users: - id: f454d283-ca67-4a8a-bdbb-df212eca5353 email: john.doe@mycompnay.com properties: next_cursor: description: The cursor with which to continue pagination if additional result pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string users: items: $ref: "#/components/schemas/User" type: array type: object required: - users ResourcesResponse: example: next_cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw resources: - id: f454d283-ca67-4a8a-bdbb-df212eca5353 name: Admin description: This resource represents the admin role. properties: next_cursor: description: The cursor with which to continue pagination if additional result pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string resources: items: $ref: "#/components/schemas/Resource" type: array type: object required: - resources ResourceAccessLevelsResponse: example: next_cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw access_levels: - id: f454d283-ca67-4a8a-bdbb-df212eca5353 name: Admin properties: next_cursor: description: The cursor with which to continue pagination if additional result pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string access_levels: items: $ref: "#/components/schemas/AccessLevel" type: array type: object required: - access_levels ResourceUsersResponse: example: next_cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw users: - user_id: f454d283-ca67-4a8a-bdbb-df212eca5353 access_level_id: f454d283-ca67-4a8a-adcb-df212eca5353 access_level_name: Admin properties: next_cursor: description: The cursor with which to continue pagination if additional result pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string users: items: $ref: "#/components/schemas/ResourceUser" type: array type: object required: - users ResourceUser: example: user_id: f454d283-ca67-4a8a-bdbb-df212eca5353 email: johndoe@mycompany.com access_level: id: f454d283-ca67-4a8a-adcb-df212eca5353 name: Admin properties: user_id: description: The id of the user in your system. Opal will provide this id when making requests for the user to your connector. example: f454d283-ca67-4a8a-bdbb-df212eca5353 type: string email: description: The email of the user. Opal will use this to associate the user with the corresponding Opal user. example: johndoe@mycompany.com type: string access_level: $ref: "#/components/schemas/AccessLevel" type: object required: - user_id Group: example: id: f454d283-ca67-4a8a-bdbb-df212eca5353 name: Egnineering team description: This group represents the engineering team. properties: id: description: The id of the group in your system. Opal will provide this id when making requests for the group to your connector. example: f454d283-ca67-4a8a-bdbb-df212eca5353 type: string name: description: The name of the group example: Admin type: string description: description: The description of the group example: This group represents the engineering team. type: string type: object required: - id - name GroupUser: example: user_id: f454d283-ca67-4a8a-bdbb-df212eca5353 email: johndoe@mycompany.com properties: user_id: description: The id of the user in your system. Opal will provide this id when making requests for the user to your connector. example: f454d283-ca67-4a8a-bdbb-df212eca5353 type: string email: description: The email of the user. Opal will use this to associate the user with the corresponding Opal user. example: johndoe@mycompany.com type: string type: object required: - user_id GroupResource: example: resource_id: f454d283-ca67-4a8a-bdbb-df212eca5353 access_level: id: f454d283-ca67-4a8a-adcb-df212eca5353 name: Admin properties: resource_id: description: The id of the resource in your system. Opal will provide this id when making requests for the resource to your connector. example: f454d283-ca67-4a8a-bdbb-df212eca5353 type: string access_level: $ref: "#/components/schemas/AccessLevel" type: object required: - resource_id GroupResponse: example: id: f454d283-ca67-4a8a-bdbb-df212eca5353 name: Engineering team description: This group represents the engineering team. properties: id: description: The id of the group in your system. Opal will provide this id when making requests for the group to your connector. example: f454d283-ca67-4a8a-bdbb-df212eca5353 type: string name: description: The name of the group example: Admin type: string description: description: The description of the group example: This group represents the engineering team. type: string type: object required: - id - name GroupsResponse: example: next_cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw groups: - id: f454d283-ca67-4a8a-bdbb-df212eca5353 name: Engineering team description: This group represents the engineering teams. properties: next_cursor: description: The cursor with which to continue pagination if additional result pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string groups: items: $ref: "#/components/schemas/Group" type: array type: object required: - groups GroupUsersResponse: example: next_cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw users: - user_id: f454d283-ca67-4a8a-bdbb-df212eca5353 email: johndoe@mycompany.com properties: next_cursor: description: The cursor with which to continue pagination if additional result pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string users: items: $ref: "#/components/schemas/GroupUser" type: array type: object required: - users GroupResourcesResponse: example: next_cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw resources: - resource_id: f454d283-ca67-4a8a-bdbb-df212eca5353 access_level: id: f454d283-ca67-4a8a-adcb-df212eca5353 name: Admin properties: next_cursor: description: The cursor with which to continue pagination if additional result pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string resources: items: $ref: "#/components/schemas/GroupResource" type: array type: object required: - resources GroupMemberGroupsResponse: example: next_cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw group_id: f454d283-ca67-4a8a-bdbb-df212eca5353 properties: next_cursor: description: The cursor with which to continue pagination if additional result pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string groups: items: type: object properties: group_id: description: example: f454d283-ca67-4a8a-bdbb-df212eca5353 type: string name: description: example: Test Group type: string description: description: example: Test Group Description type: string type: object required: - groups - next_cursor