thing/change
Description
change an already existing thing of the authenticated user
HTTP Method
POSTParameters
Name | Type | Required | Description |
---|---|---|---|
_id | string | yes | alphanumeric id of the thing |
title | string | no | this can also be a URL |
tags | string | no | (space separated) |
date | number (unix time) | no | unixtime when the thing was created |
url | string (URI) | no | only specify this if the thing has a URL |
html | string | no | the html resp. note of the thing |
archived | boolean | no | if set to "true" then thing is marked as archived |
todoStatus | boolean | no | only has an effect if the thing is a todo |
Returns
{ "_id": "alphanumeric id of the thing", "title": "title of the thing", "tags": "space separated tags of the thing", "date": "unixtime when the thing was created", "url": "url of the thing, only included if it is set", "html": "the html resp. note of the thing, only included if it is set", "archived": "true, only set when it is an archived thing", "todoStatus": "true or false, only if thing is a todo (through a special tag)" }
Example
Suppose there is one thing in the user's Thinkery:
GET /v1/things/get HTTP/1.1 Host: api.thinkery.me Authorization: access-token=the-token-you-received [ { "_id": "thing-id-1", "title": "old thing title", "date": 1733821705, "tags": [ ] } ]
Now we change the title of a thing:
POST /v1/thing/change HTTP/1.1 Host: api.thinkery.me Authorization: access-token=the-token-you-received Content-Type: application/x-www-form-urlencoded Content-Length: 77 _id=thing-id-1&title=thing title changed (this would be urlencoded) { "_id": "thing-id-1", "title": "thing title changed", "date": 1733821705, "tags": [ ] }
Now the user's Thinkery looks like this:
GET /v1/things/get HTTP/1.1 Host: api.thinkery.me Authorization: access-token=the-token-you-received [ { "_id": "thing-id-1", "title": "thing title changed", "date": 1733821705, "tags": [ ] } ]