Skip to main content

Record

Records are the place where work gets done inside a Tape organization. Records can be created, retrieved, updated and deleted via the API.

Create a record

POSThttps://api.tapeapp.com/v1/record/app/{app_id}

To create a new record for the app with the specified app_id, issue a POST request to this endpoint. The POST body specifies has to contain the fields property with the key-value pairs of the field values to create for this record. The following query paramters are available:

Query paramTypeDescription
silentbooleanDo not generate notifications for this operation (default: false)
hookbooleanExecute webhooks for this operation (default: true)
workflowbooleanTrigger workflows for this operation (default: true)
➡️    Request
curl -X POST https://api.tapeapp.com/v1/record/app/1 \
-u user_key_replace_with_your_api_key: \
-H "Content-Type: application/json" \
--data '{
"fields": {
"first_name": "Adam Smith"
}
}'
⬅️    Response
{
"record_id": 1,
"title": "Adam Smith",
"created_on": "2022-03-01 12:00:00",
"fields": [
{
"field_id": 1,
"external_id": "full_name",
"label": "Full Name",
"type": "text",
"field_type": "single_text",
"values": [
{
"value": "Adam Smith"
}
]
}
]
}

The example above only specifies a single_text field value as part of the record creation. See the field value documentation section for examples of all supported field types.

Retrieve a record

GEThttps://api.tapeapp.com/v1/record/{record_id}

Retrieve the record with the specified record_id.

Query paramTypeDescription
include_deletedbooleanInclude records that are deleted but still accessible via a trash (default: false)
➡️    Request
curl https://api.tapeapp.com/v1/record/1 \
-u user_key_replace_with_your_api_key:
⬅️    Response
{
"record_id": 1,
"title": "Adam Smith",
"created_on": "2022-03-01 12:00:00",
"fields": [
{
"field_id": 1,
"external_id": "full_name",
"label": "Full Name",
"type": "text",
"field_type": "single_text",
"values": [
{
"value": "Adam Smith"
}
]
}
]
}

The example response above only contains a single_text field value. See the field value documentation section for examples of all supported field types.

Attempting to retrieve a deleted record returns the following error:

{
"status_code": 400,
"endpoint": "/v1/record/17",
"error_code": "record_deleted",
"error_message": "Record is deleted(17)!"
}

Update a record

PUThttps://api.tapeapp.com/v1/record/{record_id}

Updates the record with the specified record_id and returns the updated record. The following query paramters are available:

Query paramTypeDescription
silentbooleanDo not generate notifications for this operation (default: false)
hookbooleanExecute webhooks for this operation (default: true)
workflowbooleanTrigger Workflows for this operation (default: true)
➡️    Request
curl -X PUT https://api.tapeapp.com/v1/record/1 \
-u user_key_replace_with_your_api_key: \
-H "Content-Type: application/json" \
--data '{
"fields": {
"first_name": "Andrea Lim"
}
}'
⬅️    Response
{
"record_id": 1,
"title": "Andrea Lim",
"created_on": "2022-03-01 12:00:00",
"fields": [
{
"field_id": 1,
"external_id": "full_name",
"label": "Full Name",
"type": "text",
"field_type": "single_text",
"values": [
{
"value": "Andrea Lim"
}
]
}
]
}

The example above only specifies a single_text field value as part of the record update. See the field value documentation section for examples of all supported field types.

Delete a record

DELETEhttps://api.tapeapp.com/v1/record/{record_id}

Delete the record with the specified record_id. The following query paramters are available:

Query paramTypeDescription
silentbooleanDo not generate notifications for this operation (default: false)
hookbooleanExecute webhooks for this operation (default: true)
skip_trashbooleanDo not place the deleted record in any trashes. Instead, remove it permanently. (default: false)
➡️    Request
curl -X DELETE https://api.tapeapp.com/v1/record/1 \
-u user_key_replace_with_your_api_key:
⬅️    Response
{
"record_id": 1,
"title": "Adam Smith",
"created_on": "2022-03-01 12:00:00",
"deleted_on": "2022-03-01 13:00:00",
"fields": [
{
"field_id": 1,
"external_id": "full_name",
"label": "Full Name",
"type": "text",
"field_type": "single_text",
"values": [
{
"value": "Adam Smith"
}
]
}
]
}

If the record has already been deleted, the following error is returned:

{
"status_code": 400,
"endpoint": "/v1/record/1",
"error_code": "record_deleted",
"error_message": "Record is deleted(1)!"
}

Restore a record

POSThttps://api.tapeapp.com/v1/record/{record_id}/restore

Restore the record with the specified record_id. This is only allowed if the record is in a trash you have access to. The following query paramters are available:

Query paramTypeDescription
silentbooleanDo not generate notifications for this operation (default: false)
hookbooleanExecute webhooks for this operation (default: true)
➡️    Request
curl -X POST https://api.tapeapp.com/v1/record/1/restore \
-u user_key_replace_with_your_api_key:
⬅️    Response
{
"record_id": 1,
"title": "Adam Smith",
"created_on": "2022-03-01 12:00:00",
"fields": [
{
"field_id": 1,
"external_id": "full_name",
"label": "Full Name",
"type": "text",
"field_type": "single_text",
"values": [
{
"value": "Adam Smith"
}
]
}
]
}

Retrieve records for an app

GEThttps://api.tapeapp.com/v1/record/app/{app_id}

Retrieve records for the app with the specified app_id:

➡️    Request
curl https://api.tapeapp.com/v1/record/app/1?limit=2 \
-u user_key_replace_with_your_api_key:
⬅️    Response
{
"total": 2,
"cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJibGFiRGVmSWQiOjgsInZhbHVlcyI6WzE1OV0sImV4cCI6MTY1MDYxODc3OH0.iY5TnLSBDGCnFXbStcrLPTmP6MATnS_JKywbvC4tx3g",
"records": [
{
"record_id": 2,
"title": "Adam Smith",
"created_on": "2022-03-23 08:48:42",
"app": {
"app_id": 1,
"icon": "event_available",
"name": "Contacts",
"record_name": "Contact",
"workspace_id": 1
},
"fields": [
{
"field_id": 1,
"external_id": "full_name",
"label": "Full Name",
"type": "text",
"field_type": "single_text",
"values": [
{
"value": "Adam Smith"
}
]
}
]
},
{
"record_id": 1,
"title": "Andrea Lim",
"created_on": "2022-03-23 08:43:03",
"app": {
"app_id": 1,
"icon": "event_available",
"name": "Contacts",
"record_name": "Contact",
"workspace_id": 1
},
"fields": [
{
"field_id": 1,
"external_id": "full_name",
"label": "Full Name",
"type": "text",
"field_type": "single_text",
"values": [
{
"value": "Andrea Lim"
}
]
}
]
}
]
}

Query Parameters

ParameterType TypeMinMax
limitintegerNumber of records to return. Defaults to 50.0500
cursorstringCursor for pagination--
sort_bystringExternal ID of the field that should be sorted by.--
POSThttps://api.tapeapp.com/v1/record/app/{app_id}/ref/{ref_app_id}

Retrieve related records for the app with the specified app_id and the records with IDs 100 and 101 provided via the recordIds array inside the request body.:

➡️    Request
curl -X POST https://api.tapeapp.com/v1/record/app/1/ref/2?limit=10 \
-u user_key_replace_with_your_api_key: \
-H "Content-Type: application/json" \
--data '{ "recordIds": [100, 101], "direction": "forward" }'

⬅️    Response
{
"total": 2,
"records": [
{
"record_id": 2,
"title": "Adam Smith",
"created_on": "2022-03-23 08:48:42",
"app": {
"app_id": 2,
"icon": "event_available",
"name": "Contacts",
"record_name": "Contact",
"workspace_id": 1
},
"fields": [
{
"field_id": 1,
"external_id": "full_name",
"label": "Full Name",
"type": "text",
"field_type": "single_text",
"values": [
{
"value": "Adam Smith"
}
]
}
]
},
{
"record_id": 1,
"title": "Andrea Lim",
"created_on": "2022-03-23 08:43:03",
"app": {
"app_id": 2,
"icon": "event_available",
"name": "Contacts",
"record_name": "Contact",
"workspace_id": 1
},
"fields": [
{
"field_id": 1,
"external_id": "full_name",
"label": "Full Name",
"type": "text",
"field_type": "single_text",
"values": [
{
"value": "Andrea Lim"
}
]
}
]
}
]
}

Query Parameters

ParameterType TypeMinMax
limitintegerNumber of records to return. Defaults to 50.0500

Request Body Parameters

ParameterType Type
directionstringDirection of the returned relations. Possible values are forward, reverse and both.
recordIdsinteger[]IDs of the records for which related records should be returned. All IDs need to belong to records of the same App with ID app_id.
relationFieldIdsinteger[]IDs of the relation fields, for which related records should be returned. Optional.

Find relatable records for a relation field

GEThttps://api.tapeapp.com/v1/record/field/{field_id}/find

Find records that can be related for the relation field (single or multi) with the specified field_id, in this case there is an app relation for that field to the app Contacts with app_id 1.

➡️    Request
curl https://api.tapeapp.com/v1/record/field/1/find?text=adam \
-u user_key_replace_with_your_api_key:
⬅️    Response
{
"total": 2,
"cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJibGFiRGVmSWQiOjgsInZhbHVlcyI6WzE1OV0sImV4cCI6MTY1MDYxODc3OH0.iY5TnLSBDGCnFXbStcrLPTmP6MATnS_JKywbvC4tx3g",
"records": [
{
"record_id": 2,
"title": "Adam Smith",
"created_on": "2022-03-23 08:48:42",
"app": {
"app_id": 1,
"icon": "event_available",
"name": "Contacts",
"record_name": "Contact",
"workspace_id": 1
}
}
]
}

Query Parameters

ParameterType TypeMinMax
textstringThe text to search for--