diff --git a/src/docs/version_001/docsStructure.ts b/src/docs/version_001/docsStructure.ts index 1809880..6a443a1 100644 --- a/src/docs/version_001/docsStructure.ts +++ b/src/docs/version_001/docsStructure.ts @@ -176,6 +176,12 @@ export const versionOne: DocsStructure = { copy: 'copy.md', example: 'example.md', }, + { + title: 'Delete Record', + folder: 'delete_record', + copy: 'copy.md', + example: 'example.md', + }, ], }, { diff --git a/src/docs/version_001/resources/records/add_record/example.md b/src/docs/version_001/resources/records/add_record/example.md index 7aa3ab9..50ad27e 100644 --- a/src/docs/version_001/resources/records/add_record/example.md +++ b/src/docs/version_001/resources/records/add_record/example.md @@ -4,6 +4,7 @@ ```bash curl --location 'https://api.onspring.com/v1/Records/195' \ +--header 'X-ApiKey: 000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000' \ --header 'Content-Type: application/json' \ --data '{ "FieldData": { diff --git a/src/docs/version_001/resources/records/delete_record/copy.md b/src/docs/version_001/resources/records/delete_record/copy.md new file mode 100644 index 0000000..a5b7cb7 --- /dev/null +++ b/src/docs/version_001/resources/records/delete_record/copy.md @@ -0,0 +1,25 @@ +# Delete Record {% #delete-record %} + +This endpoint allows you to delete a record in an app. If the record deletion is successful a `204` response will be returned with an empty body. + +## Path Parameters + +{% table %} + +- Parameter Name +- Data Type +- Description + +--- + +- appId +- `number` +- The id of the app or survey that contains the record to be deleted. + +--- + +- recordId +- `number` +- The id of the record that will be deleted. + +{% /table %} diff --git a/src/docs/version_001/resources/records/delete_record/example.md b/src/docs/version_001/resources/records/delete_record/example.md new file mode 100644 index 0000000..cb988e1 --- /dev/null +++ b/src/docs/version_001/resources/records/delete_record/example.md @@ -0,0 +1,21 @@ +# Delete a record in an app + +{% code method="DELETE" heading="/Records/{appId}/{recordId}" defaultLanguage="bash" %} + +```bash +curl --location --request DELETE 'https://api.onspring.com/v1/Records/195/12' \ +--header 'X-ApiKey: 000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000' +``` + +```csharp +using Onspring.API.SDK.Helpers; + +var httpHelper = new HttpHelper( + config.baseUrl, + config.apiKey +); + +var result = httpHelper.DeleteAppRecord(195, 12); +``` + +{% /code %} diff --git a/src/docs/version_001/resources/records/update_record/copy.md b/src/docs/version_001/resources/records/update_record/copy.md index b36e518..fa061b8 100644 --- a/src/docs/version_001/resources/records/update_record/copy.md +++ b/src/docs/version_001/resources/records/update_record/copy.md @@ -14,7 +14,7 @@ This endpoint allows you to update a record in an app. If the record update is s - appId - `number` -- The id of the app or survey that the record will be added to. +- The id of the app or survey that contains the record to be updated. --- diff --git a/src/docs/version_001/resources/records/update_record/example.md b/src/docs/version_001/resources/records/update_record/example.md index 4b51c79..97ead92 100644 --- a/src/docs/version_001/resources/records/update_record/example.md +++ b/src/docs/version_001/resources/records/update_record/example.md @@ -1,9 +1,10 @@ -# Add a record in an app +# Update a record in an app {% code method="PUT" heading="/Records/{appId}/{recordId}" defaultLanguage="bash" %} ```bash curl --location --request PUT 'https://api.onspring.com/v1/Records/195/12' \ +--header 'X-ApiKey: 000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000' \ --header 'Content-Type: application/json' \ --data '{ "FieldData": {