Pryon User Defined Metadata API

The UserDefinedMetadata API from Pryon — 9 operation(s) for userdefinedmetadata.

OpenAPI Specification

pryon-userdefinedmetadata-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Service that implements Pryon User-Defined Metadata
  title: User Defined Metadata API
  version: '1.0'
servers:
- url: /
tags:
- name: UserDefinedMetadata
paths:
  /api/knowledge/v1alpha1/collections/{collection_id}/user-defined-metadata-fields:
    get:
      summary: List User-Defined Metadata Fields
      description: List user-defined metadata fields.
      operationId: UserDefinedMetadata_ListUserDefinedMetadataFields
      parameters:
      - description: Unique identifier for the parent collection; autogenerated and not editable.
        explode: false
        in: path
        name: collection_id
        required: true
        schema:
          type: string
        style: simple
      - description: Maximum page size is 100; default is 100.
        explode: true
        in: query
        name: page_size
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - description: For multiple pages; must be specified in each request for two pages per sheet.
        explode: true
        in: query
        name: page_token
        required: false
        schema:
          type: string
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListUserDefinedMetadataFieldsResponse'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
      tags:
      - UserDefinedMetadata
  /api/knowledge/v1alpha1/collections/{collection_id}/user-defined-metadata-fields/{user_defined_metadata_field_id}:
    delete:
      summary: Delete User-Defined Metadata Fields
      description: Delete a user-defined metadata field.
      operationId: UserDefinedMetadata_DeleteUserDefinedMetadataField
      parameters:
      - description: TUnique identifier for the parent collection; autogenerated and not editable.
        explode: false
        in: path
        name: collection_id
        required: true
        schema:
          type: string
        style: simple
      - description: A unique indentifier for the user-defined metadata field.
        explode: false
        in: path
        name: user_defined_metadata_field_id
        required: true
        schema:
          type: string
        style: simple
      responses:
        '200':
          content: {}
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
      tags:
      - UserDefinedMetadata
    get:
      summary: Get User-Defined Metadata Fields
      description: Get a user-defined metadata field.
      operationId: UserDefinedMetadata_GetUserDefinedMetadataField
      parameters:
      - description: Unique identifier for the parent collection; autogenerated and not editable.
        explode: false
        in: path
        name: collection_id
        required: true
        schema:
          type: string
        style: simple
      - description: A unique indentifier for the collection-level metadata field.
        explode: false
        in: path
        name: user_defined_metadata_field_id
        required: true
        schema:
          type: string
        style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserDefinedMetadataFieldResponse'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
      tags:
      - UserDefinedMetadata
  /api/knowledge/v1alpha1/collections/{collection_id}/user-defined-metadata-fields/{user_defined_metadata_field_id}/values:
    get:
      summary: List User-Defined Metadata Field Values
      description: List user-defined metadata field values.
      operationId: UserDefinedMetadata_ListUserDefinedMetadataFieldValues
      parameters:
      - description: Unique identifier for the parent collection; autogenerated and not editable.
        explode: false
        in: path
        name: collection_id
        required: true
        schema:
          type: string
        style: simple
      - description: The unique identifier for the user-defined metadata field.
        explode: false
        in: path
        name: user_defined_metadata_field_id
        required: true
        schema:
          type: string
        style: simple
      - description: Maximum page size is 100; default is 100.
        explode: true
        in: query
        name: page_size
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - description: For multiple pages; must be specified in each request for two pages per sheet.
        explode: true
        in: query
        name: page_token
        required: false
        schema:
          type: string
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListUserDefinedMetadataFieldValuesResponse'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
      tags:
      - UserDefinedMetadata
  ? /api/knowledge/v1alpha1/collections/{collection_id}/user-defined-metadata-fields/{user_defined_metadata_field_id}/values/{user_defined_metadata_field_value_id}
  : delete:
      summary: Delete User-Defined Metadata Field Values
      description: Delete a user-defined metadata field value.
      operationId: UserDefinedMetadata_DeleteUserDefinedMetadataFieldValue
      parameters:
      - description: Unique identifier for the parent collection; autogenerated and not editable.
        explode: false
        in: path
        name: collection_id
        required: true
        schema:
          type: string
        style: simple
      - description: The unique identifier for the user-defined metadata field.
        explode: false
        in: path
        name: user_defined_metadata_field_id
        required: true
        schema:
          type: string
        style: simple
      - description: The unique identifier for the user-defined metadata field value.
        explode: false
        in: path
        name: user_defined_metadata_field_value_id
        required: true
        schema:
          type: string
        style: simple
      responses:
        '200':
          content: {}
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
      tags:
      - UserDefinedMetadata
    get:
      summary: Get User-Defined Metadata Field Values
      description: Get a user-defined metadata field value.
      operationId: UserDefinedMetadata_GetUserDefinedMetadataFieldValue
      parameters:
      - description: Unique identifier for the parent collection; autogenerated and not editable.
        explode: false
        in: path
        name: collection_id
        required: true
        schema:
          type: string
        style: simple
      - description: The unique identifier for the user-defined metadata field.
        explode: false
        in: path
        name: user_defined_metadata_field_id
        required: true
        schema:
          type: string
        style: simple
      - description: The unique identifier for the user-defined metadata field value.
        explode: false
        in: path
        name: user_defined_metadata_field_value_id
        required: true
        schema:
          type: string
        style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserDefinedMetadataFieldValueResponse'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
      tags:
      - UserDefinedMetadata
  /api/knowledge/v1alpha1/collections/{data.collection_id}/user-defined-metadata-fields:
    post:
      summary: Create User-Defined Metadata Fields
      description: Create a new user-defined metadata field for a collection.
      operationId: UserDefinedMetadata_CreateUserDefinedMetadataField
      parameters:
      - explode: false
        in: path
        name: data.collection_id
        description: Unique identifier for the parent collection; autogenerated and not editable.
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserDefinedMetadataFieldRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserDefinedMetadataFieldResponse'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
      tags:
      - UserDefinedMetadata
  ? /api/knowledge/v1alpha1/collections/{data.collection_id}/user-defined-metadata-fields/{data.user_defined_metadata_field_id}
  : patch:
      summary: Update User-Defined Metadata Fields
      description: Update a user-defined metadata field.
      operationId: UserDefinedMetadata_UpdateUserDefinedMetadataField
      parameters:
      - explode: false
        in: path
        name: data.collection_id
        description: Unique identifier for the parent collection; autogenerated and not editable.
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: data.user_defined_metadata_field_id
        description: The unique identifier for the metadata field.
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserDefinedMetadataFieldRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserDefinedMetadataFieldResponse'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
      tags:
      - UserDefinedMetadata
  ? /api/knowledge/v1alpha1/collections/{data.collection_id}/user-defined-metadata-fields/{data.user_defined_metadata_field_id}/values
  : post:
      summary: Create User-Defined Metadata Field Values
      description: Create a new user-defined metadata field value.
      operationId: User_defined_metadata_create_user_defined_metadata_field_values
      parameters:
      - explode: false
        in: path
        name: data.collection_id
        description: Unique identifier for the parent collection; autogenerated and not editable.
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: data.user_defined_metadata_field_id
        description: The unique identifier for the metadata field.
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserDefinedMetadataFieldValuesRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserDefinedMetadataFieldValueResponse'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
      tags:
      - UserDefinedMetadata
  ? /api/knowledge/v1alpha1/collections/{data.collection_id}/user-defined-metadata-fields/{data.user_defined_metadata_field_id}/values/{data.user_defined_metadata_field_value_id}
  : patch:
      summary: Update User-Defined Metadata Field Values
      description: Update a user-defined metadata field value.
      operationId: UserDefinedMetadata_UpdateUserDefinedMetadataFieldValue
      parameters:
      - explode: false
        in: path
        name: data.collection_id
        description: Unique identifier for the parent collection; autogenerated and not editable.
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: data.user_defined_metadata_field_id
        description: The unique identifier for the metadata field.
        required: true
        schema:
          type: string
        style: simple
      - explode: false
        in: path
        name: data.user_defined_metadata_field_value_id
        description: The unique identifier for the metadata field value.
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserDefinedMetadataFieldValueRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserDefinedMetadataFieldValueResponse'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
      tags:
      - UserDefinedMetadata
  /api/knowledge/v1alpha1/metadata-fields/{metadata_field_id}/collections:
    get:
      summary: List Org IDs using Metadata Field
      description: List collection IDs by org-level user-defined metadata field ID.
      operationId: UserDefinedMetadata_ListCollectionsByMetadataField
      parameters:
      - description: The ID of the org-level user-defined metadata field.
        explode: false
        in: path
        name: metadata_field_id
        required: true
        schema:
          type: string
        style: simple
      - description: Maximum page size is 100; default is 100.
        explode: true
        in: query
        name: page_size
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - description: For multiple pages; must be specified in each request for two pages per sheet.
        explode: true
        in: query
        name: page_token
        required: false
        schema:
          type: string
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCollectionsByMetadataFieldResponse'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
          description: Default error response
      tags:
      - UserDefinedMetadata
components:
  schemas:
    CollectionMetadata:
      description: Metadata that will be returned with each collection-level GET
      properties:
        uuid:
          description: Unique identifier for the interaction returned in the resource response; the response ID.
          type: string
        response_time_millis:
          description: Response time (in milliseconds).
          format: uint32
          type: integer
      type: object
    UserDefinedMetadataFieldValue:
      properties:
        user_defined_metadata_field_value_id:
          description: Server generated uuid for the user-defined metadata field value.
          type: string
        collection_id:
          description: Unique identifier for the parent collection; autogenerated and not editable.
          type: string
        user_defined_metadata_field_id:
          description: The user-defined metadata field id this value is associated with.
          type: string
        canonical_value:
          allOf:
          - $ref: '#/components/schemas/GoogleProtobufValue'
          description: 'The data source metadata canonical value: value type is based on the MetadataField data_type.'
        canonical_value_display_name:
          description: The name of the canonical value; for example, display name of "World Health Organization" for the canonical value "WHO".
          type: string
        synonyms:
          description: The synonyms for the canonical value; for example, ["W.H.O", "World Health Organization"] for the canonical value "WHO".
          items:
            type: string
          type: array
      type: object
    GetUserDefinedMetadataFieldResponse:
      properties:
        metadata:
          $ref: '#/components/schemas/ResourceMetadata'
        data:
          $ref: '#/components/schemas/UserDefinedMetadataField'
      type: object
    GoogleProtobufAny:
      additionalProperties: true
      description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
      properties:
        '@type':
          description: The type of the serialized message.
          type: string
      type: object
    CreateUserDefinedMetadataFieldValuesRequest:
      properties:
        data:
          allOf:
          - $ref: '#/components/schemas/UserDefinedMetadataFieldValue'
          description: The user-defined metadata field value to create.
      type: object
    GoogleProtobufValue:
      description: Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
    UpdateUserDefinedMetadataFieldRequest:
      properties:
        data:
          $ref: '#/components/schemas/UserDefinedMetadataField'
        update_mask:
          description: A comma-separated list of fields being updated by the request, that is, data.display_field_name and data.description.
          format: field-mask
          type: string
      type: object
    UpdateUserDefinedMetadataFieldValueRequest:
      properties:
        data:
          allOf:
          - $ref: '#/components/schemas/UserDefinedMetadataFieldValue'
          description: The user-defined metadata field value to update.
        update_mask:
          description: A comma-separated list of fields being updated by the request, that is, data.display_field_name and data.description.
          format: field-mask
          type: string
      type: object
    ListCollectionsByMetadataFieldResponse:
      properties:
        metadata:
          $ref: '#/components/schemas/CollectionMetadata'
        collection_ids:
          description: A list of collection IDs associated with the specified metadata field.
          items:
            type: string
          type: array
        next_page_token:
          description: For multiple pages; must be specified in each request for two pages per sheet.
          type: string
        total_size:
          description: The total number of items in the collection across all the pages.
          format: int32
          type: integer
        page_size:
          description: Returned for convenience and clarity; same as page_size in request.
          format: int32
          type: integer
      type: object
    ListUserDefinedMetadataFieldsResponse:
      properties:
        metadata:
          $ref: '#/components/schemas/CollectionMetadata'
        items:
          items:
            $ref: '#/components/schemas/GetUserDefinedMetadataFieldResponse'
          type: array
        next_page_token:
          description: For multiple pages; must be specified in each request for two pages per sheet.
          type: string
        page_size:
          description: Returned for convenience and clarity; same as page_size in request.
          format: int32
          type: integer
      type: object
    CreateUserDefinedMetadataFieldRequest:
      description: "####################################\n ### User-Defined Metadata Fields ###\n ####################################"
      properties:
        data:
          $ref: '#/components/schemas/UserDefinedMetadataField'
      type: object
    GetUserDefinedMetadataFieldValueResponse:
      properties:
        metadata:
          $ref: '#/components/schemas/ResourceMetadata'
        data:
          $ref: '#/components/schemas/UserDefinedMetadataFieldValue'
      type: object
    ListUserDefinedMetadataFieldValuesResponse:
      properties:
        metadata:
          $ref: '#/components/schemas/CollectionMetadata'
        items:
          description: The user-defined metadata field values associated with the metadata field.
          items:
            $ref: '#/components/schemas/GetUserDefinedMetadataFieldValueResponse'
          type: array
        next_page_token:
          description: For multiple pages; must be specified in each request for two pages per sheet.
          type: string
        page_size:
          description: Returned for convenience and clarity; same as page_size in request.
          format: int32
          type: integer
      type: object
    UserDefinedMetadataField:
      properties:
        user_defined_metadata_field_id:
          description: The uuid for this collection-level user-defined metadata field.
          type: string
        metadata_field_id:
          description: The ID of the org-level user-defined metadata field.
          type: string
        collection_id:
          description: Unique identifier for the parent collection; autogenerated and not editable.
          type: string
        display_field_name:
          description: The display name for the user-defined metadata field.
          type: string
        description:
          description: The description for the user-defined metadata field.
          type: string
      type: object
    Status:
      description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).'
      properties:
        code:
          description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
          format: int32
          type: integer
        message:
          description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
          type: string
        details:
          description: A list of messages that carry the error details.  There is a common set of message types for APIs to use.
          items:
            $ref: '#/components/schemas/GoogleProtobufAny'
          type: array
      type: object
    ResourceMetadata:
      properties:
        uuid:
          description: Unique identifier for the interaction returned in the resource response; the response ID.
          type: string
        create_time:
          description: Time of the initial request.
          format: date-time
          type: string
        update_time:
          description: Time of the last update; 0 indicates updates have never been made.
          format: date-time
          type: string
        response_time_millis:
          description: Response time (in milliseconds).
          format: uint32
          type: integer
      type: object