{
  "opencollection": "1.0.0",
  "info": {
    "name": "Cognite 3D Asset Mapping Principals API",
    "version": "v1"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Principals",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get the current caller's information",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{cluster}.cognitedata.com/api/v1/projects/{project}/api/v1/principals/me"
          },
          "docs": "Retrieves the information of the principal issuing the request.\n\nThis endpoint is useful for clients to verify their own identity.\nAll authenticated principals can call this endpoint."
        },
        {
          "info": {
            "name": "List principals",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{cluster}.cognitedata.com/api/v1/projects/{project}/api/v1/orgs/:org/principals",
            "params": [
              {
                "name": "org",
                "value": "",
                "type": "path",
                "description": "ID of an organization"
              },
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "Cursor for paging through results. In general, if a response contains a `nextCursor`\nproperty, it means that there may be more results, and you should pass that value as the\n`cursor` parameter in the next request.\n\nNote that the cursor may or may not be encrypted, but either way, it is not intended to be\ndecoded. Its internal structure is not a part of the public API, and may change without\nnotice. You should treat it as an opaque string and not attempt to craft your own cursors.\n"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query"
              },
              {
                "name": "types",
                "value": "USER,SERVICE_ACCOUNT",
                "type": "query",
                "description": "Filter by principal types.\nIf not specified, all principal types will be included.\nYou can filter by multiple types by providing a comma-separated list, or by repeating the parameter."
              }
            ]
          },
          "docs": "List principals in an organization.\n\nAll principal types are supported.\n\n#### Access control\nRequires the caller to be logged into the target organization, or\nto be an admin in any of its the ancestor organizations."
        },
        {
          "info": {
            "name": "Retrieve principals by reference",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{cluster}.cognitedata.com/api/v1/projects/{project}/api/v1/orgs/:org/principals/byids",
            "params": [
              {
                "name": "org",
                "value": "",
                "type": "path",
                "description": "ID of an organization"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Retrieve principals in an organization by ID or external ID.\n\nService accounts can be retrieved by ID or external ID.\nUsers can be retrieved by ID.\n\n#### Access control\nRequires the caller to be logged into the target organization, or\nto be an admin in any of its the ancestor organizations."
        },
        {
          "info": {
            "name": "List login sessions",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{cluster}.cognitedata.com/api/v1/projects/{project}/api/v1/orgs/:org/principals/:principal/sessions",
            "params": [
              {
                "name": "org",
                "value": "",
                "type": "path",
                "description": "ID of an organization"
              },
              {
                "name": "principal",
                "value": "",
                "type": "path",
                "description": "ID of a principal"
              },
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "Cursor for paging through results. In general, if a response contains a `nextCursor`\nproperty, it means that there may be more results, and you should pass that value as the\n`cursor` parameter in the next request.\n\nNote that the cursor may or may not be encrypted, but either way, it is not intended to be\ndecoded. Its internal structure is not a part of the public API, and may change without\nnotice. You should treat it as an opaque string and not attempt to craft your own cursors.\n"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "The maximum number of items to return."
              }
            ]
          },
          "docs": "List login sessions for a user principal in an organization.\n\nNote that a login session is what a user gets after logging into Fusion, InField, or another Cognite\napplication. It is distinct from the concept of the \"sessions\" that can be used for background work like\nTransformations or Functions; however, each such background session is backed by a login session.\n\nThis endpoint does not work for service account principals, which do not have login sessions.\n\n#### Access control\nRequires the calle"
        },
        {
          "info": {
            "name": "Revoke login sessions",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{cluster}.cognitedata.com/api/v1/projects/{project}/api/v1/orgs/:org/principals/:principal/sessions/revoke",
            "params": [
              {
                "name": "org",
                "value": "",
                "type": "path",
                "description": "ID of an organization"
              },
              {
                "name": "principal",
                "value": "",
                "type": "path",
                "description": "ID of a principal"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Revoke one or more login sessions for a user principal in an organization.\n\nNote that a login session is what a user gets after logging into Fusion, InField, or another Cognite\napplication. It is distinct from the concept of the \"sessions\" that can be used for background work like\nTransformations or Functions; however, each such background session is backed by a login session.\n\nUpon successful completion of a login flow, the user receives an access token and a refresh token, which are\nboth assoc"
        }
      ]
    }
  ],
  "bundled": true
}