OBTENER /groups/{groupId}/apps/{appId}/schemas/{schemaId}

Get a specific schema by its _id value.

Parámetros de path

Respuestas

  • 200 aplicación/json

    Vale

    Ocultar atributos de respuesta Mostrar los atributos de respuesta Objeto
    • metadata Objeto

      Metadata that describes which linked collection the schema applies to.

      Hide metadata attributes Mostrar los atributos de metadatos Objeto
      • data_source string

        The data source name.

      • database string

        El nombre de la base de datos.

      • Colección string

        El nombre de la colección.

    • esquema Objeto

      A valid schema for the collection.

      Ocultar atributos del esquema Show schema attributes Objeto
      • bsonType string

        The BSON type of the field.

        Los valores son object, array, string, number, int, long, double, decimal, date, timestamp, bool, null, regex, objectId, binary, uuid, function, javascript, symbol, minKey o maxKey.

      • Título string

        A human-readable title for the schema.

      • Requerido array[string]

        Para los esquemas object, un arreglo de nombres de campos que son obligatorios en instancias del objeto.

      • Propiedades Objeto

        An object where each field name is a property in the schema. The corresponding value is a schema definition for that field.

        Hide properties attribute Mostrar atributo de propiedades Objeto
        • * Objeto

          A valid schema for the collection.

    • relaciones Objeto

      Relationships to foreign collections. Each field name is a property in the schema. The corresponding value is a relationship definition for that field.

      Ocultar el atributo de relaciones Show relationships attribute Objeto
      • * Objeto Propiedades adicionales

        A relationship definition.

        Ocultar * atributos Mostrar * atributos Objeto
        • ref string

          Una string de referencia para la colección externa.

        • foreign_key string

          The name of the field in the foreign collection that the relationship points to.

        • es_lista booleano

          En caso de que true:

          • the relationship may point to many foreign documents.
          • the local field must be defined as an array in the collection schema.
OBTENER /grupos/{groupId}/aplicaciones/{appId}/esquemas/{schemaId}
curl \
 --request GET 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/schemas/{schemaId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Ejemplos de respuestas (200)
{
  "metadata": {
    "data_source": "string",
    "database": "string",
    "collection": "string"
  },
  "schema": {
    "bsonType": "object",
    "title": "string",
    "required": [
      "string"
    ],
    "properties": {
      "*": {}
    }
  },
  "relationships": {
    "additionalProperty1": {
      "ref": "string",
      "foreign_key": "string",
      "is_list": true
    },
    "additionalProperty2": {
      "ref": "string",
      "foreign_key": "string",
      "is_list": true
    }
  }
}