Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
$ curl https://demo.ckan.org/api/rest/dataset/dataset-has-a-tail --header 'Content-Type: application/json' -H "Authorization:<API_KEY>" -d'{
  "name": "dataset-has-a-tail",
  "title": "OMG its a dataset with a tail",
  "extras": {
    "Metadata": "{\\r\\n  \\\"apiVersion\\\": \\\"1.0.0\\\",\\r\\n  \\\"swaggerVersion\\\": \\\"1.2\\\",\\r\\n  \\\"basePath\\\": \\\"http:\\/\\/petstore.swagger.io\\/api\\\",\\r\\n  \\\"resourcePath\\\": \\\"\\/store\\\",\\r\\n  \\\"produces\\\": [\\r\\n    \\\"application\\/json\\\"\\r\\n  ],\\r\\n  \\\"apis\\\": [\\r\\n    {\\r\\n      \\\"path\\\": \\\"\\/store\\/order\\/{orderId}\\\",\\r\\n      \\\"operations\\\": [\\r\\n        {\\r\\n          \\\"method\\\": \\\"GET\\\",\\r\\n          \\\"summary\\\": \\\"Find purchase order by ID\\\",\\r\\n          \\\"notes\\\": \\\"For valid response try integer IDs with value <= 5. Anything above 5 or nonintegers will generate API errors\\\",\\r\\n          \\\"type\\\": \\\"Order\\\",\\r\\n          \\\"nickname\\\": \\\"getOrderById\\\",\\r\\n          \\\"authorizations\\\": {},\\r\\n          \\\"parameters\\\": [\\r\\n            {\\r\\n              \\\"name\\\": \\\"orderId\\\",\\r\\n              \\\"description\\\": \\\"ID of pet that needs to be fetched\\\",\\r\\n              \\\"required\\\": true,\\r\\n              \\\"type\\\": \\\"string\\\",\\r\\n              \\\"paramType\\\": \\\"path\\\"\\r\\n            }\\r\\n          ],\\r\\n          \\\"responseMessages\\\": [\\r\\n            {\\r\\n              \\\"code\\\": 400,\\r\\n              \\\"message\\\": \\\"Invalid ID supplied\\\"\\r\\n            },\\r\\n            {\\r\\n              \\\"code\\\": 404,\\r\\n              \\\"message\\\": \\\"Order not found\\\"\\r\\n            }\\r\\n          ]\\r\\n        },\\r\\n        {\\r\\n          \\\"method\\\": \\\"DELETE\\\",\\r\\n          \\\"summary\\\": \\\"Delete purchase order by ID\\\",\\r\\n          \\\"notes\\\": \\\"For valid response try integer IDs with value < 1000.  Anything above 1000 or nonintegers will generate API errors\\\",\\r\\n          \\\"type\\\": \\\"void\\\",\\r\\n          \\\"nickname\\\": \\\"deleteOrder\\\",\\r\\n          \\\"authorizations\\\": {\\r\\n            \\\"oauth2\\\": [\\r\\n              {\\r\\n                \\\"scope\\\": \\\"test:anything\\\",\\r\\n                \\\"description\\\": \\\"anything\\\"\\r\\n              }\\r\\n            ]\\r\\n          },\\r\\n          \\\"parameters\\\": [\\r\\n            {\\r\\n              \\\"name\\\": \\\"orderId\\\",\\r\\n              \\\"description\\\": \\\"ID of the order that needs to be deleted\\\",\\r\\n              \\\"required\\\": true,\\r\\n              \\\"type\\\": \\\"string\\\",\\r\\n              \\\"paramType\\\": \\\"path\\\"\\r\\n            }\\r\\n          ],\\r\\n          \\\"responseMessages\\\": [\\r\\n            {\\r\\n              \\\"code\\\": 400,\\r\\n              \\\"message\\\": \\\"Invalid ID supplied\\\"\\r\\n            },\\r\\n            {\\r\\n              \\\"code\\\": 404,\\r\\n              \\\"message\\\": \\\"Order not found\\\"\\r\\n            }\\r\\n          ]\\r\\n        }\\r\\n      ]\\r\\n    },\\r\\n    {\\r\\n      \\\"path\\\": \\\"\\/store\\/order\\\",\\r\\n      \\\"operations\\\": [\\r\\n        {\\r\\n          \\\"method\\\": \\\"POST\\\",\\r\\n          \\\"summary\\\": \\\"Place an order for a pet\\\",\\r\\n          \\\"notes\\\": \\\"\\\",\\r\\n          \\\"type\\\": \\\"void\\\",\\r\\n          \\\"nickname\\\": \\\"placeOrder\\\",\\r\\n          \\\"authorizations\\\": {\\r\\n            \\\"oauth2\\\": [\\r\\n              {\\r\\n                \\\"scope\\\": \\\"test:anything\\\",\\r\\n                \\\"description\\\": \\\"anything\\\"\\r\\n              }\\r\\n            ]\\r\\n          },\\r\\n          \\\"parameters\\\": [\\r\\n            {\\r\\n              \\\"name\\\": \\\"body\\\",\\r\\n              \\\"description\\\": \\\"order placed for purchasing the pet\\\",\\r\\n              \\\"required\\\": true,\\r\\n              \\\"type\\\": \\\"Order\\\",\\r\\n              \\\"paramType\\\": \\\"body\\\"\\r\\n            }\\r\\n          ],\\r\\n          \\\"responseMessages\\\": [\\r\\n            {\\r\\n              \\\"code\\\": 400,\\r\\n              \\\"message\\\": \\\"Invalid order\\\"\\r\\n            }\\r\\n          ]\\r\\n        }\\r\\n      ]\\r\\n    }\\r\\n  ],\\r\\n  \\\"models\\\": {\\r\\n    \\\"Order\\\": {\\r\\n      \\\"id\\\": \\\"Order\\\",\\r\\n      \\\"description\\\": \\\"an order in the system\\\",\\r\\n      \\\"properties\\\": {\\r\\n        \\\"id\\\": {\\r\\n          \\\"type\\\": \\\"integer\\\",\\r\\n          \\\"format\\\": \\\"int64\\\"\\r\\n        },\\r\\n        \\\"petId\\\": {\\r\\n          \\\"type\\\": \\\"integer\\\",\\r\\n          \\\"format\\\": \\\"int64\\\"\\r\\n        },\\r\\n        \\\"quantity\\\": {\\r\\n          \\\"type\\\": \\\"integer\\\",\\r\\n          \\\"format\\\": \\\"int32\\\"\\r\\n        },\\r\\n        \\\"status\\\": {\\r\\n          \\\"type\\\": \\\"string\\\",\\r\\n          \\\"description\\\": \\\"Order Status\\\",\\r\\n          \\\"enum\\\": [\\r\\n            \\\"placed\\\",\\r\\n            \\\" approved\\\",\\r\\n            \\\" delivered\\\"\\r\\n          ]\\r\\n        },\\r\\n        \\\"shipDate\\\": {\\r\\n          \\\"type\\\": \\\"string\\\",\\r\\n          \\\"format\\\": \\\"date-time\\\"\\r\\n        }\\r\\n      }\\r\\n    }\\r\\n  }\\r\\n}"
  }
}' -H "Authorization:<API_KEY>"
 
{
  "license_title": null,
  "maintainer": null,
  "private": false,
  "maintainer_email": null,
  "num_tags": 0,
  "id": "a09f9319-bf4c-48a0-8d98-a8d066d6636d",
  "metadata_created": "2018-08-13T18:00:48.853260",
  "relationships": [],
  "license": null,
  "metadata_modified": "2018-08-13T22:19:02.606453",
  "author": null,
  "author_email": null,
  "state": "active",
  "version": null,
  "creator_user_id": "28fb4558-3686-4b24-96d9-8d935190d962",
  "type": "dataset",
  "resources": [],
  "num_resources": 0,
  "tags": [],
  "groups": [],
  "license_id": null,
  "organization": null,
  "name": "dataset-has-a-tail",
  "isopen": false,
  "notes_rendered": "",
  "url": null,
  "ckan_url": "https://demo.ckan.org/dataset/dataset-has-a-tail",
  "notes": null,
  "owner_org": null,
  "ratings_average": null,
  "extras": {
    "Metadata": "{\\r\\n  \\\"apiVersion\\\": \\\"1.0.0\\\",\\r\\n  \\\"swaggerVersion\\\": \\\"1.2\\\",\\r\\n  \\\"basePath\\\": \\\"http:\\/\\/petstore.swagger.io\\/api\\\",\\r\\n  \\\"resourcePath\\\": \\\"\\/store\\\",\\r\\n  \\\"produces\\\": [\\r\\n    \\\"application\\/json\\\"\\r\\n  ],\\r\\n  \\\"apis\\\": [\\r\\n    {\\r\\n      \\\"path\\\": \\\"\\/store\\/order\\/{orderId}\\\",\\r\\n      \\\"operations\\\": [\\r\\n        {\\r\\n          \\\"method\\\": \\\"GET\\\",\\r\\n          \\\"summary\\\": \\\"Find purchase order by ID\\\",\\r\\n          \\\"notes\\\": \\\"For valid response try integer IDs with value <= 5. Anything above 5 or nonintegers will generate API errors\\\",\\r\\n          \\\"type\\\": \\\"Order\\\",\\r\\n          \\\"nickname\\\": \\\"getOrderById\\\",\\r\\n          \\\"authorizations\\\": {},\\r\\n          \\\"parameters\\\": [\\r\\n            {\\r\\n              \\\"name\\\": \\\"orderId\\\",\\r\\n              \\\"description\\\": \\\"ID of pet that needs to be fetched\\\",\\r\\n              \\\"required\\\": true,\\r\\n              \\\"type\\\": \\\"string\\\",\\r\\n              \\\"paramType\\\": \\\"path\\\"\\r\\n            }\\r\\n          ],\\r\\n          \\\"responseMessages\\\": [\\r\\n            {\\r\\n              \\\"code\\\": 400,\\r\\n              \\\"message\\\": \\\"Invalid ID supplied\\\"\\r\\n            },\\r\\n            {\\r\\n              \\\"code\\\": 404,\\r\\n              \\\"message\\\": \\\"Order not found\\\"\\r\\n            }\\r\\n          ]\\r\\n        },\\r\\n        {\\r\\n          \\\"method\\\": \\\"DELETE\\\",\\r\\n          \\\"summary\\\": \\\"Delete purchase order by ID\\\",\\r\\n          \\\"notes\\\": \\\"For valid response try integer IDs with value < 1000.  Anything above 1000 or nonintegers will generate API errors\\\",\\r\\n          \\\"type\\\": \\\"void\\\",\\r\\n          \\\"nickname\\\": \\\"deleteOrder\\\",\\r\\n          \\\"authorizations\\\": {\\r\\n            \\\"oauth2\\\": [\\r\\n              {\\r\\n                \\\"scope\\\": \\\"test:anything\\\",\\r\\n                \\\"description\\\": \\\"anything\\\"\\r\\n              }\\r\\n            ]\\r\\n          },\\r\\n          \\\"parameters\\\": [\\r\\n            {\\r\\n              \\\"name\\\": \\\"orderId\\\",\\r\\n              \\\"description\\\": \\\"ID of the order that needs to be deleted\\\",\\r\\n              \\\"required\\\": true,\\r\\n              \\\"type\\\": \\\"string\\\",\\r\\n              \\\"paramType\\\": \\\"path\\\"\\r\\n            }\\r\\n          ],\\r\\n          \\\"responseMessages\\\": [\\r\\n            {\\r\\n              \\\"code\\\": 400,\\r\\n              \\\"message\\\": \\\"Invalid ID supplied\\\"\\r\\n            },\\r\\n            {\\r\\n              \\\"code\\\": 404,\\r\\n              \\\"message\\\": \\\"Order not found\\\"\\r\\n            }\\r\\n          ]\\r\\n        }\\r\\n      ]\\r\\n    },\\r\\n    {\\r\\n      \\\"path\\\": \\\"\\/store\\/order\\\",\\r\\n      \\\"operations\\\": [\\r\\n        {\\r\\n          \\\"method\\\": \\\"POST\\\",\\r\\n          \\\"summary\\\": \\\"Place an order for a pet\\\",\\r\\n          \\\"notes\\\": \\\"\\\",\\r\\n          \\\"type\\\": \\\"void\\\",\\r\\n          \\\"nickname\\\": \\\"placeOrder\\\",\\r\\n          \\\"authorizations\\\": {\\r\\n            \\\"oauth2\\\": [\\r\\n              {\\r\\n                \\\"scope\\\": \\\"test:anything\\\",\\r\\n                \\\"description\\\": \\\"anything\\\"\\r\\n              }\\r\\n            ]\\r\\n          },\\r\\n          \\\"parameters\\\": [\\r\\n            {\\r\\n              \\\"name\\\": \\\"body\\\",\\r\\n              \\\"description\\\": \\\"order placed for purchasing the pet\\\",\\r\\n              \\\"required\\\": true,\\r\\n              \\\"type\\\": \\\"Order\\\",\\r\\n              \\\"paramType\\\": \\\"body\\\"\\r\\n            }\\r\\n          ],\\r\\n          \\\"responseMessages\\\": [\\r\\n            {\\r\\n              \\\"code\\\": 400,\\r\\n              \\\"message\\\": \\\"Invalid order\\\"\\r\\n            }\\r\\n          ]\\r\\n        }\\r\\n      ]\\r\\n    }\\r\\n  ],\\r\\n  \\\"models\\\": {\\r\\n    \\\"Order\\\": {\\r\\n      \\\"id\\\": \\\"Order\\\",\\r\\n      \\\"description\\\": \\\"an order in the system\\\",\\r\\n      \\\"properties\\\": {\\r\\n        \\\"id\\\": {\\r\\n          \\\"type\\\": \\\"integer\\\",\\r\\n          \\\"format\\\": \\\"int64\\\"\\r\\n        },\\r\\n        \\\"petId\\\": {\\r\\n          \\\"type\\\": \\\"integer\\\",\\r\\n          \\\"format\\\": \\\"int64\\\"\\r\\n        },\\r\\n        \\\"quantity\\\": {\\r\\n          \\\"type\\\": \\\"integer\\\",\\r\\n          \\\"format\\\": \\\"int32\\\"\\r\\n        },\\r\\n        \\\"status\\\": {\\r\\n          \\\"type\\\": \\\"string\\\",\\r\\n          \\\"description\\\": \\\"Order Status\\\",\\r\\n          \\\"enum\\\": [\\r\\n            \\\"placed\\\",\\r\\n            \\\" approved\\\",\\r\\n            \\\" delivered\\\"\\r\\n          ]\\r\\n        },\\r\\n        \\\"shipDate\\\": {\\r\\n          \\\"type\\\": \\\"string\\\",\\r\\n          \\\"format\\\": \\\"date-time\\\"\\r\\n        }\\r\\n      }\\r\\n    }\\r\\n  }\\r\\n}"
  },
  "ratings_count": 0,
  "title": "OMG its a dataset with a tail",
  "revision_id": "1f36361a-a9cf-498d-94e6-5af2431c98cd"
}

...