Friend API

The Minddistrict API to access and modify friend data is accessible under the sub-URL /c of the API.

This data is only accessible from the friend user itself and API Users.

Friend JSON object

Information about friends in the Minddistrict API is transferred as json objects containing the following information:

Name

Value

Explanation

Value type

Notes

active

Active

Uncheck to deactivate the user acount. The user can not log in to the platform as long as the account is inactive.

Boolean

Required
email

Email address

The email address is used as login name for the platform. It should be unique in the platform. It may not contain uppercase characters.

String

Required
picture

Profile picture

You can upload a profile picture.

File

Setting-dependent
name

Name

-

String

Required

The @type meta information for this object is: http://ns.minddistrict.com/friend.

Note

For privacy reasons, only friends themselves have access to their email, name and picture fields

View a friend

To view a friend send a GET request to the URL of the friend:

GET /api/2/c/2c0b35bd1215411fbac68e1c17388dd4 HTTP/1.1
Host: customer.minddistrict.com
Accept: application/json
Authorization: md-token gAAAAABgZBtPPCbUea3NEoN1aZ_qQNWMkvCDc0iqYk61sgfclqaEBqvE_59SlZXxPQkXGZFwbEVnLemrzQwB665-asFehy8zYb9aZUJ37UPx8YbVxTaURT0_H6FXmUEzD9w-GTYqm06OXjfboInipVNktUSw3LMi1u24eFeMRRNvCAMMonr-bngKklt3QJ0vISnZvu1C9I2x

The response will be the corresponding friend object:

HTTP/1.0 200 Ok
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Content-Length: 1979
Content-Type: application/json;charset=UTF-8

{
    "@changes": {
        "creation_time": "2021-03-31T06:48:47",
        "modification_time": "2021-03-31T06:48:47"
    },
    "@links": [
        {
            "name": "application",
            "url": "https://customer.minddistrict.com/api/2"
        },
        {
            "name": "catalogue.selfhelp.items",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/catalogue/items"
        },
        {
            "name": "favorites.items",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/favorites/items"
        },
        {
            "name": "logout",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/logout"
        },
        {
            "name": "planning",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/planning"
        },
        {
            "name": "planning.ics",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/planning/ics"
        },
        {
            "name": "planning.items",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/planning/items"
        },
        {
            "name": "tasks",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/tasks"
        },
        {
            "name": "tasks.items",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/tasks/items"
        },
        {
            "name": "tools",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/tools"
        }
    ],
    "@type": "http://ns.minddistrict.com/friend",
    "@url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4",
    "active": true,
    "email": "fred@example.com",
    "name": "Fred Flintstone",
    "picture": null
}

API Users don’t have access to ‘email’, ‘name’ and ‘picture’:

GET /api/2/c/2c0b35bd1215411fbac68e1c17388dd4 HTTP/1.1
Host: customer.minddistrict.com
Accept: application/json
Authorization: md-token gAAAAABgZBtS8Ua9Pcla5dnUix2uJFPm0HT900z-5Y8-zrdwkYL8si-LAOjmPHwF-9ttGIQZ3emBV9IVe2F03-A7M1h0NTO4VrqQxdsKLhkJauBHDSaJk2un3c8_URGlF5EQ0Hu48G6ZVJhWNJum4hA7XLgzwl2kvbsPezsP7QdvWj91n227SGS4nGA-FmNuUhyE2462bOw2

Will trigger this result:

HTTP/1.0 200 Ok
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Content-Length: 1892
Content-Type: application/json;charset=UTF-8

{
    "@changes": {
        "creation_time": "2021-03-31T06:48:47",
        "modification_time": "2021-03-31T06:48:47"
    },
    "@links": [
        {
            "name": "account",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/account"
        },
        {
            "name": "application",
            "url": "https://customer.minddistrict.com/api/2"
        },
        {
            "name": "catalogue.selfhelp.items",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/catalogue/items"
        },
        {
            "name": "conversations",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/conversations"
        },
        {
            "name": "planning",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/planning"
        },
        {
            "name": "planning.ics",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/planning/ics"
        },
        {
            "name": "planning.items",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/planning/items"
        },
        {
            "name": "tasks",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/tasks"
        },
        {
            "name": "tasks.items",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/tasks/items"
        },
        {
            "name": "tools",
            "url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4/tools"
        }
    ],
    "@type": "http://ns.minddistrict.com/friend",
    "@url": "https://customer.minddistrict.com/api/2/c/2c0b35bd1215411fbac68e1c17388dd4",
    "active": true
}

Editing a friend

To modify friend data send a PATCH request to the URL of the friend with the modification contained in the body:

PATCH /api/2/c/2c0b35bd1215411fbac68e1c17388dd4 HTTP/1.1
Host: customer.minddistrict.com
Accept: application/json
Authorization: md-token gAAAAABgZBtPPCbUea3NEoN1aZ_qQNWMkvCDc0iqYk61sgfclqaEBqvE_59SlZXxPQkXGZFwbEVnLemrzQwB665-asFehy8zYb9aZUJ37UPx8YbVxTaURT0_H6FXmUEzD9w-GTYqm06OXjfboInipVNktUSw3LMi1u24eFeMRRNvCAMMonr-bngKklt3QJ0vISnZvu1C9I2x
Content-Length: 34
Content-Type: application/json

{
    "name": "Frank Flintstone"
}