forio Toggle navigation

Data API

Epicenter's Data API allows you to create, access, and manipulate data related to any of your projects.

Data are organized in collections. Each collection belongs to a particular project in your team or personal account.

Each collection contains a document; each element of this top-level document is a JSON object. These JSON objects can include any fields you define (including arrays and objects). Each document in a collection automatically includes the metadata id and lastModified.

The Data API supports the following methods:

POST: Writing (Creating) Data

Use the Data API POST method to create a collection and add a new top-level document to it. You can also use POST to add data to an array within an existing element of a collection.

Adding a New Document to a Collection


Method: POST

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}

Headers: Content-Type: application/json, Authorization: Bearer{access token}

Body: JSON object, e.g. { "fieldName1": "fieldValue1", "fieldName2": "fieldValue2"}.

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: The new document.


Example:

curl -X POST \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/configuration-info' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9' \
    --data '{"userInfoRecorded": "yes", "widgetInfo": { "color": "blue", "size": "M"} }'

Example Response:

{
    "id": "6a979d0b-c4c1-11e3-a410-d00ddfd84232",
    "lastModified": "2014-04-15T17:14:34.735Z",
    "userInfoRecorded": "yes",
    "widgetInfo": {
        "color": "blue",
        "size": "M"
    }
}

Notes:

  • The id for each new document in the collection is automatically generated. Use the PUT request if you want to specify the id yourself.
  • In the request body, any valid JSON object is acceptable. Each document in a collection can include any fields you define, including arrays and objects.
    • In particular, using quotes ensures that the field is a string; otherwise, the field is treated as a number or boolean. For example, "stringField": "123", but "numberField": 123.
    • The name data is a reserved word. Top-level fields defined in the collection may not be named data.
  • Collections are not required to have identically structured documents (although they usually do). In other words, you could repeatedly POST to the same collection with unrelated bodies for each request, creating multiple documents in your collection that all have different structures. However, most of the time you POST to a particular collection using the same fields for every document, and only the values are different.
  • Collection names are limited to 256 characters.
  • The lastModified field is in ISO 8601 format.
  • If this project is using channels and someone has subscribed to this collection, they receive a message when this data is created.



Adding Data to an Existing Array Variable within a Collection


Method: POST

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}/{document id}/{name of the array}

Headers: Content-Type: application/json, Authorization: Bearer{access token}

Body: newArrayElement

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: The updated array.


Example:

First, create a collection with an array. (Using the PUT request allows you to specify the document id, "scoring".)

curl -X PUT \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/admin-info/scoring' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9' \
    --data '{ "high-scores": [85, 92, 87, 94] }'

Then, use POST to add data to an existing array:

curl -X POST \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/admin-info/scoring/high-scores' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9' \
    --data '108'

Example Response:

[ 85, 92, 87, 94, 108 ]    

PUT: Writing (Creating or Updating) Data

Use the Data API PUT method to replace the collection, document, or field specified in the URI, or to create a new one if one of that name does not exist.

Adding or Replacing a Single Document in a Collection


Method: PUT

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}/{document id}

Headers: Content-Type: application/json, Authorization: Bearer{access token}

Body: JSON object, e.g. { "fieldName1": "fieldValue1", "fieldName2": "fieldValue2"}.

Return Status: 200 (successful replacement), 201 (successful creation), 400 (invalid account id, project id, or invalid syntax)

Return Body: The new or updated document.


Example:

curl -X PUT \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses/user1' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9' \
    --data '{"question1": "yes", "question2": "no", "question3": "maybe"}'

Example Response:

{
    "id": "user1",
    "lastModified": "2014-06-09T20:05:00.889Z",
    "question1": "yes",
    "question2": "no",
    "question3": "maybe"
}

Notes:

  • The PUT request allows you to specify the id for the element in the collection (unlike the POST request). The id must be unique within this account (team or personal account) and project.
  • In the request body, any valid JSON object is acceptable. Each document in a collection can include any fields you define, including arrays and objects.
    • In particular, using quotes ensures that the field is a string; otherwise, the field is treated as a number or boolean. For example, "stringField": "123", but "numberField": 123.
    • The name data is a reserved word. Top-level fields defined in the collection may not be named data.
  • Collections are not required to have identically structured documents (although they usually do). In other words, you could repeatedly PUT new data in the same collection with unrelated bodies for each request, creating multiple documents in your collection that all have different structures. However, most of the time you PUT to a particular collection using the same fields for every document, and only the values are different.
  • Collection names are limited to 256 characters.
  • The lastModified field is in ISO 8601 format.
  • If this project is using channels and someone has subscribed to this collection, they receive a message when this data is updated.



Adding or Replacing Multiple Documents in a Collection


Method: PUT

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}

Headers: Content-Type: application/json, Authorization: Bearer{access token}

Body: JSON array of documents. Each document is a JSON object and is required to have an id field. For example,

[ { "id": "myFirstElementId", "fieldName1": "fieldValue1", "fieldName2": "fieldValue2" }, { "id": "mySecondElementId", "fieldName1": "fieldValue1", "fieldName2": "fieldValue2" } ] 

Return Status: 200 (successful replacement), 201 (successful creation), 400 (invalid account id, project id, or invalid syntax)

Return Body: An array of the new or updated documents.


Example:

curl -X PUT \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses/' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9' \
    --data '[{"id": "user2", "question1": "yes", "question2": "no", "question3": "maybe"}, {"id": "user3", "question1": "no", "question2": "yes", "question3": "sometimes"}]'

Example Response:

[
    {
        "id": "user2",
        "lastModified": "2014-06-09T20:10:31.249Z",
        "question1": "yes",
        "question2": "no",
        "question3": "maybe"
    },
    {
        "id": "user3",
        "lastModified": "2014-06-09T20:10:31.254Z",
        "question1": "no",
        "question2": "yes",
        "question3": "sometimes"
    }
]

Notes:

  • The PUT request allows you to specify the id for the element in the collection (unlike the POST request). The id must be unique within this account (team or personal account) and project.
  • The request body must be an array of the documents being added to (or replacing existing documents in) the collection. Each array element can contain any valid JSON object, however, each must have an id element.
  • Collections are not required to have identically structured documents (although they usually do). In other words, each element of the array in your PUT request could have a different structure, creating multiple documents in your collection that all have different structures. However, most of the time you PUT to a particular collection using the same fields for every document, and only the values are different.
  • Collection names are limited to 256 characters.
  • The lastModified field is in ISO 8601 format.
  • If this project is using channels and someone has subscribed to this collection, they receive a message when this data is updated.



Adding or Replacing a Field within a Document


Method: Method: PUT

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}/{document id}/{element name}

Headers: Content-Type: application/json, Authorization: Bearer{access token}

Body: newFieldValue

Return Status: 200 (successful replacement), 201 (successful creation), 400 (invalid account id, project id, or invalid syntax)

Return Body: The value of the new or updated field.


Example:

curl -X PUT \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses/user1/question3' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9' \
    --data '"only on Tuesdays"'

Example Response:

"only on Tuesdays"

Notes

  • The PUT request allows you to specify the id for the element in the collection (unlike the POST request). The id must be unique within this account (team or personal account) and project.
  • Notice that the name of a field within a document in the collection can either be part of the URI or part of the request body.
    • If it is part of the URI, just the value of this field is updated.
    • If it is part of the request body (and only the element id is part of the URI), then all of the data within the element is replaced by this request body. This is not usually what you want!
  • Your PUT request must have a body. The newFieldValue in the body cannot be blank. However, it can be null. (Or, you can delete the element.)
  • If this project is using channels and someone has subscribed to this collection, they receive a message when this data is updated.

GET: Reading Data

Use the Data API GET method to retrieve data. This request retrieves all or part of the collection, depending on how you specify the request.

Reading a Collection


Method: GET

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}

Headers: Authorization: Bearer{access token}

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: An array of the documents in the collection.


Example:

curl -G \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/configuration-info' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

[
    {
        "id": "6a979d0b-c4c1-11e3-a410-d00ddfd84232",
        "lastModified": "2014-04-15T17:14:34.735Z",
        "userInfoRecorded": "yes",
        "widgetInfo": {
            "color": "blue",
            "size": "M"
        }
    },
    // other elements in this collection, if any
]

Paging: Retrieving Many Records at Once

When you use the GET method for an API, your request may return many records at once.

The default page size is 100 (for most APIs) or 1000 (for the Data API). You can limit the number of records returned by adding the Range header.


Method: GET

URI: Any Epicenter API call

Headers: Range: records {i}-{j}

Return Status:

  • 200: Successfully retrieved all records
  • 206: Successfully retrieved the partially complete response, for example if you request records 0-20 and there are 35 records
  • 416: No records are found in a given search range (e.g. Range: records 10-15 when there are only 8 records)

Response Headers:

Whether or not you add the Range header to your request, the response header contains:

Content-Range: records i-j/k

where

  • i is the index of the first record returned
  • j is the index of the last record returned
  • k is the total number of records in the result set, or * if that number is computationally infeasible (for example, because you are querying across multiple projects)

For example, Content-Range: records 0-9/57 or Content-Range: records 20-29/*.

Response Body: An array of records. The array includes only those records indicated in the Content-Range header.


Example:

curl -G \
    'https://api.forio.com/v2/EpicenterAPI' \
    --header 'Range: records i-j'

Notes:

  • If no records are returned, the response body is empty.

  • If you leave off the start index, this is considered an implied start index of 0 rather than an invalid range. The response header includes status code of 200 or 206 depending on the ending index.

  • This use of the Range header is part of the RFC 2616 (see details in Section 14.16 and 14.35).



Reading a Document in a Collection


Method: GET

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}/{document id}

Headers: Authorization: Bearer{access token}

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: The requested document.


Example:

curl -G \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses/user1' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

{
    "id": "user1",
    "question1": "yes",
    "question2": "no",
    "question3": "maybe"
}



Reading a Field Value from a Document


Method: GET

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}/{document id}/{field name}

Headers: Authorization: Bearer{access token}

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: The field value.


Example:

curl -G \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses/user1/question3' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

"maybe"



Including and Excluding Data


Method: GET

URI (for including data): /v2/data/{id of your team or personal account}/{project id}/{collection name}/{optional document id}/?include={comma-separated list of field names}

URI (for excluding data): /v2/data/{id of your team or personal account}/{project id}/{collection name}/{optional document id}/?exclude={comma-separated list of field names}

Headers: Authorization: Bearer{access token}

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: The requested document, with fields as requested using the include or exclude query parameters. The id field is always included.


Example:

curl -G \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses/user1?include=question1,question2' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

{
    "id": "user1",
    "question1": "yes",
    "question2": "no"
}

Notes:

  • When adding the include query parameter, only the id and requested fields are included. For example, ?include=question2 returns the id and question2 fields for each element of the collection; other fields such as question1 and lastModified are not part of the response.
    • Note that if a particular element does not have the included field, that element is still part of the response (with only the id field included in the response). In other words, this query parameter is about the amount of data in the response; it does NOT filter the collection.
  • You can use include multiple times in one request, either by passing the include parameter repeatedly, or by using commas to separate the fields. For example, ?include=question1&include=question2 is equivalent to ?include=question1,question2.
  • You can also use exclude multiple times in one request, either by passing the exclude parameter repeatedly, or by using commas to separate the fields.
  • You cannot combine the include and exclude parameters in the same request.



Searching for a Document by ID


Method: GET

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}?id={document id}&id={document id}

Headers: Authorization: Bearer{access token}

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: An array of the requested documents.


Example:

curl -G \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?id=user2&id=user3' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

[
    {
        "id": "user2",
        "question1": "yes",
        "question2": "no",
        "question3": "maybe"
    },
    {
        "id": "user3",
        "question1": "no",
        "question2": "yes",
        "question3": "sometimes"        
    }
]



Searching for Data in Specific Fields in a Collection: Exact Matching


Method: GET

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}?{field name}={field value}&{field name}={field value}

URI (alternate format): /v2/data/{id of your team or personal account}/{project id}/{collection name}?q={"{field name}" :"{field value}", "{field name}": "{field value}"}

Headers: Authorization: Bearer{access token}

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: An array of documents matching the search criteria.


Example:

curl -G \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?question2=yes' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

curl -G \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?q={"question2":"yes"}' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

[
    {
        "id": "user3",
        "question1": "no",
        "question2": "yes",
        "question3": "sometimes"    
    }
]

Notes:

  • When searching, the Data API tries to guess at the data type in order to find a match. If you are searching specifically for a string value, use quotes.
    • For example, the following requests all search for strings in the field question2:
      • https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?question2=yes
      • https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?question2="yes"
      • https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?question2="true"
      • https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?question2="123"
      • https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?question2="null"
    • In contrast, the following request searches for the number 123 in the field question2:
      • https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?question2=123
    • And the following request searches for the boolean value true in the field question2:
      • https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?question2=true
    • And the following request searches for the value null (NOT for the string "null") in the field question2:
      • https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?question2=null



Searching for Data in Specific Fields in a Collection with Comparison Operators


Method: GET

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}?q={"{field name}" : {"{comparison operator}": "{field value}" } }

Headers: Authorization: Bearer{access token}

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: An array of documents matching the search criteria.


Example:

curl -G \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?q={"question5": {"$gt": 15}}' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

[
    {
        "id": "user4",
        "question1": "yes",
        "question2": "yes",
        "question3": "always",
        "question5": 18    
    }
]

Notes:

  • The supported comparison operators are:

    • $gt: Matches values that are greater than the value specified
    • $gte: Matches values that are greater than or equal to the value specified
    • $in: Matches any of the values that exist in an array specified (for example: ?q={ "question1": {"$in":["always", "never"]} })
    • $lt: Matches values that are less than the value specified
    • $lte: Matches values that are less than or equal to the value specified
    • $ne: Matches values that are not equal to the value specified
    • $nin: Matches values that do not exist in an array specified (for example: ?q={ "question1": {"$nin":[2,4,6,8]} })

      See the MongoDB comparison operator reference for additional details.

  • When searching, the Data API tries to guess at the data type in order to find a match. If you are searching specifically for a string value, use quotes.



Searching for Data in Specific Fields in a Collection with Logical Operators


Method: GET

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}?q={"{logical operator}" : [ {"{field name}": "{field value}", {"{field name}": "{field value}"} ] }

Headers: Authorization: Bearer{access token}

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: An array of documents matching the search criteria.


Example:

curl -G \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?q={"$and":[{"question5":{"$gt":15}},{"question5":{"$lt":30}}]}' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

[
    {
        "id": "user3",
        "question1": "no",
        "question2": "yes",
        "question3": "sometimes"        
    }
]

Notes:

  • The supported logical operators are:

    • $or: Matches values that match any condition.
    • $and: Matches values that match all conditions.
    • $not: Returns values that do not match the condition.
    • $nor: Returns values that fail to match both conditions.

      See the MongoDB logical operator reference for additional details.

  • As you can see by comparing the URI in the reference information and the request in the example, you can substitute any instance of "{field value}" with { "$op": "field value" }.

  • When searching, the Data API tries to guess at the data type in order to find a match. If you are searching specifically for a string value, use quotes.



Searching for Data in Specific Fields in a Collection with Regular Expressions


Method: GET

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}?q={"{field name}" : { $regex: "{ {regular expression to match} } }

Headers: Authorization: Bearer{access token}

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: An array of documents matching the search criteria.


Example:

curl -G \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?q={"question3": { $regex: "some*"}}' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

[
    {
        "id": "user3",
        "question1": "no",
        "question2": "yes",
        "question3": "sometimes"        
    },
    {
        "id": "user8",
        "question1": "yes",
        "question2": "yes",
        "question3": "sometimes, but not very often"
    }
]

Notes:

  • The $regex operator provides regular expression capabilities for pattern matching strings in queries, using Perl-compatible regular expressions ("PCRE").

    See the MongoDB $regex reference for additional details.

  • When searching, the Data API tries to guess at the data type in order to find a match. If you are searching specifically for a string value, use quotes.



Sorting the Elements of a Collection


Method: GET

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}?sort={field name}&direction={asc or desc}

Headers: Content-Type: application/json, Authorization: Bearer{access token}

Return Status: 200 (successful response), 400 (invalid account id, project id, or invalid syntax)

Return Body: A sorted array of documents.


Example:

curl -G \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses?sort=question5&direction=asc&include=question5' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

[
    {
        "id": "user8",
        "question5": 10
    },
    {
        "id": "user5",
        "question5": 15        
    },
    {
        "id": "user4",
        "question5": 18
    }
]

Notes:

  • Specify the direction of the sort using the query parameter direction and a value of either asc (ascending) or desc (descending), for example: ?direction=desc.
  • You can also use advanced sorting by including a JSON object, rather than a field name, with the sort query parameter. In this JSON object, the field names are the keys and the values are 1 for an ascending sort and -1 for a descending sort. This is also an easy way to sort by multiple fields at once.

    Use the format ?sort={"fieldName1": 1, "fieldName2": -1}. For example, ?sort={"lastModified": -1, "score": 1}.

  • For all collections, the default is to sort by lastModified, descending, which is equivalent to ?sort=lastModified&direction=desc or ?sort={"lastModified":-1}.

DELETE: Removing Data

Use the Data API DELETE method to remove data from a collection, including fields from an element,elements from a collection, or an entire collection from your project.

If this project is using channels and someone has subscribed to this collection, they receive a message when this data is deleted.

Deleting a Document from a Collection


Method: DELETE

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}/{document id}

Headers: Authorization: Bearer{access token}

Return Status: 204 (successful response), 400 (invalid account id, project id, or invalid syntax), 404 (document not found)


Example:

curl -X DELETE \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/configuration-info/6a979d0b-c4c1-11e3-a410-d00ddfd84232' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

There is no response body for a DELETE request.



Deleting Multiple Documents from a Collection


Method: DELETE

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}?id={document id}&id={document id}

Headers: Authorization: Bearer{access token}

Return Status: 204 (successful response), 400 (invalid account id, project id, or invalid syntax)


Example:

curl -X POST \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/user-details?id=user1&id=user2' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

There is no response body for a DELETE request.



Deleting a Field within a Document


Method: DELETE

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}/{document id}/{field name}

Headers: Authorization: Bearer{access token}

Return Status: 204 (successful response), 400 (invalid account id, project id, or invalid syntax)


Example:

curl -X DELETE \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses/user1/question4' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

There is no response body for a DELETE request.



Deleting an Entire Collection


Method: DELETE

URI: /v2/data/{id of your team or personal account}/{project id}/{collection name}

Headers: Authorization: Bearer{access token}

Return Status: 204 (successful response), 400 (invalid account id, project id, or invalid syntax)


Example:

curl -X DELETE \
    'https://api.forio.com/v2/data/acme-simulations/supply-chain-game/survey-responses/' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9'

Example Response:

There is no response body for a DELETE request.