{
  "opencollection": "1.0.0",
  "info": {
    "name": "PHAIDRA datastream directory API",
    "version": "3.0"
  },
  "items": [
    {
      "info": {
        "name": "directory",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get subunits.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://services.phaidra.univie.ac.at/api/directory/org_get_subunits",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "query",
                "description": "unit id"
              }
            ]
          },
          "docs": "Retrieves the subunits of an organization."
        },
        {
          "info": {
            "name": "Get superunits.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://services.phaidra.univie.ac.at/api/directory/org_get_superunits",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "query",
                "description": "unit id"
              }
            ]
          },
          "docs": "Retrieves the superunits of an organization."
        },
        {
          "info": {
            "name": "Get the parent path.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://services.phaidra.univie.ac.at/api/directory/org_get_parentpath",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "query",
                "description": "Parent id"
              }
            ]
          },
          "docs": "Retrieves the parent path of an organisation unit"
        },
        {
          "info": {
            "name": "Get organisation units",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://services.phaidra.univie.ac.at/api/directory/org_get_units",
            "params": [
              {
                "name": "parent_id",
                "value": "",
                "type": "query",
                "description": "Id of the parent unit. If not set, returns the top-level units."
              },
              {
                "name": "values_namespace",
                "value": "",
                "type": "query",
                "description": "If provided, the values returned (in the 'uri' field) will be prefixed with the value of this parameter."
              }
            ]
          },
          "docs": "Get the list of the organisation units. They can then be used for example to find objects explicitly associated to, or to restrict rights for, a particular organisation unit."
        },
        {
          "info": {
            "name": "Get user's basic data.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://services.phaidra.univie.ac.at/api/directory/user/:username/data",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path",
                "description": "the user username"
              }
            ]
          },
          "docs": "Returns basic data about the specified user (such as name, affiliation and organization unit)."
        },
        {
          "info": {
            "name": "Get user's full name.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://services.phaidra.univie.ac.at/api/directory/user/:username/name",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path",
                "description": "the user's username"
              }
            ]
          },
          "docs": "Returns the name of a user."
        },
        {
          "info": {
            "name": "Get user's email",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://services.phaidra.univie.ac.at/api/directory/user/:username/email",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path",
                "description": "the user username"
              }
            ]
          },
          "docs": "Returns the user's email"
        },
        {
          "info": {
            "name": "Searches the user database.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://services.phaidra.univie.ac.at/api/directory/user/search",
            "params": [
              {
                "name": "q",
                "value": "",
                "type": "query",
                "description": "query (it will be automatically suffixed with *)"
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Searches the user database."
        },
        {
          "info": {
            "name": "Returns current user's data.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://services.phaidra.univie.ac.at/api/directory/user/data",
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Returns current user's data."
        },
        {
          "info": {
            "name": "Get user's groups.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://services.phaidra.univie.ac.at/api/groups",
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Retrieves all user's groups."
        },
        {
          "info": {
            "name": "Get group detail",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://services.phaidra.univie.ac.at/api/group/:gid",
            "params": [
              {
                "name": "gid",
                "value": "",
                "type": "path",
                "description": "gid - group id"
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Get group detail"
        },
        {
          "info": {
            "name": "Create new group",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://services.phaidra.univie.ac.at/api/group/add",
            "params": [
              {
                "name": "name",
                "value": "",
                "type": "query",
                "description": "name of the group"
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Create new group"
        },
        {
          "info": {
            "name": "Delete specified group",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://services.phaidra.univie.ac.at/api/group/:gid/remove",
            "params": [
              {
                "name": "gid",
                "value": "",
                "type": "path",
                "description": "gid - group id"
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Delete specified group"
        },
        {
          "info": {
            "name": "Add group members",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://services.phaidra.univie.ac.at/api/group/:gid/members/add",
            "params": [
              {
                "name": "gid",
                "value": "",
                "type": "path",
                "description": "gid - group id"
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": [
                {
                  "name": "members",
                  "type": "text",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Add group members"
        },
        {
          "info": {
            "name": "Remove group members",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://services.phaidra.univie.ac.at/api/group/:gid/members/remove",
            "params": [
              {
                "name": "gid",
                "value": "",
                "type": "path",
                "description": "gid - group id"
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": [
                {
                  "name": "members",
                  "type": "text",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Remove group members"
        }
      ]
    }
  ],
  "bundled": true
}