Here are some examples of sending API requests to Curiefense using curl.
This list is not meant to be exhaustive, and might not reflect recent changes to the API. For current and canonical information about API operations and data structures, the Swagger interface is recommended.
Operations on Configurations
Get the detailed list of existing configurations:
Copy curl -XGET $api_url/configs/
Retrieve a complete configuration:
Copy curl -XGET $api_url/configs/{config}/
Create a new configuration, name is in the posted data:
Copy curl -XPOST $api_url/configs/
Create a new configuration, name is provided and overrides posted data:
Copy curl -XPOST $api_url/configs/{config}/
Update an existing configuration:
Copy curl -XPUT $api_url/configs/{config}/
Delete a configuration:
Copy curl -XDELETE $api_url/configs/{config}/
Clone a configuration, new name is in POST data:
Copy curl -XPOST $api_url/configs/{config}/clone/
Clone a configuration, new name is in the URL:
Copy curl -XPOST $api_url/configs/{config}/clone/{new_name}/
Get all versions of a given configuration:
Copy curl -XGET $api_url/configs/{config}/v/
Retrieve a specific version of a configuration:
Copy curl -XGET $api_url/configs/{config}/v/{version}/
Create a new version for a configuration from an old version:
Copy curl -XPUT $api_url/configs/{config}/v/{version}/revert/
Format for full config dumps and batch updates:
Copy {
"config": { <fields of config metadata> }
"resources": {
"<resname>": [],
...
}
"blobs": {
"dataname": {"format":"<format of blob, ex: raw, base64, gzip+base64, etc.>",
"blob": "<blob>"
}
}
"delete_resources": {
"<resname>": {
"<resid>": true,
...
}
...
}
"delete_blobs": {
"<blobname>": true,
...
}
}
Operations on Documents
Retrieve the list of existing documents in this configuration:
Copy curl -XGET $api_url/configs/{config}/d/
Get a complete document:
Copy curl -XGET $api_url/configs/{config}/d/{document}/
Get a given version of a document:
Copy curl -XGET $api_url/configs/{config}/d/{document}/v/{version}/
Retrieve the existing versions of a given document:
Copy curl -XGET $api_url/configs/{config}/d/{document}/v/
Create a new complete document:
Copy curl -XPOST $api_url/configs/{config}/d/{document}/
Update an existing document:
Copy curl -XPUT $api_url/configs/{config}/d/{document}/
Delete/empty a document:
Copy curl -XDELETE $api_url/configs/{config}/d/{document}/
Create a new version for a document from an old version:
Copy curl -XPUT $api_url/configs/{config}/d/{document}/v/{version}/revert/
Operations on Entries
Retrieve the list of entries in a document:
Copy curl -XGET $api_url/configs/{config}/d/{document}/e/
Retrieve an entry from a document:
Copy curl -XGET $api_url/configs/{config}/d/{document}/e/{entry}/
Get the list of existing versions of a given entry in a document:
Copy curl -XGET $api_url/configs/{config}/d/{document}/e/{entry}/v/
Get a given version of a document entry:
Copy curl -XGET $api_url/configs/{config}/r/{document}/i/{entry}/v/{version}/
Create an entry in a document:
Copy curl -XPOST $api_url/configs/{config}/d/{document}/e/
Update an entry in a document:
Copy curl -XPUT $api_url/configs/{config}/d/{document}/e/{entry}/
Delete an entry from a document:
Copy curl -XDELETE $api_url/configs/{config}/d/{document}/e/{entry}/
Operations on Blobs
Retrieve the list of available blobs:
Copy curl -XGET $api_url/configs/{config}/b/
Retrieve a blob:
Copy curl -XGET $api_url/configs/{config}/b/{blob}/
Create a new blob:
Copy curl -XPOST $api_url/configs/{config}/b/{blob}/
Replace a blob with new data:
Copy curl -XPUT $api_url/configs/{config}/b/{blob}/
Delete a blob:
Copy curl -XDELETE $api_url/configs/{config}/b/{blob}/
Retrieve the list of versions of a given blob:
Copy curl -XGET $api_url/configs/{config}/b/{blob}/v/
Retrieve the given version of a blob:
Copy curl -XGET $api_url/configs/{config}/b/{blob}/v/{version}/
Create a new version for a blob from an old version:
Copy curl -XPUT $api_url/configs/{config}/b/{blob}/v/{version}/revert/