DatoCMS client v0.2.4 DatoCMS.Client.ItemType View Source

Link to this section Summary

Functions

Calls POST /item-types

Calls DELETE /item-types/{(%2Fschemata%2Fitem_type%23%2Fdefinitions%2Fitem_type%2Fdefinitions%2Fidentity)}

Calls GET /item-types/{(%2Fschemata%2Fitem_type%23%2Fdefinitions%2Fitem_type%2Fdefinitions%2Fidentity)}

Calls GET /item-types

Calls PUT /item-types/{(%2Fschemata%2Fitem_type%23%2Fdefinitions%2Fitem_type%2Fdefinitions%2Fidentity)}

Link to this section Functions

Calls POST /item-types

params is JSON encoded and passed as the request body.

params Schema

{
  "additionalProperties": false,
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "attributes": {
          "additionalProperties": false,
          "description": "JSON API attributes",
          "properties": {
            "api_key": {
              "example": "post",
              "type": "string"
            },
            "name": {
              "example": "Blog post",
              "type": "string"
            },
            "ordering_direction": {
              "enum": [
                null,
                "asc",
                "desc"
              ],
              "example": "desc",
              "type": [
                "string",
                "null"
              ]
            },
            "singleton": {
              "type": "boolean"
            },
            "sortable": {
              "type": "boolean"
            }
          },
          "required": [
            "name",
            "api_key",
            "singleton",
            "sortable",
            "ordering_direction"
          ],
          "type": "object"
        },
        "relationships": {
          "additionalProperties": false,
          "properties": {
            "ordering_field": {
              "additionalProperties": false,
              "description": "The field upon which the collection is sorted",
              "properties": {
                "data": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "description": "JSON API data",
                      "properties": {
                        "id": {
                          "description": "ID of field",
                          "example": "124",
                          "type": "string"
                        },
                        "type": {
                          "description": "JSON API type field",
                          "example": "field",
                          "pattern": "^field$",
                          "type": [
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ],
                      "type": "object"
                    },
                    {
                      "type": [
                        "null"
                      ]
                    }
                  ],
                  "example": null
                }
              },
              "required": [
                "data"
              ],
              "type": "object"
            }
          },
          "required": [
            "ordering_field"
          ],
          "type": "object"
        },
        "type": {
          "description": "JSON API type field",
          "example": "item_type",
          "pattern": "^item_type$",
          "type": [
            "string"
          ]
        }
      },
      "required": [
        "type",
        "attributes",
        "relationships"
      ],
      "type": "object"
    }
  },
  "required": [
    "data"
  ],
  "type": "object"
}

Calls DELETE /item-types/{(%2Fschemata%2Fitem_type%23%2Fdefinitions%2Fitem_type%2Fdefinitions%2Fidentity)}

Calls GET /item-types/{(%2Fschemata%2Fitem_type%23%2Fdefinitions%2Fitem_type%2Fdefinitions%2Fidentity)}

Calls GET /item-types

Calls PUT /item-types/{(%2Fschemata%2Fitem_type%23%2Fdefinitions%2Fitem_type%2Fdefinitions%2Fidentity)}

params is JSON encoded and passed as the request body.

params Schema

{
  "additionalProperties": false,
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "attributes": {
          "additionalProperties": false,
          "description": "JSON API attributes",
          "properties": {
            "api_key": {
              "example": "post",
              "type": "string"
            },
            "name": {
              "example": "Blog post",
              "type": "string"
            },
            "ordering_direction": {
              "enum": [
                null,
                "asc",
                "desc"
              ],
              "example": "desc",
              "type": [
                "string",
                "null"
              ]
            },
            "singleton": {
              "type": "boolean"
            },
            "sortable": {
              "type": "boolean"
            }
          },
          "required": [
            "name",
            "api_key",
            "singleton",
            "sortable",
            "ordering_direction"
          ],
          "type": "object"
        },
        "id": {
          "description": "ID of item type",
          "example": "44",
          "type": "string"
        },
        "relationships": {
          "additionalProperties": false,
          "properties": {
            "ordering_field": {
              "additionalProperties": false,
              "description": "The field upon which the collection is sorted",
              "properties": {
                "data": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "description": "JSON API data",
                      "properties": {
                        "id": {
                          "description": "ID of field",
                          "example": "124",
                          "type": "string"
                        },
                        "type": {
                          "description": "JSON API type field",
                          "example": "field",
                          "pattern": "^field$",
                          "type": [
                            "string"
                          ]
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ],
                      "type": "object"
                    },
                    {
                      "type": [
                        "null"
                      ]
                    }
                  ],
                  "example": null
                }
              },
              "required": [
                "data"
              ],
              "type": "object"
            }
          },
          "required": [
            "ordering_field"
          ],
          "type": "object"
        },
        "type": {
          "description": "JSON API type field",
          "example": "item_type",
          "pattern": "^item_type$",
          "type": [
            "string"
          ]
        }
      },
      "required": [
        "type",
        "id",
        "attributes",
        "relationships"
      ],
      "type": "object"
    }
  },
  "required": [
    "data"
  ],
  "type": "object"
}