You are currently offline.

API Reference

The Luffa API is a RESTful web service that provides programmable access to the Luffa application and its data over HTTPS. Using this API, you can easily create, inspect, and update object such as spaces, captures, and users.

Luffa's data consists of objects of different types: users, organizations, spaces, labels, captures, moments, attachments, participants, etc. Conforming to the REST principles, the API uses resource-oriented URLs to identify these objects and operates on them using the standard HTTP verbs GET, POST, PUT, PATCH, and DELETE.

All API responses return data in the JSON data format. This is also true for error responses, which additionally use HTTP response codes to indentify API error types.

Using the API requires authenticating using an API key. You can obtain an API key by contacting us.

The following documentation includes several examples; in order to try out these examples on a live connection, just replace the example API key with your own key.

Authentication

The Luffa API uses a token-based HTTP Authentication scheme.

You authenticate your request by including your API token in the Authorization HTTP header. The token should be prefixed by the word Token, with whitespace separating the two.

API requests that do not include the Authorization header will fail with a 401 Unauthorized status code.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail.

Example Authorization HTTP Header

  
Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df
  

Replace f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df with your API token.

Errors

The Luffa API uses standard HTTP response status codes to confirm that an API request was successful or describe the kind of error or failure that occurred. Codes in the 2XX range denote success; codes in the 4XX range indicate an error on the part of the requesting client; those in the 5XX range indicate an error on the part of our server.

Client error responses also include a JSON body describing the error in more detail.

The Error Response Body

Field Description
status_code The HTTP status code returned with the error response.
message A detailed description of the error. This message is the same as errors.message when there is only one error; otherwise, it is a more general description of the errors as a whole.
errors An array of error objects. In most cases, this array will only contain one object; however, parameter validation may generate more than one error.
errors.reason A short string identifying the kind of error; it is meant for client code error handling.
errors.message A detailed description of the error.
errors.source_type The type of the source of the error. For example, an error in a query parameter would have source type parameter. Possible source types are: header, parameter, and request. Not all errors include this field.
errors.source The source of the error. For example, an invalid value in a query parameter would have a source equal to the name of that query parameter. Not all errors include this field.

HTTP Status Codes

Code Description
200 OK Standard code returned for successful requests.
201 Created The request was successful and a new object was created. This is the code returned for most POST requests.
204 No Content The request was successful, but no response data needs to be returned. Generally this code is returned for DELETE requests.
400 Bad Request The request could not be processed due to a client error; most often this is due to invalid or missing request parameters.
401 Unauthorized The server could not authenticate the request. Either the provided API key was incorrect or expired or authentication credentials were simply not included.
403 Forbidden The request is valid, but the authentication credentials provided with the request do not grant access to the requested object.
404 Not Found The requested object was not found.
405 Method Not Allowed The request method is not supported by the addressed resource. For example, DELETE /api/spaces would return an error because that resource only supports GET and POST.
406 Not Acceptable The requested resource is not capable of generating a response in a format listed in the Accept header of the request.
429 Too Many Requests The client has sent too many requests in a given amount of time.
500 Internal Server Error The server encountered an unexpected error; most likely this is due to a programming error on our side; we log these errors and generally fix them within a very short time.
503 Service Unavailable The server is currently unavailable, generally because it is overloaded or down for maintenance. This condition is temporary, you should resubmit your request after a short wait.

Example Error Response

        HTTP/1.1 405 Method Not Allowed

        
{
  "status_code": 405, 
  "message": "Invalid method: 'PUT'. Allowed values: [GET, POST, HEAD, OPTIONS]", 
  "errors": [
    {
      "source_type": "request", 
      "reason": "method_not_allowed", 
      "message": "Invalid method: 'PUT'. Allowed values: [GET, POST, HEAD, OPTIONS]", 
      "source": "method"
    }
  ]
}
        

    

Pagination

All API resources have a list method to retrieve objects in bulk. For example, you can list spaces and list users.

When a list of objects is long, the response from a list request is broken down into several pages. You can control the pagination process using the offset and limit query parameters.

HTTP Response Headers

Header Description
X-Total-Count A custom header giving the total number of objects matching the query criteria.
Link A standard header including a list of navigation links; the possible link relationships are: first, last, next, and prev.

List Query Parameters

Parameter Default Description
offset 0 Return results starting from the given offset (i.e. skip offset results before returning matching objects)
limit 100 The maximum number of results to return in one page; the actual number of results returned will be less that the requested one only if the total number of objects matching the query criteria is less than that

Example Request

    
curl -X GET 'https://okluffa.com/api/participants/?limit=2&offset=0' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/participants/?limit=2>; rel="first", <https://okluffa.com/api/participants/?limit=2&offset=4>; rel="last", <https://okluffa.com/api/participants/?limit=2&offset=2>; rel="next"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4999
X-Rate-Limit-Reset: 900.0
X-Total-Count: 5
[ { "url": "https://okluffa.com/api/participants/14665/", "user": "https://okluffa.com/api/users/8405/", "permissions": [], "id": 14665, "space": "https://okluffa.com/api/spaces/11255/" }, { "url": "https://okluffa.com/api/participants/14664/", "user": "https://okluffa.com/api/users/8403/", "permissions": [ "participant-delete" ], "id": 14664, "space": "https://okluffa.com/api/spaces/11255/" } ]

Sorting

You can use the sort query parameter of the list methods to control the order in which lists of objects are sorted.

To sort the objects by the value of a particular field, just specify the name of that field as the sorting criteria; in general, values are sorted in increasing order; to sort them in decreasing order, just prefix the field name with a minus sign (-).

When multiple objects share the same value of a field, their sorting order according to that field is undefined; if you need to control the ordering of these groups of objects, you can use one or more secondary sorting fields; just specify a list of sorting fields, separated by commas, starting with the primary field.

The fields of an object that you can sort upon depend on the type of object and are described in the documentation section for that object list method. For example, the Space objects can be ordered by the values of the id, name, created, creator, and modified fields.

Example Sorting Request

    
curl -X GET 'https://okluffa.com/api/spaces/?sort=creator%2C-created' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

This request will return spaces sorted by creator and spaces by the same creator will be sorted by creation date, most recent first.

Expanding Objects

Many objects have fields that refer to other objects; for example, a space has a creator field that refers to a User object corresponding to the creator of that space. Normally, in an API response, a field refers to an object using the URL used to retrieve that object; however, you can expand that object inline using the expand query parameter.

To expand a particular field, just set the expand query parameter to the name of that field. To expand more than one field, use the expand parameter multiple times in the same request.

To expand all the fields of an object, use the * character.

The expansion works on deeply nested objects as well; you just need to use the dot-notation to specify the full path to the field you intend to expand.

Some objects have fields that refer to lists of other objects; for example, a space has a participants field that refers to a list of Participant objects corresponding to all the participants in that space. Normally, in an API response, this kind of field refers to a list using the URL (usually including query parameters) used to retrieve that list; when you expand the field inline, that URL will include a list of URLs, one for each object in the list. You expand this further by attaching .* to the field name; this will expand each of the URLs in the list and replace the initial list URL with a list of inline objects.

Finally, some objects have text fields that may be very long; for example, the note field of a Capture object may contain a very long description of the capture. Normally,the API response will only include a snippet for the text, but you can ask for the full text by expanding those fields.

The documentation of each object type explicitly marks the fields that can be expanded.

Example Request

    
curl -X GET 'https://okluffa.com/api/spaces/11255/?expand=creator&expand=captures&expand=participants.%2A' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4998
X-Rate-Limit-Reset: 899.09
{ "captures_modified": "2017-12-07T18:54:13.688719Z", "participants_modified": "2017-12-07T18:54:12.044126Z", "labels": "https://okluffa.com/api/labels/?space=11255", "name": "Luffa Memories", "creator": { "short_name": "jane", "url": "https://okluffa.com/api/users/8404/", "role": "member", "is_active": true, "email": "jane.doe@example.com", "last_login": null, "avatar": null, "full_name": "Jane Doe", "timezone": "America/Montreal", "permissions": [ "user-update" ], "id": 8404, "date_joined": "2017-12-07T18:54:10.397180Z" }, "url": "https://okluffa.com/api/spaces/11255/", "captures": [ "https://okluffa.com/api/captures/19620/", "https://okluffa.com/api/captures/19622/", "https://okluffa.com/api/captures/19621/" ], "public_url": "https://okluffa.com/spaces/11255/", "created": "2017-12-07T18:54:11.888236Z", "modified": "2017-12-07T18:54:11.888257Z", "participants_count": 3, "participants": [ { "url": "https://okluffa.com/api/participants/14665/", "user": "https://okluffa.com/api/users/8405/", "permissions": [], "id": 14665, "space": "https://okluffa.com/api/spaces/11255/" }, { "url": "https://okluffa.com/api/participants/14664/", "user": "https://okluffa.com/api/users/8403/", "permissions": [ "participant-delete" ], "id": 14664, "space": "https://okluffa.com/api/spaces/11255/" }, { "url": "https://okluffa.com/api/participants/14663/", "user": "https://okluffa.com/api/users/8404/", "permissions": [], "id": 14663, "space": "https://okluffa.com/api/spaces/11255/" } ], "captures_count": 3, "permissions": [ "capture-create", "moment-create", "label-create" ], "id": 11255, "description": "" }

Example Request

    
curl -X GET 'https://okluffa.com/api/captures/19619/?expand=note&expand=space.creator' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4997
X-Rate-Limit-Reset: 899.71
{ "views_count": 0, "creator": "https://okluffa.com/api/users/8403/", "public_image_url": "https://okluffa.com/captures/cover/19619/92a86658c325592a2bc446a6a536f68a/", "id": 19619, "attachments": "https://okluffa.com/api/attachments/?capture=19619", "space": { "captures_modified": "2017-12-07T18:54:13.216813Z", "participants_modified": "2017-12-07T18:54:11.766801Z", "labels": "https://okluffa.com/api/labels/?space=11254", "name": "Luffa User Experience", "creator": { "short_name": "john", "url": "https://okluffa.com/api/users/8403/", "role": "owner", "is_active": true, "email": "john.smith@example.com", "last_login": null, "avatar": { "original": "https://cdn.okluffa.com/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5.png", "thumbnail": "https://cdn.okluffa.com/CACHE/images/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5/71dcb121529435caa081b2a47b79fa36.jpg" }, "full_name": "John Smith", "timezone": "America/Montreal", "permissions": [ "user-update" ], "id": 8403, "date_joined": "2017-12-07T18:54:09.445216Z" }, "url": "https://okluffa.com/api/spaces/11254/", "captures": "https://okluffa.com/api/captures/?space=11254", "public_url": "https://okluffa.com/spaces/11254/", "created": "2017-12-07T18:54:11.759141Z", "modified": "2017-12-07T18:54:11.759159Z", "participants_count": 1, "participants": "https://okluffa.com/api/participants/?space=11254", "captures_count": 1, "permissions": [ "capture-create", "moment-create", "label-create", "participant-create", "space-update", "space-delete" ], "id": 11254, "description": "" }, "note": "Discuss this;\ndiscuss that.", "state": "", "transcribed": false, "location": null, "media_type": "", "meeting": null, "display_state": "", "kind_index": 1, "poster": null, "public_url": "https://okluffa.com/captures/19619/", "proxy": null, "offset": 0.0, "permissions": [ "capture-update", "capture-delete" ], "kind": "note", "language": "en", "created": "2017-12-07T18:54:12.089338Z", "url": "https://okluffa.com/api/captures/19619/", "title": "Meeting Agenda", "cover": null, "modified": "2017-12-07T18:54:13.216813Z", "shared": null }

Permissions

In order to help creating applications built on the API, each object in an API response includes a permissions field, listing the API methods the requesting user is allowed to use on the object.

This would allow an application to know whether an API request to update or delete an object would be allowed prior to submitting the actual request and without having to incur the cost of a preflight OPTION request.

The strings in the permissions list consist of the object name and the method name, separated by a dash; so, for example, space-delete would indicate that the requesting user can delete the Space object carrying that permission.

Permissions are in general related to update and delete methods; permissions for list and retrieve methods are not explicitly listed since the fact that the requesting user has already retrieved the object listing its permission means that the requesting user already has at least read-only access.

Some objects may return permissions related to the creation of other object types; this happens when the first objects are containers or owners of the latter objects; for example, a Space object may return a participant-create permission to indicate that the requesting user is allowed to add participants to that space.

The documentation of each object type explicitly lists the permissions that may be included with that object.

Example Permissions


    
{
  "permissions": [
    "capture-create", 
    "moment-create", 
    "label-create", 
    "participant-create", 
    "space-update", 
    "space-delete"
  ]
}
    

  

Example permissions field in a Space object (other fields omitted for clarity).

Versioning

You can require a particular version of the API by specifying the version as part of the media type in the Accept header.

Because the specification of the JSON media type does not include any additional parameters, you will have to use our vendor media type:

application/vnd.okluffa.luffa+json

The current (and only) version of the API is 1.0.

Example Accept HTTP Header

    
Accept: application/vnd.okluffa.luffa+json; version=1.0
    

Throttling

Throttling is used to control the rate of requests that clients can make to the API.

Once the number of requests over a certain period exceeds the set limit, API requests will return a 429 Too Many Requests error and the response will include a Retry-After header indicating how many seconds the client should wait before making a new request.

Rate limits are computed over windows of 15 minutes. Clients are allowed 3000 search requests per window and 5000 other requests per window.

HTTP Response Headers

In order to help clients manage their requests allowances, all API responses include the following headers:

Header Description
X-Rate-Limit-Limit The total number of requests allowed within the current window.
X-Rate-Limit-Remaining The number of remaining requests in the current window.
X-Rate-Limit-Reset The number of seconds left in the current window.

Example Request

    
curl -X GET 'https://okluffa.com/api/spaces/?q=ratelimitexample' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/spaces/?limit=100&q=ratelimitexample>; rel="first", <https://okluffa.com/api/spaces/?limit=100&q=ratelimitexample>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 3000
X-Rate-Limit-Remaining: 2998
X-Rate-Limit-Reset: 898.846
X-Total-Count: 3
[ { "captures_modified": "2017-12-07T18:54:13.688719Z", "participants_modified": "2017-12-07T18:54:12.044126Z", "labels": "https://okluffa.com/api/labels/?space=11255", "name": "Luffa Memories", "creator": "https://okluffa.com/api/users/8404/", "url": "https://okluffa.com/api/spaces/11255/", "captures": "https://okluffa.com/api/captures/?space=11255", "public_url": "https://okluffa.com/spaces/11255/", "created": "2017-12-07T18:54:11.888236Z", "modified": "2017-12-07T18:54:11.888257Z", "participants_count": 3, "participants": "https://okluffa.com/api/participants/?space=11255", "captures_count": 3, "permissions": [ "capture-create", "moment-create", "label-create" ], "id": 11255, "description": "" }, { "captures_modified": "2017-12-07T18:54:13.216813Z", "participants_modified": "2017-12-07T18:54:11.766801Z", "labels": "https://okluffa.com/api/labels/?space=11254", "name": "Luffa User Experience", "creator": "https://okluffa.com/api/users/8403/", "url": "https://okluffa.com/api/spaces/11254/", "captures": "https://okluffa.com/api/captures/?space=11254", "public_url": "https://okluffa.com/spaces/11254/", "created": "2017-12-07T18:54:11.759141Z", "modified": "2017-12-07T18:54:11.759159Z", "participants_count": 1, "participants": "https://okluffa.com/api/participants/?space=11254", "captures_count": 1, "permissions": [ "capture-create", "moment-create", "label-create", "participant-create", "space-update", "space-delete" ], "id": 11254, "description": "" }, { "captures_modified": "2017-12-07T18:54:15.757373Z", "participants_modified": "2017-12-07T18:54:09.632010Z", "labels": "https://okluffa.com/api/labels/?space=11251", "name": "My Captures", "creator": "https://okluffa.com/api/users/8403/", "url": "https://okluffa.com/api/spaces/11251/", "captures": "https://okluffa.com/api/captures/?space=11251", "public_url": "https://okluffa.com/spaces/11251/", "created": "2017-12-07T18:54:09.622229Z", "modified": "2017-12-07T18:54:09.622247Z", "participants_count": 1, "participants": "https://okluffa.com/api/participants/?space=11251", "captures_count": 1, "permissions": [ "capture-create", "moment-create", "label-create", "participant-create", "space-update", "space-delete" ], "id": 11251, "description": "This is your personal Space. Use it to capture your meetings and conversations before moving them to other Spaces or sharing them with the organization." } ]

Formats

The Luffa API returns data formatted as JSON.

All date values in request parameters and response body include time and are formatted according to ISO-8601.

All time durations in request parameters and response body are formatted as floating point numbers expressing the duration in seconds.

Example JSON Object

        
{
  "date": "2015-11-20T10:15:00Z", 
  "duration": "137.123456"
}
        
    

Help

Help is used to submit feedback and bug reports to Luffa.

Submit Feedback

This is the method used to submit feedback and bug reports.

HTTP Request

  POST /api/help/ HTTP/1.1

Body Parameters

Parameter Default Required Description
feedback YES The text to be submitted
attachment NO The file to upload

Example Request

    
curl -X POST 'https://okluffa.com/api/help/' \ 
--data-urlencode 'feedback=Luffa is fantastic!' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 202 Accepted
    
Allow: GET, POST, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5
X-Rate-Limit-Remaining: 4
X-Rate-Limit-Reset: 60.0

Attachments

An attachment is a file you attach to a capture.

The Attachment Object

Field Description
id The Attachment object ID
url The URL used to locate the object itself
capture The URL of the capture containing the attachment
expandable
file The URL of the actual file attachment
permissions A list of the API methods that the requesting user is allowed to use on this object; possible values are attachment-update and attachment-delete

List Attachments

This is the method used to list all attachments visible to the requesting user.

The requesting user can only see attachments contained in a space that the user created or participates in.

HTTP Request

  GET /api/attachments/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
expand Expand selected fields of the result item. The only valid values are * and capture; e.g. expand=capture
sort -id Order the results by the specified field. Valid values are id and capture; prefix these values with - to sort the results in descending order
capture Only return attachments to the capture with the given ID

Example Request

    
curl -X GET 'https://okluffa.com/api/attachments/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/attachments/?limit=100>; rel="first", <https://okluffa.com/api/attachments/?limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4995
X-Rate-Limit-Reset: 898.569
X-Total-Count: 2
[ { "capture": "https://okluffa.com/api/captures/19622/", "url": "https://okluffa.com/api/attachments/8211/", "poster": null, "file": "https://cdn.okluffa.com/spaces/11255/captures/19622/15483ac4-d367-45a4-8cb5-7bca5343fe33.jpg", "id": 8211, "permissions": [] }, { "capture": "https://okluffa.com/api/captures/19622/", "url": "https://okluffa.com/api/attachments/8210/", "poster": "https://cdn.okluffa.com/capture/19622/posters/ddf8daee-c5bf-4b84-bbed-bc10a8aa42ee.jpg", "file": "https://cdn.okluffa.com/spaces/11255/captures/19622/ddf8daee-c5bf-4b84-bbed-bc10a8aa42ee.mp4", "id": 8210, "permissions": [] } ]

Create Attachment

This is the method used to add a new attachment to a capture.

Only the capture creator can add attachments to it.

HTTP Request

  POST /api/attachments/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. The only valid values are * and capture; e.g. expand=capture

Body Parameters

Parameter Default Required Description
capture YES The URL of the capture the new attachment will be added to
file YES The file to upload

Example Request

    
curl -X POST 'https://okluffa.com/api/attachments/' \ 
--data-urlencode 'capture=/api/captures/19620/' \ 
--data-urlencode 'file@photo_example3.jpg' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 201 Created
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4994
X-Rate-Limit-Reset: 898.478
{ "capture": "https://okluffa.com/api/captures/19620/", "url": "https://okluffa.com/api/attachments/8212/", "poster": null, "file": "https://cdn.okluffa.com/spaces/11255/captures/19620/9fbc0ad4-a8f5-470a-bb7a-1b9297d234e5.jpg", "id": 8212, "permissions": [ "attachment-update", "attachment-delete" ] }

Retrieve Attachment

This is the method used to retrieve an attachment.

The requesting user can only retrieve attachments of captures contained in a space that the user created or participates in.

HTTP Request

  GET /api/attachments/<ID>/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. The only valid values are * and capture; e.g. expand=capture

Example Request

    
curl -X GET 'https://okluffa.com/api/attachments/8212/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4997
X-Rate-Limit-Reset: 889.005
{ "capture": "https://okluffa.com/api/captures/19620/", "url": "https://okluffa.com/api/attachments/8212/", "poster": null, "file": "https://cdn.okluffa.com/spaces/11255/captures/19620/9fbc0ad4-a8f5-470a-bb7a-1b9297d234e5.jpg", "id": 8212, "permissions": [ "attachment-update", "attachment-delete" ] }

Update Attachment

This is the method used to update an attachment of a capture.

At this time, once an attachment is created, none of its fields can be changed.

HTTP Request

  PUT /api/attachments/<ID>/ HTTP/1.1

or

  PATCH /api/attachments/<ID>/ HTTP/1.1

for a partial update.

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. The only valid values are * and capture; e.g. expand=capture

Example Request

    
curl -X PATCH 'https://okluffa.com/api/attachments/8212/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4993
X-Rate-Limit-Reset: 889.398
{ "capture": "https://okluffa.com/api/captures/19620/", "url": "https://okluffa.com/api/attachments/8212/", "poster": null, "file": "https://cdn.okluffa.com/spaces/11255/captures/19620/9fbc0ad4-a8f5-470a-bb7a-1b9297d234e5.jpg", "id": 8212, "permissions": [ "attachment-update", "attachment-delete" ] }

Delete Attachment

This is the method used to remove an attachment from a capture.

The requesting user can remove attachments from captures he created, but cannot remove other attachments unless he is the creator of the containing space.

HTTP Request

  DELETE /api/attachments/<ID>/

Example Request

    
curl -X DELETE 'https://okluffa.com/api/attachments/8212/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 204 No Content
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4992
X-Rate-Limit-Reset: 889.326

Captures

A capture is a note, a photo, a video, an audio file or other file that you add to a space.

The Capture Object

The Capture object contains many fields, but only those relevant to the object kind (meeting, note, photo, audio, video, or other) are returned in the API response.

Field Description
id The Capture object ID
url The URL used to locate the object itself
kind The kind of capture can be: note, video, audio, photo, screencast, or other (any file not matching any other kind)
kind_index A sequential index unique only within the containing space and other captures of the same kind; currently only used to compute a default title for the capture
creator The URL of the user who created the capture
expandable
cover The URL of the cover image for the capture (or null if not available)
space The URL of the containing space
expandable
modified The date and time the capture was last modified
created The date and time the capture was created
note The note attached to the capture
expandable
title The title of the capture
language The IETF language tag for the language used in the capture
attachments A URL to a list of all the attachments for the capture
expandable
file The URL to an uploaded file (for all capture kinds except for note)
media_type The media type (a.k.a. MIME type) of the uploaded file (or the empty string if nothing was uploaded; for all capture kinds except for note)
proxy The URL for a proxy of the uploaded file (for video captures only)
moments A URL to a list of all the flagged moments in the capture (for audio, meeting, and video captures only)
expandable
moments_count The number of flagged moments in a capture (for audio, meeting, and video captures only
duration The time duration of the capture (for audio and video captures only)
meeting The URL of the meeting for the session when this object was captured (null if the object was captured outside a session)
expandable
meeting_captures A URL to a list of all the captures in the meeting (for meeting captures only)
expandable
meeting_captures_count The number of captures in the meeting (for meeting captures only)
offset The time offset between the start of the meeting and the time this object was captured (0.0 if the object was captured outside a session)
state The state of progress of captures that are uploaded and transcribed in chunks (for audio and video captures only)
display_state Same as state, but suitable for display to the user (for audio and video captures only)
views_count The number of times the capture was viewed in the timeline (when shared)
permissions A list of the API methods that the requesting user is allowed to use on this object; possible values are capture-update and capture-delete

Example Object


    
{
  "views_count": 0, 
  "creator": "https://okluffa.com/api/users/8403/", 
  "public_image_url": "https://okluffa.com/captures/cover/19619/92a86658c325592a2bc446a6a536f68a/", 
  "id": 19619, 
  "attachments": "https://okluffa.com/api/attachments/?capture=19619", 
  "space": "https://okluffa.com/api/spaces/11254/", 
  "note": "Discuss this;\ndiscuss that.", 
  "state": "", 
  "transcribed": false, 
  "location": null, 
  "media_type": "", 
  "meeting": null, 
  "display_state": "", 
  "kind_index": 1, 
  "poster": null, 
  "public_url": "https://okluffa.com/captures/19619/", 
  "proxy": null, 
  "offset": 0.0, 
  "permissions": [
    "capture-update", 
    "capture-delete"
  ], 
  "kind": "note", 
  "language": "en", 
  "created": "2017-12-07T18:54:12.089338Z", 
  "url": "https://okluffa.com/api/captures/19619/", 
  "title": "Meeting Agenda", 
  "cover": null, 
  "modified": "2017-12-07T18:54:13.216813Z", 
  "shared": null
}
    

  

List Captures

This is the method used to list all captures visible to the requesting user.

The requesting user can only see captures shared with the organization and captures contained in a space that the user created or participates in.

HTTP Request

  GET /api/captures/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
expand Expand selected fields of the result item. Valid values are *, creator, space, attachments, note, moments, meeting, and meeting_captures; e.g. expand=note&expand=attachments
sort -created Order the results by the specified field. Valid values are id, title, created, modified, space, creator, and media_type; prefix these values with - to sort the results in descending order
space Only return captures in the space with the given ID
kind Only return captures of the given kind. Possible values are meeting, note, video, photo, audio, and other.
meeting Only return captures in the same session as the meeting with the given ID
language Only return captures using the language specified by the given IETF language tag (e.g. en-US)
media_type Only return captures of the given media (MIME) type
min_created Only return captures created on or after the given date
max_created Only return captures created on or before the given date
min_modified Only return captures modified on or after the given date
max_modified Only return captures modified on or before the given date
min_moments Return only meetings with at least these many flagged moments
max_moments Return only captures with at most these many flagged moments (because captures other than meetings have zero flagged moments, this filter may return captures of any kind)
min_captures Return only meetings with at least these many captures
max_captures Return only captures with at most these many captures (because captures other than meetings have zero captures, this filter may return captures of any kind)
shared If true, only return shared captures; if false, only return captures private to the space participants; by default, it returns both kinds
creator Return only captures created by the user with the given ID
team Return only captures whose creator is a member of the team with the given ID
near Only return captures near the given location; e.g. near=Montreal,+Canada

Example Request

    
curl -X GET 'https://okluffa.com/api/captures/?limit=3' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/captures/?limit=3>; rel="first", <https://okluffa.com/api/captures/?limit=3&offset=3>; rel="last", <https://okluffa.com/api/captures/?limit=3&offset=3>; rel="next"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4995
X-Rate-Limit-Reset: 888.228
X-Total-Count: 5
[ { "views_count": 0, "creator": "https://okluffa.com/api/users/8405/", "public_image_url": "https://okluffa.com/captures/cover/19622/a7faaf8834e45ee979e1e597a8612d46/", "id": 19622, "attachments": "https://okluffa.com/api/attachments/?capture=19622", "space": "https://okluffa.com/api/spaces/11255/", "note": "Top secret.", "state": "", "transcribed": false, "location": null, "media_type": "", "meeting": null, "display_state": "", "kind_index": 2, "poster": null, "public_url": "https://okluffa.com/captures/19622/", "proxy": null, "offset": 0.0, "permissions": [ "capture-update", "capture-delete" ], "kind": "note", "language": "en", "created": "2017-12-07T18:54:12.629137Z", "url": "https://okluffa.com/api/captures/19622/", "title": "Area 501", "cover": null, "modified": "2017-12-07T18:54:13.688719Z", "shared": null }, { "views_count": 0, "creator": "https://okluffa.com/api/users/8405/", "public_image_url": "https://okluffa.com/captures/cover/19621/fad3c5f4bb23138348576ad62ba1f76b/", "file": "https://cdn.okluffa.com/spaces/11255/0518bf97-6a0a-4032-a2ca-19f06b287a7a.jpg", "id": 19621, "attachments": "https://okluffa.com/api/attachments/?capture=19621", "space": "https://okluffa.com/api/spaces/11255/", "note": "Waiting for the real thing.", "state": "", "transcribed": false, "location": null, "media_type": "image/jpeg", "meeting": null, "display_state": "", "kind_index": 1, "public_url": "https://okluffa.com/captures/19621/", "proxy": "https://cdn.okluffa.com/spaces/11255/proxies/0518bf97-6a0a-4032-a2ca-19f06b287a7a.jpg", "offset": 0.0, "permissions": [ "capture-update", "capture-delete" ], "kind": "photo", "language": "en-US", "created": "2017-12-07T18:54:12.301347Z", "url": "https://okluffa.com/api/captures/19621/", "title": "The Mezzanine", "cover": "https://cdn.okluffa.com/spaces/11255/covers/0518bf97-6a0a-4032-a2ca-19f06b287a7a.jpg", "modified": "2017-12-07T18:54:13.591873Z", "shared": null }, { "views_count": 0, "creator": "https://okluffa.com/api/users/8403/", "public_image_url": "https://okluffa.com/captures/cover/19620/74e542f0178267f7e8e23d784f0265ab/", "id": 19620, "attachments": "https://okluffa.com/api/attachments/?capture=19620", "space": "https://okluffa.com/api/spaces/11255/", "note": "It all started in an empty office.", "state": "", "transcribed": false, "location": null, "media_type": "", "meeting": null, "display_state": "", "kind_index": 1, "poster": null, "public_url": "https://okluffa.com/captures/19620/", "proxy": null, "offset": 0.0, "permissions": [ "capture-update", "capture-delete" ], "kind": "note", "language": "en", "created": "2017-12-07T18:54:12.177985Z", "url": "https://okluffa.com/api/captures/19620/", "title": "Squatting", "cover": null, "modified": "2017-12-07T18:54:13.075203Z", "shared": null } ]

Create Capture

This is the method used to add a new capture to a space.

Only a space creator or participant can add captures to it.

HTTP Request

  POST /api/captures/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, creator, space, attachments, note, moments, meeting, and meeting_captures; e.g. expand=note&expand=attachments.*

Body Parameters

Parameter Default Required Description
space YES The URL of the space the new capture will be added to
title NO The title of the new capture
note NO The note attached to the new capture
file NO The file to upload
media_type NO The media type (a.k.a. MIME type) of the uploaded file (required if a file is uploaded; otherwise, the empty string or omitted)
language en-US NO The IETF language tag for the language used in the capture

Example Request

    
curl -X POST 'https://okluffa.com/api/captures/' \ 
--data-urlencode 'note=A good user experience is paramount' \ 
--data-urlencode 'space=/api/spaces/11254/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 201 Created
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4991
X-Rate-Limit-Reset: 888.695
{ "views_count": 0, "creator": "https://okluffa.com/api/users/8403/", "public_image_url": "https://okluffa.com/captures/cover/19623/d41312ae4383f77c3eb5a9d32621a060/", "id": 19623, "attachments": "https://okluffa.com/api/attachments/?capture=19623", "space": "https://okluffa.com/api/spaces/11254/", "note": "A good user experience is paramount", "state": "", "transcribed": false, "location": null, "media_type": "", "meeting": null, "display_state": "", "kind_index": 2, "poster": null, "public_url": "https://okluffa.com/captures/19623/", "proxy": null, "offset": 0.0, "permissions": [ "capture-update", "capture-delete" ], "kind": "note", "language": "en-US", "created": "2017-12-07T18:54:25.976002Z", "url": "https://okluffa.com/api/captures/19623/", "title": "", "cover": null, "modified": "2017-12-07T18:54:25.976002Z", "shared": null }

Retrieve Capture

This is the method used to retrieve a capture.

The requesting user can only retrieve captures contained in a space that the user created or participates in.

HTTP Request

  GET /api/captures/<ID>/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, creator, space, attachments, note, moments, meeting, and meeting_captures; e.g. expand=note&expand=attachments.*

Example Request

    
curl -X GET 'https://okluffa.com/api/captures/19623/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4994
X-Rate-Limit-Reset: 887.731
{ "views_count": 0, "creator": "https://okluffa.com/api/users/8403/", "public_image_url": "https://okluffa.com/captures/cover/19623/d41312ae4383f77c3eb5a9d32621a060/", "id": 19623, "attachments": "https://okluffa.com/api/attachments/?capture=19623", "space": "https://okluffa.com/api/spaces/11254/", "note": "A good user experience is paramount", "state": "", "transcribed": false, "location": null, "media_type": "", "meeting": null, "display_state": "", "kind_index": 2, "poster": null, "public_url": "https://okluffa.com/captures/19623/", "proxy": null, "offset": 0.0, "permissions": [ "capture-update", "capture-delete" ], "kind": "note", "language": "en-US", "created": "2017-12-07T18:54:25.976002Z", "url": "https://okluffa.com/api/captures/19623/", "title": "", "cover": null, "modified": "2017-12-07T18:54:25.976002Z", "shared": null }

Update Capture

This is the method used to update a capture.

The requesting user can only update captures he created or contained in a space that the user created or participates in.

HTTP Request

  PUT /api/captures/<ID>/ HTTP/1.1

or

  PATCH /api/captures/<ID>/ HTTP/1.1

for a partial update.

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, creator, space, attachments, note, moments, meeting, and meeting_captures; e.g. expand=note&expand=attachments.*

Body Parameters

The default parameter value is used if a parameter is omitted from a PUT request; if a parameter is omitted from a PATCH request, the existing value is left unchanged.

Parameter Default Required Description
title NO The title of the capture
note NO The note attached to the capture

Example Request

    
curl -X PATCH 'https://okluffa.com/api/captures/19623/' \ 
--data-urlencode 'title=User Experience' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4993
X-Rate-Limit-Reset: 887.649
{ "views_count": 0, "creator": "https://okluffa.com/api/users/8403/", "public_image_url": "https://okluffa.com/captures/cover/19623/d41312ae4383f77c3eb5a9d32621a060/", "id": 19623, "attachments": "https://okluffa.com/api/attachments/?capture=19623", "space": "https://okluffa.com/api/spaces/11254/", "note": "A good user experience is paramount", "state": "", "transcribed": false, "location": null, "media_type": "", "meeting": null, "display_state": "", "kind_index": 2, "poster": null, "public_url": "https://okluffa.com/captures/19623/", "proxy": null, "offset": 0.0, "permissions": [ "capture-update", "capture-delete" ], "kind": "note", "language": "en-US", "created": "2017-12-07T18:54:25.976002Z", "url": "https://okluffa.com/api/captures/19623/", "title": "User Experience", "cover": null, "modified": "2017-12-07T18:54:26.319917Z", "shared": null }

Move Capture

This is the method used to move a capture to a new space.

The requesting user must be a creator or participant of both the source and destination spaces.

HTTP Request

  PUT /api/captures/<ID>/move/ HTTP/1.1

or

  PATCH /api/captures/<ID>/move/ HTTP/1.1

for a partial update.

Body Parameters

The default parameter value is used if a parameter is omitted from a PUT request; if a parameter is omitted from a PATCH request, the existing value is left unchanged.

Parameter Default Required Description
space YES The URL of the space the capture will be moved to

Example Request

    
curl -X PATCH 'https://okluffa.com/api/captures/19623/move/' \ 
--data-urlencode 'space=/api/spaces/11255/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: PUT, PATCH, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4990
X-Rate-Limit-Reset: 888.211
{ "views_count": 0, "creator": "https://okluffa.com/api/users/8403/", "public_image_url": "https://okluffa.com/captures/cover/19623/d41312ae4383f77c3eb5a9d32621a060/", "id": 19623, "attachments": "https://okluffa.com/api/attachments/?capture=19623", "space": "https://okluffa.com/api/spaces/11255/", "note": "A good user experience is paramount", "state": "", "transcribed": false, "location": null, "media_type": "", "meeting": null, "display_state": "", "kind_index": 3, "poster": null, "public_url": "https://okluffa.com/captures/19623/", "proxy": null, "offset": 0.0, "permissions": [ "capture-update", "capture-delete" ], "kind": "note", "language": "en-US", "created": "2017-12-07T18:54:25.976002Z", "url": "https://okluffa.com/api/captures/19623/", "title": "User Experience", "cover": null, "modified": "2017-12-07T18:54:26.490213Z", "shared": null }

Delete Capture

This is the method used to remove a capture from a space.

The requesting user can only delete captures he created or contained in a space that the user created or participates in.

Please, note that deleting a capture will automatically delete all of its attachments too.

HTTP Request

  DELETE /api/captures/<ID>/

Example Request

    
curl -X DELETE 'https://okluffa.com/api/captures/19623/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 204 No Content
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4989
X-Rate-Limit-Reset: 888.064

Invitations

The Invitation object represents an email invitation to someone to join your organization in Luffa.

Any user can invite other people to join in.

The Invitation Object

Field Description
id The Invitation object ID
url The URL used to locate the object itself
created The date and time the invitation was created and sent
accepted The date and time the invitation was accepted by the recipient or null if the invitation has not yet been accepted
reminder_sent The date and time the latest invitation reminder was sent to the recipient or null if no invitation reminders have been sent

Example Object


    
{
  "to_email": "good.friend@example.com", 
  "created": "2017-12-07T18:54:13.762573Z", 
  "url": "https://okluffa.com/api/me/invitations/325/", 
  "reminder_sent": null, 
  "accepted": null, 
  "id": 325
}
    

  

List Invitations

This is the method used to list all the invitations that the requesting user has created.

HTTP Request

  GET /api/me/invitations/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
sort -created Order the results by the specified field. Valid values are id, to_email, created, and accepted; prefix these values with - to sort the results in descending order
min_created Return only invitations created on or after the given date
max_created Return only invitations created on or before the given date
pending If true, only return pending invitations; if false, only return invitations that have already been accepted; by default, it returns both kinds

Example Request

    
curl -X GET 'https://okluffa.com/api/me/invitations/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/me/invitations/?limit=100>; rel="first", <https://okluffa.com/api/me/invitations/?limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4991
X-Rate-Limit-Reset: 887.079
X-Total-Count: 1
[ { "to_email": "good.friend@example.com", "created": "2017-12-07T18:54:13.762573Z", "url": "https://okluffa.com/api/me/invitations/325/", "reminder_sent": null, "accepted": null, "id": 325 } ]

Create Invitation

This is the method used to create and send an email invitation.

HTTP Request

  POST /api/me/invitations/ HTTP/1.1

Body Parameters

Parameter Default Required Description
to_email YES The email address of the recipient of the invitation

Example Request

    
curl -X POST 'https://okluffa.com/api/me/invitations/' \ 
--data-urlencode 'to_email=invitee@example.com' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 201 Created
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 10
X-Rate-Limit-Remaining: 9
X-Rate-Limit-Reset: 60.0
{ "to_email": "invitee@example.com", "created": "2017-12-07T18:54:26.927124Z", "url": "https://okluffa.com/api/me/invitations/326/", "reminder_sent": null, "accepted": null, "id": 326 }

Retrieve Invitation

This is the method used to retrieve an invitation.

The requesting user can only retrieve invitations he has created.

HTTP Request

  GET /api/me/invitations/<ID>/ HTTP/1.1

Example Request

    
curl -X GET 'https://okluffa.com/api/me/invitations/326/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4988
X-Rate-Limit-Reset: 887.318
{ "to_email": "invitee@example.com", "created": "2017-12-07T18:54:26.927124Z", "url": "https://okluffa.com/api/me/invitations/326/", "reminder_sent": null, "accepted": null, "id": 326 }

Send Invitation Reminder

This is the method used to send an email reminder for a pending invitation.

The requesting user must be the creator of the invitation.

HTTP Request

  PUT /api/me/invitations/<ID>/remind/ HTTP/1.1

or

  PATCH /api/me/invitations/<ID>/remind/ HTTP/1.1

for a partial update.

Example Request

    
curl -X PUT 'https://okluffa.com/api/me/invitations/326/remind/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: PUT, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4990
X-Rate-Limit-Reset: 886.523
{ "to_email": "invitee@example.com", "created": "2017-12-07T18:54:26.927124Z", "url": "https://okluffa.com/api/me/invitations/326/", "reminder_sent": "2017-12-07T18:54:27.432972Z", "accepted": null, "id": 326 }

Delete Invitation

This is the method used to revoke and delete an invitation.

The requesting user can only delete invitations he created.

HTTP Request

  DELETE /api/me/invitations/<ID>/

Example Request

    
curl -X DELETE 'https://okluffa.com/api/me/invitations/326/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 204 No Content
    
Allow: GET, DELETE, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4989
X-Rate-Limit-Reset: 886.095

Labels

The Label object lets a user tag a space. Participants of a space can attach labels to a space to help organize and search spaces.

The Label Object

Field Description
id The Label object ID
url The URL used to locate the object itself
space The URL of the labelled space
expandable
name The name of the label
permissions A list of the API methods that the requesting user is allowed to use on this object; possible values are label-update and label-delete

Example Object


    
{
  "url": "https://okluffa.com/api/labels/11980/", 
  "permissions": [
    "label-update", 
    "label-delete"
  ], 
  "space": "https://okluffa.com/api/spaces/11254/", 
  "id": 11980, 
  "name": "luffa"
}
    

  

List Labels

This is the method used to list the labels of the spaces that the requesting user participates in.

HTTP Request

  GET /api/labels/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
expand Expand selected fields of the result item. The only valid values are * and space; e.g. expand=space
sort name Order the results by the specified field. Valid value are name, and space; prefix it with - to sort the results in descending order
name Only return labels with the given name (case sensitive)
space Only return labels for the space with the given ID
distinct false If true, only return labels distinct by name (i.e. none of the labels in the response will share their name). This filter cannot be used together with sort.

Example Request

    
curl -X GET 'https://okluffa.com/api/labels/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/labels/?limit=100>; rel="first", <https://okluffa.com/api/labels/?limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4986
X-Rate-Limit-Reset: 886.702
X-Total-Count: 4
[ { "url": "https://okluffa.com/api/labels/11977/", "permissions": [ "label-update", "label-delete" ], "space": "https://okluffa.com/api/spaces/11251/", "id": 11977, "name": "DEFAULT" }, { "url": "https://okluffa.com/api/labels/11980/", "permissions": [ "label-update", "label-delete" ], "space": "https://okluffa.com/api/spaces/11254/", "id": 11980, "name": "luffa" }, { "url": "https://okluffa.com/api/labels/11981/", "permissions": [ "label-update", "label-delete" ], "space": "https://okluffa.com/api/spaces/11255/", "id": 11981, "name": "luffa" }, { "url": "https://okluffa.com/api/labels/11982/", "permissions": [ "label-update", "label-delete" ], "space": "https://okluffa.com/api/spaces/11255/", "id": 11982, "name": "memories" } ]

Create Label

This is the method used to attach a new label to a space. The requesting user can only label spaces that he created or participates in.

HTTP Request

  POST /api/labels/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. The only valid values are * and space; e.g. expand=space

Body Parameters

Parameter Default Required Description
space YES The URL of the space being tagged with the new label
name YES The name of the new label

Example Request

    
curl -X POST 'https://okluffa.com/api/labels/' \ 
--data-urlencode 'name=design' \ 
--data-urlencode 'space=/api/spaces/11254/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 201 Created
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4988
X-Rate-Limit-Reset: 885.863
{ "url": "https://okluffa.com/api/labels/11983/", "permissions": [ "label-update", "label-delete" ], "space": "https://okluffa.com/api/spaces/11254/", "id": 11983, "name": "design" }

Retrieve Label

This is the method used to retrieve a particular label. The requesting user can only retrieve labels of spaces he created or participates in.

HTTP Request

  GET /api/labels/<ID>/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. The only valid values are * and space; e.g. expand=space

Example Request

    
curl -X GET 'https://okluffa.com/api/labels/11983/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4985
X-Rate-Limit-Reset: 886.485
{ "url": "https://okluffa.com/api/labels/11983/", "permissions": [ "label-update", "label-delete" ], "space": "https://okluffa.com/api/spaces/11254/", "id": 11983, "name": "design" }

Update Label

This is the method used to update a given label. The requesting user can only update labels for spaces that he created or participates in.

HTTP Request

  PUT /api/labels/<ID>/ HTTP/1.1

or

  PATCH /api/labels/<ID>/ HTTP/1.1

for a partial update.

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. The only valid values are * and space; e.g. expand=space

Body Parameters

The default parameter value is used if a parameter is omitted from a PUT request; if a parameter is omitted from a PATCH request, the existing value is left unchanged.

Parameter Default Required Description
name YES The name of the label

Example Request

    
curl -X PUT 'https://okluffa.com/api/labels/11983/' \ 
--data-urlencode 'name=product-design' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4984
X-Rate-Limit-Reset: 886.436
{ "url": "https://okluffa.com/api/labels/11983/", "permissions": [ "label-update", "label-delete" ], "space": "https://okluffa.com/api/spaces/11254/", "id": 11983, "name": "product-design" }

Delete Label

This is the method used to remove a label from a space.

The requesting user can only delete labels of spaces that he created or participates in.

HTTP Request

  DELETE /api/labels/<ID>/

Example Request

    
curl -X DELETE 'https://okluffa.com/api/labels/11983/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 204 No Content
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4987
X-Rate-Limit-Reset: 885.622

List Label Names

This is the method used to list the names of the labels of the spaces that the requesting user participates in. Each label name appears only once in the list and is accompanied by a count of the spaces carrying that label name and a URL to request all the spaces with that label name.

HTTP Request

  GET /api/labels/names/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
sort name Order the results by the specified field. The only valid value is name; prefix it with - to sort the results in descending order
q Return only the labels whose name (partially) matches the given value
name Only return labels with the given name (case sensitive)
space Only return labels for the space with the given ID

Example Request

    
curl -X GET 'https://okluffa.com/api/labels/names/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/labels/names/?limit=100>; rel="first", <https://okluffa.com/api/labels/names/?limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4986
X-Rate-Limit-Reset: 885.526
X-Total-Count: 3
[ { "count": 1, "spaces": "https://okluffa.com/api/spaces/?label=DEFAULT", "name": "DEFAULT" }, { "count": 2, "spaces": "https://okluffa.com/api/spaces/?label=luffa", "name": "luffa" }, { "count": 1, "spaces": "https://okluffa.com/api/spaces/?label=memories", "name": "memories" } ]

Moments

A flagged moment is a marker used to flag a particular moment in time in a capture (i.e. in an audio, meeting, or video).

The Moment Object

Field Description
id The Moment object ID
url The URL used to locate the object itself
capture The URL of the referenced meeting
expandable
creator The URL of the user who flagged the moment
expandable
created The date and time the moment was flagged (the Moment object was created)
offset The time offset between the start of the capture and the time the moment was flagged
start_offset The time offset between the start of the capture and the start time of the flagged moment
end_offset The time offset between the start of the capture and the end time of the flagged moment
permissions A list of the API methods that the requesting user is allowed to use on this object; possible values are moment-update and moment-delete

Example Object


    
{
  "moment_type": null, 
  "capture": "https://okluffa.com/api/captures/19621/", 
  "public_url": "https://okluffa.com/captures/19621/?m=13942", 
  "created": "2017-12-07T18:54:13.715738Z", 
  "url": "https://okluffa.com/api/moments/13942/", 
  "transcription": [], 
  "creator": "https://okluffa.com/api/users/8403/", 
  "integrations": [], 
  "start_offset": 0.0, 
  "note": "", 
  "meta": {}, 
  "offset": 0.0, 
  "end_offset": 0.0, 
  "show_transcript": true, 
  "id": 13942, 
  "permissions": [
    "moment-update", 
    "moment-delete"
  ]
}
    

  

List Moments

This is the method used to list all flagged moments visible to the requesting user.

The requesting user can only see flagged moments of captures contained in a space that the user created or participates in.

HTTP Request

  GET /api/moments/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
expand Expand selected fields of the result item. Valid values are *, capture, and creator; e.g. expand=capture
sort -created Order the results by the specified field. Valid values are id, creator, and created; prefix these values with - to sort the results in descending order
capture Only return flagged moments for the capture with the given capture ID
creator Only return moments by the user with the given ID
min_created Return moments flagged on or after the given date
max_created Return only moments flagged on or before the given date
team Return only moments whose creator is a member of the team with the given ID

Example Request

    
curl -X GET 'https://okluffa.com/api/moments/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/moments/?limit=100>; rel="first", <https://okluffa.com/api/moments/?limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4982
X-Rate-Limit-Reset: 886.103
X-Total-Count: 1
[ { "moment_type": null, "capture": "https://okluffa.com/api/captures/19621/", "public_url": "https://okluffa.com/captures/19621/?m=13942", "created": "2017-12-07T18:54:13.715738Z", "url": "https://okluffa.com/api/moments/13942/", "transcription": [], "creator": "https://okluffa.com/api/users/8403/", "integrations": [], "start_offset": 0.0, "note": "", "meta": {}, "offset": 0.0, "end_offset": 0.0, "show_transcript": true, "id": 13942, "permissions": [ "moment-update", "moment-delete" ] } ]

Create Moment

This is the method used to flag a moment in a capture.

Only the participats of the containing space can flag a moment in a capture.

HTTP Request

  POST /api/moments/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, capture, and creator; e.g. expand=capture

Body Parameters

Parameter Default Required Description
capture YES The URL of the capture being flagged
offset YES The time offset between the start of the capture and the time of the flagged moment. This parameter can be omitted if the object is created during capture; in that case, the offset value will be computed from the creation time of the object.
start_offset NO The time offset between the start of the capture and the start time of the flagged moment
end_offset NO The time offset between the start of the capture and the end time of the flagged moment

Example Request

    
curl -X POST 'https://okluffa.com/api/moments/' \ 
--data-urlencode 'capture=/api/captures/19621/' \ 
--data-urlencode 'offset=10.0' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 201 Created
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4985
X-Rate-Limit-Reset: 885.277
{ "moment_type": null, "capture": "https://okluffa.com/api/captures/19621/", "public_url": "https://okluffa.com/captures/19621/?m=13943", "created": "2017-12-07T18:54:28.680778Z", "url": "https://okluffa.com/api/moments/13943/", "transcription": [], "creator": "https://okluffa.com/api/users/8403/", "integrations": [], "start_offset": 10.0, "note": "", "meta": {}, "offset": 10.0, "end_offset": 10.0, "show_transcript": true, "id": 13943, "permissions": [ "moment-update", "moment-delete" ] }

Retrieve Moment

This is the method used to retrieve a flagged moment.

The requesting user can only retrieve flagged moments of captures contained in a space that the user created or participates in.

HTTP Request

  GET /api/moments/<ID>/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, capture, and creator; e.g. expand=capture

Example Request

    
curl -X GET 'https://okluffa.com/api/moments/13943/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4984
X-Rate-Limit-Reset: 885.112
{ "moment_type": null, "capture": "https://okluffa.com/api/captures/19621/", "public_url": "https://okluffa.com/captures/19621/?m=13943", "created": "2017-12-07T18:54:28.680778Z", "url": "https://okluffa.com/api/moments/13943/", "transcription": [], "creator": "https://okluffa.com/api/users/8403/", "integrations": [], "start_offset": 10.0, "note": "", "meta": {}, "offset": 10.0, "end_offset": 10.0, "show_transcript": true, "id": 13943, "permissions": [ "moment-update", "moment-delete" ] }

Update Moment

This is the method used to update a flagged moment in a capture.

HTTP Request

  PUT /api/moments/<ID>/ HTTP/1.1

or

  PATCH /api/moments/<ID>/ HTTP/1.1

for a partial update.

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, capture, and creator; e.g. expand=capture

Body Parameters

The default parameter value is used if a parameter is omitted from a PUT request; if a parameter is omitted from a PATCH request, the existing value is left unchanged.

Parameter Default Required Description
offset NO The time offset between the start of the capture and the time of the flagged moment
start_offset NO The time offset between the start of the capture and the start time of the flagged moment
end_offset NO The time offset between the start of the capture and the end time of the flagged moment

Example Request

    
curl -X PATCH 'https://okluffa.com/api/moments/13943/' \ 
--data-urlencode 'end_offset=12.0' \ 
--data-urlencode 'start_offset=8.0' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4981
X-Rate-Limit-Reset: 885.707
{ "moment_type": null, "capture": "https://okluffa.com/api/captures/19621/", "public_url": "https://okluffa.com/captures/19621/?m=13943", "created": "2017-12-07T18:54:28.680778Z", "url": "https://okluffa.com/api/moments/13943/", "transcription": [], "creator": "https://okluffa.com/api/users/8403/", "integrations": [], "start_offset": 8.0, "note": "", "meta": {}, "offset": 10.0, "end_offset": 12.0, "show_transcript": true, "id": 13943, "permissions": [ "moment-update", "moment-delete" ] }

Delete Moment

This is the method used to remove a flagged moment from a capture.

The requesting user can only remove moments that he flagged and cannot remove other moments unless he is the owner of the space containing the related capture.

HTTP Request

  DELETE /api/moments/<ID>/

Example Request

    
curl -X DELETE 'https://okluffa.com/api/moments/13943/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 204 No Content
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4980
X-Rate-Limit-Reset: 885.582

User Notifications Preferences

The Notifications object describes the notification preferences of a user.

The Notifications Object

Field Description
notify_when_capture_shared If true, you will be notified when a capture is shared with you
notify_when_added_to_space If true, you will be notified when you are added as a participant to a space
notify_via_email If true, notifications will be sent to you by email
notify_via_desktop_push If true, notifications will be pushed to you

Example Object


    
{
  "notify_when_new_features": true, 
  "notify_daily_upcoming_events": true, 
  "notify_via_email": true, 
  "notify_when_added_to_space": true, 
  "notify_via_desktop_push": true, 
  "notify_when_capture_shared": true
}
    

  

Retrieve User Notification Preferences

This is the method used to retrieve the notification preferences of a user.

HTTP Request

  GET /api/me/notifications/ HTTP/1.1

Query Parameters

This method does not take any parameters.

Example Request

    
curl -X GET 'https://okluffa.com/api/me/notifications/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4982
X-Rate-Limit-Reset: 884.731
{ "notify_when_new_features": true, "notify_daily_upcoming_events": true, "notify_via_email": true, "notify_when_added_to_space": true, "notify_via_desktop_push": true, "notify_when_capture_shared": true }

Update User Notification Preferences

This is the method used to modify the notification preferences of a user.

HTTP Request

  PUT /api/me/notifications/ HTTP/1.1

or

  PATCH /api/me/notifications/ HTTP/1.1

for a partial update.

Body Parameters

The default parameter value is used if a parameter is omitted from a PUT request; if a parameter is omitted from a PATCH request, the existing value is left unchanged.

Parameter Default Required Description
notify_when_capture_shared True NO If true, you will be notified when a capture is shared with you
notify_when_added_to_space True NO If true, you will be notified when you are added as a participant to a space
notify_via_email True NO If true, notifications will be sent to you by email
notify_via_desktop_push True NO If true, notifications will be pushed to you

Example Request

    
curl -X PATCH 'https://okluffa.com/api/me/notifications/' \ 
--data-urlencode 'notify_via_email=false' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4979
X-Rate-Limit-Reset: 885.392
{ "notify_when_new_features": true, "notify_daily_upcoming_events": true, "notify_via_email": false, "notify_when_added_to_space": true, "notify_via_desktop_push": true, "notify_when_capture_shared": true }

Organization

The Organization object describes a real-world organization.

Currently, the object is extremely simple and only includes the name of the organization.

Because the Luffa API restricts access of items to those belonging to the organization the requesting user is a member of, the Organization methods only give you access to your organization.

The Organization Object

Field Description
name The name of the organization
domain The domain of the organization
created The date and time the Organization object was created
auth_provider The federated authentication provider, if any
uses_sso True if the organization uses SSO (Single Sign On)
members_count The number of users that are members of this organization
meeting_minutes The number of meeting minutes used during the current month

Example Object


    
{
  "domain": "api.luffa.com", 
  "members_count": 3, 
  "name": "Luffa API", 
  "created": "2017-12-07T18:54:09.438584Z", 
  "usage_seconds": 0, 
  "auth_provider": "Basic Authentication", 
  "uses_sso": false
}
    

  

Retrieve Organization

This is the method used to retrieve a description of the organization the requesting user belongs to.

HTTP Request

  GET /api/organization/ HTTP/1.1

Query Parameters

This method does not take any parameters.

Example Request

    
curl -X GET 'https://okluffa.com/api/organization/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4981
X-Rate-Limit-Reset: 884.566
{ "domain": "api.luffa.com", "members_count": 3, "name": "Luffa API", "created": "2017-12-07T18:54:09.438584Z", "usage_seconds": 0, "auth_provider": "Basic Authentication", "uses_sso": false }

Update Organization

This is the method used to modify data about the organization the requesting user belongs to.

HTTP Request

  PUT /api/organization/ HTTP/1.1

or

  PATCH /api/organization/ HTTP/1.1

for a partial update.

Body Parameters

The default parameter value is used if a parameter is omitted from a PUT request; if a parameter is omitted from a PATCH request, the existing value is left unchanged.

Parameter Default Required Description
name YES The name of the organization

Example Request

    
curl -X PUT 'https://okluffa.com/api/organization/' \ 
--data-urlencode 'name=OK Luffa' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4980
X-Rate-Limit-Reset: 884.514
{ "domain": "api.luffa.com", "members_count": 3, "name": "OK Luffa", "created": "2017-12-07T18:54:09.438584Z", "usage_seconds": 0, "auth_provider": "Basic Authentication", "uses_sso": false }

Participants

The Participant object represents a user participation in a space.

The Participant Object

Field Description
id The Participant object ID
url The URL used to locate the object itself
user The URL of the participating user
expandable
space The URL of the target space
expandable
permissions A list of the API methods that the requesting user is allowed to use on this object; the only possible value is participant-delete

Example Object


    
{
  "url": "https://okluffa.com/api/participants/14664/", 
  "user": "https://okluffa.com/api/users/8403/", 
  "permissions": [
    "participant-delete"
  ], 
  "id": 14664, 
  "space": "https://okluffa.com/api/spaces/11255/"
}
    

  

List Participants

This is the method used to list all the participants in any of the spaces that the requesting user has access to (i.e. that he created or is a participant in).

HTTP Request

  GET /api/participants/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
expand Expand selected fields of the result item. Valid values are *, space and user; e.g. expand=space&expand=user
sort -id Order the results by the specified field. Valid values are id, space, and user; prefix these values with - to sort the results in descending order
space Return only participants in the space with the given ID
team Return only participants that are members of the team with the given ID
user Return only participants with the given user ID

Example Request

    
curl -X GET 'https://okluffa.com/api/participants/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/participants/?limit=100>; rel="first", <https://okluffa.com/api/participants/?limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4976
X-Rate-Limit-Reset: 885.107
X-Total-Count: 5
[ { "url": "https://okluffa.com/api/participants/14665/", "user": "https://okluffa.com/api/users/8405/", "permissions": [], "id": 14665, "space": "https://okluffa.com/api/spaces/11255/" }, { "url": "https://okluffa.com/api/participants/14664/", "user": "https://okluffa.com/api/users/8403/", "permissions": [ "participant-delete" ], "id": 14664, "space": "https://okluffa.com/api/spaces/11255/" }, { "url": "https://okluffa.com/api/participants/14663/", "user": "https://okluffa.com/api/users/8404/", "permissions": [], "id": 14663, "space": "https://okluffa.com/api/spaces/11255/" }, { "url": "https://okluffa.com/api/participants/14662/", "user": "https://okluffa.com/api/users/8403/", "permissions": [ "participant-delete" ], "id": 14662, "space": "https://okluffa.com/api/spaces/11254/" }, { "url": "https://okluffa.com/api/participants/14659/", "user": "https://okluffa.com/api/users/8403/", "permissions": [ "participant-delete" ], "id": 14659, "space": "https://okluffa.com/api/spaces/11251/" } ]

Create Participant

This is the method used to add a user as a participant in a space.

Only the creator of a space can add participants to it.

HTTP Request

  POST /api/participants/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, space and user; e.g. expand=space&expand=user

Body Parameters

Parameter Default Required Description
space YES The URL of the space the participant will be added to
user YES The URL of the user to be added as a participant

Example Request

    
curl -X POST 'https://okluffa.com/api/participants/' \ 
--data-urlencode 'user=/api/users/8404/' \ 
--data-urlencode 'space=/api/spaces/11254/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 201 Created
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4979
X-Rate-Limit-Reset: 884.326
{ "url": "https://okluffa.com/api/participants/14666/", "user": "https://okluffa.com/api/users/8404/", "permissions": [ "participant-delete" ], "id": 14666, "space": "https://okluffa.com/api/spaces/11254/" }

Retrieve Participant

This is the method used to retrieve a particular participant in a space.

The requesting user can only retrieve participants in spaces he has access to (i.e. that he created or participates in).

HTTP Request

  GET /api/participants/<ID>/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, space and user; e.g. expand=space&expand=user

Example Request

    
curl -X GET 'https://okluffa.com/api/participants/14666/?expand=user' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4978
X-Rate-Limit-Reset: 884.197
{ "url": "https://okluffa.com/api/participants/14666/", "user": { "short_name": "jane", "url": "https://okluffa.com/api/users/8404/", "role": "member", "is_active": true, "email": "jane.doe@example.com", "last_login": null, "avatar": null, "full_name": "Jane Doe", "timezone": "America/Montreal", "permissions": [ "user-update" ], "id": 8404, "date_joined": "2017-12-07T18:54:10.397180Z" }, "permissions": [ "participant-delete" ], "id": 14666, "space": "https://okluffa.com/api/spaces/11254/" }

Delete Participant

This is the method used to remove a participant from a space.

Requesting users can remove themselves from a space, but cannot remove other participants unless they are the space creator.

HTTP Request

  DELETE /api/participants/<ID>/

Example Request

    
curl -X DELETE 'https://okluffa.com/api/participants/14666/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 204 No Content
    
Allow: GET, DELETE, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4975
X-Rate-Limit-Reset: 884.813

Spaces

The Space object is a container used to organize notes and other captures into groups by topic or according to any other useful criteria.

Any user can create a space, populate it, and invite other users to participate in it.

The Space Object

Field Description
id The Space object ID
url The URL used to locate the object itself
participants_modified The date and time the list of participants for the space was last modified
captures_modified The date and time the list of captures for the space was last modified
name The name of the space
creator The URL of the user who created the space
expandable
labels The URL to a list of all the labels for the space
expandable
created The date and time the space was created
modified The date and time the space was last modified (it does not include participants and captures being added or removed)
participants_count The number of users participating in the space
captures_count The number of captures contained by the space
participants The URL to a list of all the participants for the space
expandable
captures The URL to a list of all the captures contained in the space
expandable
description Text describing the purpose of the space
permissions A list of the API methods that the requesting user is allowed to use on this object; possible values are space-update, space-delete, participant-create, capture-create, moment-create, and label-create

Example Object


    
{
  "captures_modified": "2017-12-07T18:54:26.490213Z", 
  "participants_modified": "2017-12-07T18:54:29.860271Z", 
  "labels": "https://okluffa.com/api/labels/?space=11254", 
  "name": "Luffa User Experience", 
  "creator": "https://okluffa.com/api/users/8403/", 
  "url": "https://okluffa.com/api/spaces/11254/", 
  "captures": "https://okluffa.com/api/captures/?space=11254", 
  "public_url": "https://okluffa.com/spaces/11254/", 
  "created": "2017-12-07T18:54:11.759141Z", 
  "modified": "2017-12-07T18:54:11.759159Z", 
  "participants_count": 1, 
  "participants": [
    {
      "url": "https://okluffa.com/api/participants/14662/", 
      "user": "https://okluffa.com/api/users/8403/", 
      "permissions": [
        "participant-delete"
      ], 
      "id": 14662, 
      "space": "https://okluffa.com/api/spaces/11254/"
    }
  ], 
  "captures_count": 1, 
  "permissions": [
    "capture-create", 
    "moment-create", 
    "label-create", 
    "participant-create", 
    "space-update", 
    "space-delete"
  ], 
  "id": 11254, 
  "description": ""
}
    

  

List Spaces

This is the method used to list all the spaces that the requesting user has access to (i.e. those he created or that he was invited to participate in).

HTTP Request

  GET /api/spaces/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
expand Expand selected fields of the result item. Valid values are *, creator, captures, participants, and labels; e.g. expand=creator&expand=participants.*
sort -created Order the results by the specified field. Valid values are id, name, created, creator, and modified; prefix these values with - to sort the results in descending order
min_created Return only spaces created on or after the given date
max_created Return only spaces created on or before the given date
min_modified Return only spaces modified on or after the given date
max_modified Return only spaces modified on or before the given date
label Return only spaces tagged with the given label (use the label name, not its ID)
min_captures Return only spaces containing at least these many captures
max_captures Return only spaces containing at most these many captures
min_participants Return only spaces with at least these many participants
max_participants Return only spaces with at most these many participants
team Return only spaces whose creator is a member of the team with the given ID

Example Request

    
curl -X GET 'https://okluffa.com/api/spaces/?expand=participants' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/spaces/?expand=participants&limit=100>; rel="first", <https://okluffa.com/api/spaces/?expand=participants&limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4977
X-Rate-Limit-Reset: 883.809
X-Total-Count: 3
[ { "captures_modified": "2017-12-07T18:54:26.653885Z", "participants_modified": "2017-12-07T18:54:12.044126Z", "labels": "https://okluffa.com/api/labels/?space=11255", "name": "Luffa Memories", "creator": "https://okluffa.com/api/users/8404/", "url": "https://okluffa.com/api/spaces/11255/", "captures": "https://okluffa.com/api/captures/?space=11255", "public_url": "https://okluffa.com/spaces/11255/", "created": "2017-12-07T18:54:11.888236Z", "modified": "2017-12-07T18:54:11.888257Z", "participants_count": 3, "participants": [ "https://okluffa.com/api/participants/14663/", "https://okluffa.com/api/participants/14664/", "https://okluffa.com/api/participants/14665/" ], "captures_count": 3, "permissions": [ "capture-create", "moment-create", "label-create" ], "id": 11255, "description": "" }, { "captures_modified": "2017-12-07T18:54:26.490213Z", "participants_modified": "2017-12-07T18:54:29.860271Z", "labels": "https://okluffa.com/api/labels/?space=11254", "name": "Luffa User Experience", "creator": "https://okluffa.com/api/users/8403/", "url": "https://okluffa.com/api/spaces/11254/", "captures": "https://okluffa.com/api/captures/?space=11254", "public_url": "https://okluffa.com/spaces/11254/", "created": "2017-12-07T18:54:11.759141Z", "modified": "2017-12-07T18:54:11.759159Z", "participants_count": 1, "participants": [ "https://okluffa.com/api/participants/14662/" ], "captures_count": 1, "permissions": [ "capture-create", "moment-create", "label-create", "participant-create", "space-update", "space-delete" ], "id": 11254, "description": "" }, { "captures_modified": "2017-12-07T18:54:15.757373Z", "participants_modified": "2017-12-07T18:54:09.632010Z", "labels": "https://okluffa.com/api/labels/?space=11251", "name": "My Captures", "creator": "https://okluffa.com/api/users/8403/", "url": "https://okluffa.com/api/spaces/11251/", "captures": "https://okluffa.com/api/captures/?space=11251", "public_url": "https://okluffa.com/spaces/11251/", "created": "2017-12-07T18:54:09.622229Z", "modified": "2017-12-07T18:54:09.622247Z", "participants_count": 1, "participants": [ "https://okluffa.com/api/participants/14659/" ], "captures_count": 1, "permissions": [ "capture-create", "moment-create", "label-create", "participant-create", "space-update", "space-delete" ], "id": 11251, "description": "This is your personal Space. Use it to capture your meetings and conversations before moving them to other Spaces or sharing them with the organization." } ]

Create Space

This is the method used to create a new space.

HTTP Request

  POST /api/spaces/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, creator, captures, participants, and labels; e.g. expand=creator&expand=participants.*

Body Parameters

Parameter Default Required Description
name YES The name of the new space
description NO The description of the new space

Example Request

    
curl -X POST 'https://okluffa.com/api/spaces/' \ 
--data-urlencode 'name=Coffee Machine' \ 
--data-urlencode 'description=Which coffee machine should we buy for the office?' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 201 Created
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4973
X-Rate-Limit-Reset: 884.382
{ "captures_modified": "2017-12-07T18:54:30.285049Z", "participants_modified": "2017-12-07T18:54:30.296354Z", "labels": "https://okluffa.com/api/labels/?space=11256", "name": "Coffee Machine", "creator": "https://okluffa.com/api/users/8403/", "url": "https://okluffa.com/api/spaces/11256/", "captures": "https://okluffa.com/api/captures/?space=11256", "public_url": "https://okluffa.com/spaces/11256/", "created": "2017-12-07T18:54:30.285309Z", "modified": "2017-12-07T18:54:30.285332Z", "participants_count": 1, "participants": "https://okluffa.com/api/participants/?space=11256", "captures_count": 0, "permissions": [ "capture-create", "moment-create", "label-create", "participant-create", "space-update", "space-delete" ], "id": 11256, "description": "Which coffee machine should we buy for the office?" }

Retrieve Space

This is the method used to retrieve a space.

The requesting user can only retrieve spaces that he has created or participates in.

HTTP Request

  GET /api/spaces/<ID>/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, creator, captures, participants, and labels; e.g. expand=creator&expand=participants.*

Example Request

    
curl -X GET 'https://okluffa.com/api/spaces/11256/?expand=participants.%2A' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4972
X-Rate-Limit-Reset: 884.158
{ "captures_modified": "2017-12-07T18:54:30.285049Z", "participants_modified": "2017-12-07T18:54:30.296354Z", "labels": "https://okluffa.com/api/labels/?space=11256", "name": "Coffee Machine", "creator": "https://okluffa.com/api/users/8403/", "url": "https://okluffa.com/api/spaces/11256/", "captures": "https://okluffa.com/api/captures/?space=11256", "public_url": "https://okluffa.com/spaces/11256/", "created": "2017-12-07T18:54:30.285309Z", "modified": "2017-12-07T18:54:30.285332Z", "participants_count": 1, "participants": [ { "url": "https://okluffa.com/api/participants/14667/", "user": "https://okluffa.com/api/users/8403/", "permissions": [ "participant-delete" ], "id": 14667, "space": "https://okluffa.com/api/spaces/11256/" } ], "captures_count": 0, "permissions": [ "capture-create", "moment-create", "label-create", "participant-create", "space-update", "space-delete" ], "id": 11256, "description": "Which coffee machine should we buy for the office?" }

Update Space

This is the method used to update a space.

HTTP Request

  PUT /api/spaces/<ID>/ HTTP/1.1

or

  PATCH /api/spaces/<ID>/ HTTP/1.1

for a partial update.

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, creator, captures, participants, and labels; e.g. expand=creator&expand=participants.*

Body Parameters

The default parameter value is used if a parameter is omitted from a PUT request; if a parameter is omitted from a PATCH request, the existing value is left unchanged.

Parameter Default Required Description
name YES The new name for the space
description NO The new description for the space

Example Request

    
curl -X PATCH 'https://okluffa.com/api/spaces/11256/' \ 
--data-urlencode 'name=New Coffee Machine' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4976
X-Rate-Limit-Reset: 883.386
{ "captures_modified": "2017-12-07T18:54:30.285049Z", "participants_modified": "2017-12-07T18:54:30.296354Z", "labels": "https://okluffa.com/api/labels/?space=11256", "name": "New Coffee Machine", "creator": "https://okluffa.com/api/users/8403/", "url": "https://okluffa.com/api/spaces/11256/", "captures": "https://okluffa.com/api/captures/?space=11256", "public_url": "https://okluffa.com/spaces/11256/", "created": "2017-12-07T18:54:30.285309Z", "modified": "2017-12-07T18:54:30.570340Z", "participants_count": 1, "participants": "https://okluffa.com/api/participants/?space=11256", "captures_count": 0, "permissions": [ "capture-create", "moment-create", "label-create", "participant-create", "space-update", "space-delete" ], "id": 11256, "description": "Which coffee machine should we buy for the office?" }

Delete Space

This is the method used to delete a space.

The requesting user can only delete spaces he created.

Please, note that deleting a space will automatically delete all of its captures too.

HTTP Request

  DELETE /api/spaces/<ID>/

Example Request

    
curl -X DELETE 'https://okluffa.com/api/spaces/11256/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 204 No Content
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4975
X-Rate-Limit-Reset: 883.282

Shared Captures

A shared capture is a capture shared to the organization timeline.

The Shared Capture Object

Field Description
id The Shared Capture object ID
url The URL used to locate the object itself
creator The URL of the user who shared the capture
expandable
created The date and time the capture was shared
capture The capture object

List Shared Captures

This is the method used to list all shared captures visible to the requesting user.

HTTP Request

  GET /api/shared-captures/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
expand Expand selected fields of the result item. The only valid values are creator and capture; e.g. expand=creator
sort -shared Order the results by the specified field. Valid values are id, shared_by, shared, created, modified, and title; prefix these values with - to sort the results in descending order
space Only return captures in the space with the given ID
kind Only return captures of the given kind. Possible values are meeting, note, video, photo, audio, and other.
media_type Only return captures of the given media (MIME) type
min_created Only return captures created on or after the given date
max_created Only return captures created on or before the given date
min_modified Only return captures modified on or after the given date
max_modified Only return captures modified on or before the given date
min_moments Return only meetings with at least these many flagged moments
max_moments Return only captures with at most these many flagged moments (because captures other than meetings have zero flagged moments, this filter may return captures of any kind)
min_captures Return only meetings with at least these many captures
max_captures Return only captures with at most these many captures (because captures other than meetings have zero captures, this filter may return captures of any kind)
capture Return the shared capture corresponding to the capture with the given ID
creator Return only captures created by the user with the given ID
team Return only captures whose creator is a member of the team with the given ID
near Only return captures near the given location; e.g. near=Montreal,+Canada
shared_by Return only captures shared by the user with the given ID
min_shared Only return captures shared on or after the given date
max_shared Only return captures shared on or before the given date

Example Request

    
curl -X GET 'https://okluffa.com/api/shared-captures/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/shared-captures/?limit=100>; rel="first", <https://okluffa.com/api/shared-captures/?limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4971
X-Rate-Limit-Reset: 883.849
X-Total-Count: 0
[]

Create Shared Capture

This is the method used to share a capture.

Only the capture creator or participant in the owning space can share captures.

HTTP Request

  POST /api/shared-captures/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. The only valid values are creator and capture; e.g. expand=creator

Body Parameters

Parameter Default Required Description
capture YES The URL of the capture to be shared

Example Request

    
curl -X POST 'https://okluffa.com/api/shared-captures/' \ 
--data-urlencode 'capture=/api/captures/19620/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 201 Created
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4970
X-Rate-Limit-Reset: 883.785
{ "capture": "https://okluffa.com/api/captures/19620/", "url": "https://okluffa.com/api/shared-captures/876/", "public_url": "https://okluffa.com/sharedcaptures/876/", "shared": "2017-12-07T18:54:30.890572Z", "shared_by": "https://okluffa.com/api/users/8403/", "id": 876 }

Retrieve Shared Capture

This is the method used to retrieve a shared capture.

HTTP Request

  GET /api/shared-captures/<ID>/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. The only valid values are creator and capture; e.g. expand=creator

Example Request

    
curl -X GET 'https://okluffa.com/api/shared-captures/876/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4974
X-Rate-Limit-Reset: 882.699
{ "capture": "https://okluffa.com/api/captures/19620/", "url": "https://okluffa.com/api/shared-captures/876/", "public_url": "https://okluffa.com/sharedcaptures/876/", "shared": "2017-12-07T18:54:30.890572Z", "shared_by": "https://okluffa.com/api/users/8403/", "id": 876 }

Update Shared Capture

This is the method used to update a shared capture.

At this time, once a shared capture is created, none of its fields can be changed.

HTTP Request

  PUT /api/shared-captures/<ID>/ HTTP/1.1

or

  PATCH /api/shared-captures/<ID>/ HTTP/1.1

for a partial update.

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. The only valid values are creator and capture; e.g. expand=creator

Example Request

    
curl -X PATCH 'https://okluffa.com/api/shared-captures/876/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4973
X-Rate-Limit-Reset: 882.521
{ "capture": "https://okluffa.com/api/captures/19620/", "url": "https://okluffa.com/api/shared-captures/876/", "public_url": "https://okluffa.com/sharedcaptures/876/", "shared": "2017-12-07T18:54:30.890572Z", "shared_by": "https://okluffa.com/api/users/8403/", "id": 876 }

Delete SharedCapture

This is the method used to remove or unshare a shared capture.

Any participant in the capture's space can unshare a capture.

HTTP Request

  DELETE /api/shared-captures/<ID>/

Example Request

    
curl -X DELETE 'https://okluffa.com/api/shared-captures/876/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 204 No Content
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4969
X-Rate-Limit-Reset: 883.098

Teams

The Team object is a container used to group users into teams. A user can be a member of zero or more teams.

Any user can create a team and add members to it.

The Team Object

Field Description
id The Team object ID
url The URL used to locate the object itself
created The date and time the team was created
name The name of the team
members The URL to a list of all the team members
expandable
permissions A list of the API methods that the requesting user is allowed to use on this object; possible values are team-create, team-update, and team-delete

Example Object


    
{
  "url": "https://okluffa.com/api/teams/1245/", 
  "permissions": [
    "team-create", 
    "team-update", 
    "team-delete"
  ], 
  "id": 1245, 
  "members": [
    {
      "url": "https://okluffa.com/api/team-members/1248/", 
      "user": "https://okluffa.com/api/users/8403/", 
      "permissions": [
        "team-member-create", 
        "team-member-update", 
        "team-member-delete"
      ], 
      "id": 1248, 
      "team": "https://okluffa.com/api/teams/1245/"
    }
  ], 
  "name": "Coffee Drinkers"
}
    

  

List Teams

This is the method used to list all the teams in the organization.

HTTP Request

  GET /api/teams/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
expand Expand selected fields of the result item. Valid values are * and members; e.g. expand=members.*
sort -created Order the results by the specified field. Valid values are id, name, and created; prefix these values with - to sort the results in descending order
min_created Return only teams created on or after the given date
max_created Return only teams created on or before the given date
min_members Return only teams with at least these many members
max_members Return only teams with at most these many members

Example Request

    
curl -X GET 'https://okluffa.com/api/teams/?expand=members' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/teams/?expand=members&limit=100>; rel="first", <https://okluffa.com/api/teams/?expand=members&limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4972
X-Rate-Limit-Reset: 881.722
X-Total-Count: 1
[ { "url": "https://okluffa.com/api/teams/1245/", "permissions": [ "team-create", "team-update", "team-delete" ], "id": 1245, "members": [ "https://okluffa.com/api/team-members/1248/" ], "name": "Coffee Drinkers" } ]

Create Team

This is the method used to create a new team.

HTTP Request

  POST /api/teams/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are * and members; e.g. expand=members.*

Body Parameters

Parameter Default Required Description
name YES The name of the new team

Example Request

    
curl -X POST 'https://okluffa.com/api/teams/' \ 
--data-urlencode 'name=The Squad' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 201 Created
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4971
X-Rate-Limit-Reset: 881.665
{ "url": "https://okluffa.com/api/teams/1246/", "permissions": [ "team-create", "team-update", "team-delete" ], "id": 1246, "members": "https://okluffa.com/api/team-members/?team=1246", "name": "The Squad" }

Retrieve Team

This is the method used to retrieve a team.

HTTP Request

  GET /api/teams/<ID>/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are * and members; e.g. expand=members.*

Example Request

    
curl -X GET 'https://okluffa.com/api/teams/1246/?expand=members.%2A' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4967
X-Rate-Limit-Reset: 882.33
{ "url": "https://okluffa.com/api/teams/1246/", "permissions": [ "team-create", "team-update", "team-delete" ], "id": 1246, "members": [], "name": "The Squad" }

Update Team

This is the method used to update a team.

HTTP Request

  PUT /api/teams/<ID>/ HTTP/1.1

or

  PATCH /api/teams/<ID>/ HTTP/1.1

for a partial update.

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are * and members; e.g. expand=members.*

Body Parameters

The default parameter value is used if a parameter is omitted from a PUT request; if a parameter is omitted from a PATCH request, the existing value is left unchanged.

Parameter Default Required Description
name YES The new name for the team

Example Request

    
curl -X PATCH 'https://okluffa.com/api/teams/1246/' \ 
--data-urlencode 'name=Awesome' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4966
X-Rate-Limit-Reset: 882.274
{ "url": "https://okluffa.com/api/teams/1246/", "permissions": [ "team-create", "team-update", "team-delete" ], "id": 1246, "members": "https://okluffa.com/api/team-members/?team=1246", "name": "Awesome" }

Delete Team

This is the method used to delete a team.

HTTP Request

  DELETE /api/teams/<ID>/

Example Request

    
curl -X DELETE 'https://okluffa.com/api/teams/1246/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 204 No Content
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4970
X-Rate-Limit-Reset: 881.505

Team Members

The TeamMember object represents a member of a team.

The TeamMember Object

Field Description
id The TeamMember object ID
url The URL used to locate the object itself
user The URL of the member user
expandable
team The URL of the target team
expandable
permissions A list of the API methods that the requesting user is allowed to use on this object; possible values are team-member-create, team-member-update, and team-member-delete

Example Object


    
{
  "url": "https://okluffa.com/api/team-members/1248/", 
  "user": "https://okluffa.com/api/users/8403/", 
  "permissions": [
    "team-member-create", 
    "team-member-update", 
    "team-member-delete"
  ], 
  "id": 1248, 
  "team": "https://okluffa.com/api/teams/1245/"
}
    

  

List Team Members

This is the method used to list all the members of any of the teams in the organization of the requesting user.

HTTP Request

  GET /api/team-members/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
expand Expand selected fields of the result item. Valid values are *, team and user; e.g. expand=team&expand=user
sort -id Order the results by the specified field. Valid values are id, team, and user; prefix these values with - to sort the results in descending order
team Return only members in the team with the given ID
user Return only team members with the given user ID

Example Request

    
curl -X GET 'https://okluffa.com/api/team-members/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/team-members/?limit=100>; rel="first", <https://okluffa.com/api/team-members/?limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4965
X-Rate-Limit-Reset: 882.11
X-Total-Count: 1
[ { "url": "https://okluffa.com/api/team-members/1248/", "user": "https://okluffa.com/api/users/8403/", "permissions": [ "team-member-create", "team-member-update", "team-member-delete" ], "id": 1248, "team": "https://okluffa.com/api/teams/1245/" } ]

Create Team Member

This is the method used to add a user as a member in a team.

HTTP Request

  POST /api/team-members/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, team and user; e.g. expand=team&expand=user

Body Parameters

Parameter Default Required Description
team YES The URL of the team the user will be added to
user YES The URL of the user to be added as a team member

Example Request

    
curl -X POST 'https://okluffa.com/api/team-members/' \ 
--data-urlencode 'user=/api/users/8404/' \ 
--data-urlencode 'team=/api/teams/1245/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 201 Created
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4964
X-Rate-Limit-Reset: 882.055
{ "url": "https://okluffa.com/api/team-members/1249/", "user": "https://okluffa.com/api/users/8404/", "permissions": [ "team-member-create", "team-member-update", "team-member-delete" ], "id": 1249, "team": "https://okluffa.com/api/teams/1245/" }

Retrieve Team Member

This is the method used to retrieve a particular team member.

HTTP Request

  GET /api/team-members/<ID>/ HTTP/1.1

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, team and user; e.g. expand=team&expand=user

Example Request

    
curl -X GET 'https://okluffa.com/api/team-members/1249/?expand=user' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4968
X-Rate-Limit-Reset: 881.277
{ "url": "https://okluffa.com/api/team-members/1249/", "user": { "short_name": "jane", "url": "https://okluffa.com/api/users/8404/", "role": "member", "is_active": true, "email": "jane.doe@example.com", "last_login": null, "avatar": null, "full_name": "Jane Doe", "timezone": "America/Montreal", "permissions": [ "user-update" ], "id": 8404, "date_joined": "2017-12-07T18:54:10.397180Z" }, "permissions": [ "team-member-create", "team-member-update", "team-member-delete" ], "id": 1249, "team": "https://okluffa.com/api/teams/1245/" }

Update Team Member

This is the method used to update a team member.

At this time, once a team member is created, none of its fields can be changed.

HTTP Request

  PUT /api/team-members/<ID>/ HTTP/1.1

or

  PATCH /api/team-members/<ID>/ HTTP/1.1

for a partial update.

Query Parameters

Parameter Default Description
expand Expand selected fields of the result item. Valid values are *, team and user; e.g. expand=team&expand=user

Example Request

    
curl -X PATCH 'https://okluffa.com/api/team-members/1249/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4967
X-Rate-Limit-Reset: 881.222
{ "url": "https://okluffa.com/api/team-members/1249/", "user": "https://okluffa.com/api/users/8404/", "permissions": [ "team-member-create", "team-member-update", "team-member-delete" ], "id": 1249, "team": "https://okluffa.com/api/teams/1245/" }

Delete Team Member

This is the method used to remove a user from a team.

HTTP Request

  DELETE /api/team-members/<ID>/

Example Request

    
curl -X DELETE 'https://okluffa.com/api/team-members/1249/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 204 No Content
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4963
X-Rate-Limit-Reset: 881.884

Users

The User object describes a user of Luffa. Each user belongs to exactly one organization.

The Luffa API cannot be used to create and delete users; those operations are restricted to the administrators of the organization. The Luffa API is still undergoing changes as far as using it to manipulate users, but for the time being, it supports listing, retrieval, and update.

The User Object

Field Description
id The User object ID
url The URL used to locate the object itself
short_name The user first name or nickname
full_name The user full name
avatar An object describing the user avatar (or null if the user has no avatar)
avatar.original The URL for the original user avatar
avatar.thumbnail The URL for the thumbnail version of the user avatar
email A unique email address
last_login The date and time when the user last logged in
date_joined The date and time when the user joined Luffa
timezone The current user timezone
permissions A list of the API methods that the requesting user is allowed to use on this object; the only possible value is user-update
is_active Whether the user account is active; only organization managers can see inactive users
role the role the user has in the organization; the possible values are owner, admin and member

Example Object


    
{
  "short_name": "john", 
  "url": "https://okluffa.com/api/users/8403/", 
  "role": "owner", 
  "is_active": true, 
  "email": "john.smith@example.com", 
  "last_login": null, 
  "avatar": {
    "original": "https://cdn.okluffa.com/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5.png", 
    "thumbnail": "https://cdn.okluffa.com/CACHE/images/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5/71dcb121529435caa081b2a47b79fa36.jpg"
  }, 
  "full_name": "John Smith", 
  "timezone": "America/Montreal", 
  "permissions": [
    "user-update"
  ], 
  "id": 8403, 
  "date_joined": "2017-12-07T18:54:09.445216Z"
}
    

  

List Users

This is the method used to list users who are members of the same organization as the requesting user.

HTTP Request

  GET /api/users/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
sort email Order the results by the specified field. Valid values are id, email, date_joined, last_login, and full_name; prefix these values with - to sort the results in descending order
min_date_joined Return only users who joined on or after the given date
max_date_joined Return only users who joined on or before the given date
min_last_login Return only users who last logged in on or after the given date
max_last_login Return only users who last logged in on or before the given date
team Return only users that are members of the team with the given ID
is_active If true, only return active users; if false, only return inactive users; by default, it returns both kinds (for organization managers only)

Example Request

    
curl -X GET 'https://okluffa.com/api/users/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/users/?limit=100>; rel="first", <https://okluffa.com/api/users/?limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4966
X-Rate-Limit-Reset: 881.043
X-Total-Count: 3
[ { "short_name": "jane", "url": "https://okluffa.com/api/users/8404/", "role": "member", "is_active": true, "email": "jane.doe@example.com", "last_login": null, "avatar": null, "full_name": "Jane Doe", "timezone": "America/Montreal", "permissions": [ "user-update" ], "id": 8404, "date_joined": "2017-12-07T18:54:10.397180Z" }, { "short_name": "john", "url": "https://okluffa.com/api/users/8403/", "role": "owner", "is_active": true, "email": "john.smith@example.com", "last_login": null, "avatar": { "original": "https://cdn.okluffa.com/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5.png", "thumbnail": "https://cdn.okluffa.com/CACHE/images/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5/71dcb121529435caa081b2a47b79fa36.jpg" }, "full_name": "John Smith", "timezone": "America/Montreal", "permissions": [ "user-update" ], "id": 8403, "date_joined": "2017-12-07T18:54:09.445216Z" }, { "short_name": "vivian", "url": "https://okluffa.com/api/users/8405/", "role": "member", "is_active": true, "email": "vivian@example.com", "last_login": null, "avatar": null, "full_name": "Vivian Nguyen", "timezone": "America/Montreal", "permissions": [ "user-update" ], "id": 8405, "date_joined": "2017-12-07T18:54:11.199340Z" } ]

Retrieve User

This is the method used to retrieve the description of a particular user. Only users who are members of the same organization as the requesting user can be retrieved.

HTTP Request

  GET /api/users/<ID>/ HTTP/1.1

Query Parameters

This method does not take any parameters.

Example Request

    
curl -X GET 'https://okluffa.com/api/users/8403/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4961
X-Rate-Limit-Reset: 881.651
{ "short_name": "john", "url": "https://okluffa.com/api/users/8403/", "role": "owner", "is_active": true, "email": "john.smith@example.com", "last_login": null, "avatar": { "original": "https://cdn.okluffa.com/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5.png", "thumbnail": "https://cdn.okluffa.com/CACHE/images/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5/71dcb121529435caa081b2a47b79fa36.jpg" }, "full_name": "John Smith", "timezone": "America/Montreal", "permissions": [ "user-update" ], "id": 8403, "date_joined": "2017-12-07T18:54:09.445216Z" }

Update User

This is the method used to update data related to a particular user. Only users who are members of the same organization as the requesting user can be updated.

Only organization managers can modify other users.

HTTP Request

  PUT /api/users/<ID>/ HTTP/1.1

or

  PATCH /api/users/<ID>/ HTTP/1.1

for a partial update.

Body Parameters

The default parameter value is used if a parameter is omitted from a PUT request; if a parameter is omitted from a PATCH request, the existing value is left unchanged.

Parameter Default Required Description
full_name NO The user full name
short_name NO The user short name (nickname)
avatar NO An image file representing the user
timezone NO The user timezone

Example Request

    
curl -X PATCH 'https://okluffa.com/api/users/8403/' \ 
--data-urlencode 'short_name=jimmy' \ 
--data-urlencode 'full_name=James Brown' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4960
X-Rate-Limit-Reset: 881.598
{ "short_name": "jimmy", "url": "https://okluffa.com/api/users/8403/", "role": "owner", "is_active": true, "email": "john.smith@example.com", "last_login": null, "avatar": { "original": "https://cdn.okluffa.com/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5.png", "thumbnail": "https://cdn.okluffa.com/CACHE/images/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5/71dcb121529435caa081b2a47b79fa36.jpg" }, "full_name": "James Brown", "timezone": "America/Montreal", "permissions": [ "user-update" ], "id": 8403, "date_joined": "2017-12-07T18:54:09.445216Z" }

Current User

The Current User object extends the User object with additional fields and is used to provide detailed information about the currently authenticated user.

The Current User Object

The Current User object includes all the fields of the User object and adds the following fields:
Field Description
has_password True if the user has set a password; users logging in through federated authentication typically will not have a password set
uses_sso True if the user's organization uses SSO (Single Sign On) and the user's email has the same domain as the organization's
requires_sso_migration True if the user's organization uses Google SSO (Single Sign On) and the user's email has the same domain as the organization's, but the user has not yet associated their organization's Google account to their Luffa's account

Example Object


    
{
  "first_meeting": null, 
  "short_name": "jimmy", 
  "url": "https://okluffa.com/api/users/8403/", 
  "role": "owner", 
  "has_password": true, 
  "is_active": true, 
  "email": "john.smith@example.com", 
  "requires_sso_migration": false, 
  "last_login": null, 
  "avatar": {
    "original": "https://cdn.okluffa.com/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5.png", 
    "thumbnail": "https://cdn.okluffa.com/CACHE/images/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5/71dcb121529435caa081b2a47b79fa36.jpg"
  }, 
  "full_name": "James Brown", 
  "first_signin": null, 
  "timezone": "America/Montreal", 
  "permissions": [
    "user-update"
  ], 
  "uses_sso": false, 
  "id": 8403, 
  "date_joined": "2017-12-07T18:54:09.445216Z"
}
    

  

Retrieve Current User

This is the method used to retrieve the description of the current user.

HTTP Request

  GET /api/me/ HTTP/1.1

Query Parameters

This method does not take any parameters.

Example Request

    
curl -X GET 'https://okluffa.com/api/me/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4964
X-Rate-Limit-Reset: 880.613
{ "first_meeting": null, "short_name": "jimmy", "url": "https://okluffa.com/api/users/8403/", "role": "owner", "has_password": true, "is_active": true, "email": "john.smith@example.com", "requires_sso_migration": false, "last_login": null, "avatar": { "original": "https://cdn.okluffa.com/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5.png", "thumbnail": "https://cdn.okluffa.com/CACHE/images/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5/71dcb121529435caa081b2a47b79fa36.jpg" }, "full_name": "James Brown", "first_signin": null, "timezone": "America/Montreal", "permissions": [ "user-update" ], "uses_sso": false, "id": 8403, "date_joined": "2017-12-07T18:54:09.445216Z" }

Update Current User

This is the method used to update data related to the current user.

HTTP Request

  PUT /api/me/ HTTP/1.1

or

  PATCH /api/me/ HTTP/1.1

for a partial update.

Body Parameters

The default parameter value is used if a parameter is omitted from a PUT request; if a parameter is omitted from a PATCH request, the existing value is left unchanged.

Parameter Default Required Description
full_name NO The user full name
short_name NO The user short name (nickname)
avatar NO An image file representing the user
timezone NO The user timezone

Example Request

    
curl -X PATCH 'https://okluffa.com/api/me/' \ 
--data-urlencode 'short_name=jimmy' \ 
--data-urlencode 'full_name=James Brown' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4959
X-Rate-Limit-Reset: 881.279
{ "first_meeting": null, "short_name": "jimmy", "url": "https://okluffa.com/api/users/8403/", "role": "owner", "has_password": true, "is_active": true, "email": "john.smith@example.com", "requires_sso_migration": false, "last_login": null, "avatar": { "original": "https://cdn.okluffa.com/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5.png", "thumbnail": "https://cdn.okluffa.com/CACHE/images/avatars/73aa338e-3c55-47c7-a7a2-06cef543bcf5/71dcb121529435caa081b2a47b79fa36.jpg" }, "full_name": "James Brown", "first_signin": null, "timezone": "America/Montreal", "permissions": [ "user-update" ], "uses_sso": false, "id": 8403, "date_joined": "2017-12-07T18:54:09.445216Z" }

Change Password

This is the method used to set/change the current user's password.

HTTP Request

  PUT /api/me/password/ HTTP/1.1

Body Parameters

Parameter Default Required Description
old_password YES The old password; only required if the user has already set a password; users authenticating through federation may not have a password
new_password YES The new password

Webhooks

The Webhook object lets other systems know when objects are created, deleted or updated in Luffa.

Any user can create webhooks.

The Webhook Object

Field Description
id The Webhook object ID
url The URL used to locate the object itself
name The name of the webhook
created The date and time the webhook was created
modified The date and time the webhook was last modified
last_sent The date and time the webhook was last sent or null if it has never been sent
last_status_code The status code of the response received last time the webhook was sent or -1 if it has never been sent
last_response The response received last time the webhook was sent or the empty string if it has never been sent
scope the scope of the webhook; the kind of objects it reacts to; the possible values are moment, capture, shared_capture and space
token The security token used to ensure the hook originates from Luffa
target The URL where Luffa posts JSON data for this hook
enabled Whether the hook is enabled

Example Object


    
{
  "name": "Hooked", 
  "created": "2017-12-07T18:54:13.767687Z", 
  "url": "https://okluffa.com/api/me/webhooks/222/", 
  "enabled": false, 
  "modified": "2017-12-07T18:54:13.767716Z", 
  "last_status_code": -1, 
  "token": "xhK2p0YT2p7bDQ3Hd2fuvDS1g4bsEyPAXra6OTI11NmKcZZO3GyjLbr2YKiHEN8", 
  "last_sent": null, 
  "target": "https://example.com/hooks/", 
  "scope": "shared_capture", 
  "id": 222, 
  "last_response": ""
}
    

  

List Webhooks

This is the method used to list all the webhooks that the requesting user has created.

HTTP Request

  GET /api/me/webhooks/ HTTP/1.1

Query Parameters

Parameter Default Description
offset 0 Used for paging; returns results starting from the given offset
limit 100 Return up to these many results
sort -created Order the results by the specified field. Valid values are id, name, created, modified, last_sent, scope, target, and enabled; prefix these values with - to sort the results in descending order
min_created Return only webhooks created on or after the given date
max_created Return only webhooks created on or before the given date
min_modified Return only webhooks modified on or after the given date
max_modified Return only webhooks modified on or before the given date
min_last_sent Return only webhooks last sent on or after the given date
max_last_sent Return only webhooks last sent on or before the given date
name Return only webhooks with the given name
last_status_code Return only webhooks that when last sent generated returned the given status code
scope Return only webhooks with the given scope; valid values are are moment, capture, shared_capture and space
enabled If true, only return webhooks that are enabled; if false, only return webhooks that are not enabled; by default, it returns both kinds

Example Request

    
curl -X GET 'https://okluffa.com/api/me/webhooks/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Link: <https://okluffa.com/api/me/webhooks/?limit=100>; rel="first", <https://okluffa.com/api/me/webhooks/?limit=100>; rel="last"
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4963
X-Rate-Limit-Reset: 880.377
X-Total-Count: 1
[ { "name": "Hooked", "created": "2017-12-07T18:54:13.767687Z", "url": "https://okluffa.com/api/me/webhooks/222/", "enabled": false, "modified": "2017-12-07T18:54:13.767716Z", "last_status_code": -1, "token": "xhK2p0YT2p7bDQ3Hd2fuvDS1g4bsEyPAXra6OTI11NmKcZZO3GyjLbr2YKiHEN8", "last_sent": null, "target": "https://example.com/hooks/", "scope": "shared_capture", "id": 222, "last_response": "" } ]

Create Webhook

This is the method used to create a webhook.

HTTP Request

  POST /api/me/webhooks/ HTTP/1.1

Body Parameters

Parameter Default Required Description
name YES The name of the webhook
scope shared_capture NO the scope of the webhook; the kind of objects it reacts to; the possible values are moment, capture, shared_capture and space
token NO The security token used to ensure the hook originates from Luffa
target YES The URL where Luffa posts JSON data for this hook
enabled True NO Whether the hook is enabled

Example Request

    
curl -X POST 'https://okluffa.com/api/me/webhooks/' \ 
--data-urlencode 'scope=space' \ 
--data-urlencode 'enabled=False' \ 
--data-urlencode 'name=Gotcha' \ 
--data-urlencode 'target=https://example.com/hooks/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 201 Created
    
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4962
X-Rate-Limit-Reset: 880.321
{ "name": "Gotcha", "created": "2017-12-07T18:54:33.630608Z", "url": "https://okluffa.com/api/me/webhooks/223/", "enabled": false, "modified": "2017-12-07T18:54:33.630627Z", "last_status_code": -1, "token": "EpI$H2$rxFXXlm_QnAMwMVr#OJpJL#I5rA8CQVFio_7$s5wsNYrZEG42K4yDGBs", "last_sent": null, "target": "https://example.com/hooks/", "scope": "space", "id": 223, "last_response": "" }

Generate Webhook Token

This is the method used to generate a token that can be used to protect a webhook.

HTTP Request

  GET /api/me/webhooks/token/ HTTP/1.1

Example Request

    
curl -X GET 'https://okluffa.com/api/me/webhooks/token/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4957
X-Rate-Limit-Reset: 880.987
{ "token": "JveZbfdyxShVb#YM6KyfXi0vXiIGVBzHtRIG1s$lacvZYPngdjuTHez#PQ1aLDG" }

Retrieve Webhook

This is the method used to retrieve a Webhook object.

The requesting user can only retrieve webhooks he has created.

HTTP Request

  GET /api/me/webhooks/<ID>/ HTTP/1.1

Example Request

    
curl -X GET 'https://okluffa.com/api/me/webhooks/223/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4956
X-Rate-Limit-Reset: 880.946
{ "name": "Gotcha", "created": "2017-12-07T18:54:33.630608Z", "url": "https://okluffa.com/api/me/webhooks/223/", "enabled": false, "modified": "2017-12-07T18:54:33.630627Z", "last_status_code": -1, "token": "EpI$H2$rxFXXlm_QnAMwMVr#OJpJL#I5rA8CQVFio_7$s5wsNYrZEG42K4yDGBs", "last_sent": null, "target": "https://example.com/hooks/", "scope": "space", "id": 223, "last_response": "" }

Update Webhook

This is the method used to update data related to a particular webhook. Only the user who created a webhook can update it.

HTTP Request

  PUT /api/me/webhooks/<ID>/ HTTP/1.1

or

  PATCH /api/me/webhooks/<ID>/ HTTP/1.1

for a partial update.

Body Parameters

The default parameter value is used if a parameter is omitted from a PUT request; if a parameter is omitted from a PATCH request, the existing value is left unchanged.

Parameter Default Required Description
name YES The name of the webhook
scope shared_capture NO the scope of the webhook; the kind of objects it reacts to; the possible values are moment, capture, shared_capture and space
token NO The security token used to ensure the hook originates from Luffa
target YES The URL where Luffa posts JSON data for this hook
enabled True NO Whether the hook is enabled

Example Request

    
curl -X PATCH 'https://okluffa.com/api/me/webhooks/223/' \ 
--data-urlencode 'name=Got it' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 200 OK
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/vnd.okluffa.luffa+json
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4961
X-Rate-Limit-Reset: 880.177
{ "name": "Got it", "created": "2017-12-07T18:54:33.630608Z", "url": "https://okluffa.com/api/me/webhooks/223/", "enabled": false, "modified": "2017-12-07T18:54:33.780071Z", "last_status_code": -1, "token": "EpI$H2$rxFXXlm_QnAMwMVr#OJpJL#I5rA8CQVFio_7$s5wsNYrZEG42K4yDGBs", "last_sent": null, "target": "https://example.com/hooks/", "scope": "space", "id": 223, "last_response": "" }

Delete Webhook

This is the method used to delete a webhook.

The requesting user can only delete webhooks he created.

HTTP Request

  DELETE /api/me/webhooks/<ID>/

Example Request

    
curl -X DELETE 'https://okluffa.com/api/me/webhooks/223/' \ 
-H 'Authorization: Token f2ac3e6509b9d4383c89a0ec34da2d6a4fb563df'
    
  

Example Response

    HTTP/1.1 204 No Content
    
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Vary: Accept, Cookie
X-Rate-Limit-Limit: 5000
X-Rate-Limit-Remaining: 4960
X-Rate-Limit-Reset: 880.118