thing/change

Description

change an already existing thing of the authenticated user

HTTP Method

POST

Parameters

NameTypeRequiredDescription
_idstringyesalphanumeric id of the thing
titlestringnothis can also be a URL
tagsstringno(space separated)
datenumber (unix time)nounixtime when the thing was created
urlstring (URI)noonly specify this if the thing has a URL
htmlstringnothe html resp. note of the thing
archivedbooleannoif set to "true" then thing is marked as archived
todoStatusbooleannoonly 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": [
      
    ]
  }
]