swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Items API description: Operations for managing items (documents) schemes: - https tags: - name: Items description: Operations for managing items (documents) paths: /dbs/{databaseId}/colls/{containerId}/docs: get: operationId: Items_List summary: Microsoft Azure List Items description: Returns a list of items (documents) under the specified container. tags: - Items parameters: - $ref: '#/components/parameters/DatabaseIdParameter' - $ref: '#/components/parameters/ContainerIdParameter' - $ref: '#/components/parameters/ApiVersionParameter' - $ref: '#/components/parameters/MaxItemCountParameter' - $ref: '#/components/parameters/ContinuationParameter' - $ref: '#/components/parameters/PartitionKeyParameter' responses: '200': description: Successfully returned the list of items. content: application/json: schema: $ref: '#/components/schemas/ItemListResult' examples: ItemsList200Example: summary: Default Items_List 200 response x-microcks-default: true value: _rid: '500123' Documents: - id: abc123 _rid: '500123' _ts: 10 _self: example_value _etag: example_value _attachments: example_value _count: 10 default: description: Error response. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: ItemsListdefaultExample: summary: Default Items_List default response x-microcks-default: true value: code: example_value message: example_value x-microcks-operation: delay: 0 dispatcher: FALLBACK post: operationId: Items_Create summary: Microsoft Azure Create an Item description: Creates a new item (document) in the specified container. tags: - Items parameters: - $ref: '#/components/parameters/DatabaseIdParameter' - $ref: '#/components/parameters/ContainerIdParameter' - $ref: '#/components/parameters/ApiVersionParameter' - $ref: '#/components/parameters/PartitionKeyParameter' - name: x-ms-documentdb-is-upsert in: header description: If true, the operation will perform an upsert instead of create. schema: type: boolean default: false example: true requestBody: required: true content: application/json: schema: type: object description: The JSON document to create. properties: id: type: string description: The unique identifier of the item. required: - id additionalProperties: true examples: ItemsCreateRequestExample: summary: Default Items_Create request x-microcks-default: true value: id: abc123 responses: '201': description: Successfully created the item. content: application/json: schema: $ref: '#/components/schemas/Item' examples: ItemsCreate201Example: summary: Default Items_Create 201 response x-microcks-default: true value: id: abc123 _rid: '500123' _ts: 10 _self: example_value _etag: example_value _attachments: example_value '409': description: An item with the specified ID already exists. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: ItemsCreate409Example: summary: Default Items_Create 409 response x-microcks-default: true value: code: example_value message: example_value default: description: Error response. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: ItemsCreatedefaultExample: summary: Default Items_Create default response x-microcks-default: true value: code: example_value message: example_value x-microcks-operation: delay: 0 dispatcher: FALLBACK /dbs/{databaseId}/colls/{containerId}/docs/{itemId}: get: operationId: Items_Get summary: Microsoft Azure Get an Item description: Retrieves an item (document) by its ID and partition key. tags: - Items parameters: - $ref: '#/components/parameters/DatabaseIdParameter' - $ref: '#/components/parameters/ContainerIdParameter' - name: itemId in: path required: true description: The ID of the item. schema: type: string example: '500123' - $ref: '#/components/parameters/ApiVersionParameter' - $ref: '#/components/parameters/PartitionKeyParameter' responses: '200': description: Successfully returned the item. content: application/json: schema: $ref: '#/components/schemas/Item' examples: ItemsGet200Example: summary: Default Items_Get 200 response x-microcks-default: true value: id: abc123 _rid: '500123' _ts: 10 _self: example_value _etag: example_value _attachments: example_value '404': description: The item was not found. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: ItemsGet404Example: summary: Default Items_Get 404 response x-microcks-default: true value: code: example_value message: example_value default: description: Error response. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: ItemsGetdefaultExample: summary: Default Items_Get default response x-microcks-default: true value: code: example_value message: example_value x-microcks-operation: delay: 0 dispatcher: FALLBACK put: operationId: Items_Replace summary: Microsoft Azure Replace an Item description: Replaces the entire item (document). tags: - Items parameters: - $ref: '#/components/parameters/DatabaseIdParameter' - $ref: '#/components/parameters/ContainerIdParameter' - name: itemId in: path required: true description: The ID of the item. schema: type: string example: '500123' - $ref: '#/components/parameters/ApiVersionParameter' - $ref: '#/components/parameters/PartitionKeyParameter' requestBody: required: true content: application/json: schema: type: object description: The replacement JSON document. additionalProperties: true examples: ItemsReplaceRequestExample: summary: Default Items_Replace request x-microcks-default: true value: {} responses: '200': description: Successfully replaced the item. content: application/json: schema: $ref: '#/components/schemas/Item' examples: ItemsReplace200Example: summary: Default Items_Replace 200 response x-microcks-default: true value: id: abc123 _rid: '500123' _ts: 10 _self: example_value _etag: example_value _attachments: example_value default: description: Error response. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: ItemsReplacedefaultExample: summary: Default Items_Replace default response x-microcks-default: true value: code: example_value message: example_value x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: operationId: Items_Delete summary: Microsoft Azure Delete an Item description: Deletes an item (document) from the container. tags: - Items parameters: - $ref: '#/components/parameters/DatabaseIdParameter' - $ref: '#/components/parameters/ContainerIdParameter' - name: itemId in: path required: true description: The ID of the item. schema: type: string example: '500123' - $ref: '#/components/parameters/ApiVersionParameter' - $ref: '#/components/parameters/PartitionKeyParameter' responses: '204': description: Successfully deleted the item. default: description: Error response. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: ItemsDeletedefaultExample: summary: Default Items_Delete default response x-microcks-default: true value: code: example_value message: example_value x-microcks-operation: delay: 0 dispatcher: FALLBACK components: parameters: PartitionKeyParameter: name: x-ms-documentdb-partitionkey in: header description: The partition key value for the requested item. Must be a JSON array with a single value, e.g., ["partitionKeyValue"]. schema: type: string MaxItemCountParameter: name: x-ms-max-item-count in: header description: The maximum number of items to return per page. Default is 100, maximum is 1000. schema: type: integer default: 100 maximum: 1000 ContainerIdParameter: name: containerId in: path required: true description: The ID of the container (collection). schema: type: string ContinuationParameter: name: x-ms-continuation in: header description: A continuation token returned from a previous request for pagination. schema: type: string ApiVersionParameter: name: x-ms-version in: header required: true description: The version of the Cosmos DB REST API. schema: type: string default: '2018-12-31' DatabaseIdParameter: name: databaseId in: path required: true description: The ID of the database. schema: type: string schemas: Item: type: object description: A Cosmos DB item (document). properties: id: type: string description: The unique identifier of the item. example: abc123 _rid: type: string readOnly: true description: System-generated resource ID. example: '500123' _ts: type: integer readOnly: true description: System-generated timestamp. example: 10 _self: type: string readOnly: true description: System-generated URI for the resource. example: example_value _etag: type: string readOnly: true description: System-generated resource etag. example: example_value _attachments: type: string readOnly: true description: Addressable path for the attachments resource. example: example_value additionalProperties: true required: - id ItemListResult: type: object description: List of Cosmos DB items. properties: _rid: type: string readOnly: true example: '500123' Documents: type: array items: $ref: '#/components/schemas/Item' description: List of items. example: [] _count: type: integer readOnly: true example: 10 ErrorResponse: type: object description: Error response from Cosmos DB. properties: code: type: string description: The error code. example: example_value message: type: string description: The error message. example: example_value required: - code - message x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'