---
agentTools:
  projectIndex: https://docs.marbleapi.com/llms.txt
---

# Get Authorization

Retrieves an authorization for specific life and resource.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Public",
    "version": "21.09"
  },
  "servers": [
    {
      "url": "https://api.marbleapi.com"
    }
  ],
  "paths": {
    "/authorizations/$one": {
      "get": {
        "tags": [
          "Authorizations"
        ],
        "summary": "Get Authorization",
        "description": "Retrieves an authorization for specific life and resource.",
        "operationId": "authorizations-get-authorization",
        "parameters": [
          {
            "$ref": "#/components/parameters/apiVersion"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Resource name, can be protected \"~/lives/demographics.read\" or custom \"customResource\"; must be encoded. Please see Authorization schema for more details",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "description": "Owner (must be encoded). Please see Authorization schema for more details",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK - Authorization retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Authorization"
                },
                "example": {
                  "id": "bcd97f22-6624-43da-913c-7f90da8b7fdd",
                  "owner": "~/lives/5139a9fc-2f6a-4ac2-a463-5129e1032ddd",
                  "status": "Pending",
                  "requiresLinkedLifeVerification": true,
                  "isExpired": false,
                  "acceptedAt": null,
                  "rejectedAt": null,
                  "revokedAt": null,
                  "isPdfReviewRequired": false,
                  "isPdf": false,
                  "name": "~/lives/observations.read",
                  "title": "Saint Joseph Hospital",
                  "description": "Read observations"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/403Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/404NotFound"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Authorization": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/NewAuthorization"
          }
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "owner": {
            "type": "string",
            "description": "The owner of the authorizations. Owner can be a protected resource. Medchart protects its owner resources by using the following format: ~/xxx/yyy. If the owner starts with ~/, that owner is a life that exists within the Medchart domain. eg: \"~/lives/9a43a23e-3bf1-41ad-8450-0cccc61259ee\" is a protected Medchart owner resource in which the GUID maps to the lifeId of that life. If the owner does not start with ~/, the owner is a custom one; hence, the owner is within your domain. Therefore, you are responsible for establishing controls for that owner in regards to the authorization. eg: user1a is a custom owner because it does not match the Medchart owner resource format",
            "example": "Medchart owner resource ~/lives/fc23a673-5b57-4fb9-b1c5-29311712d45b; Custom owner resource bc75160e-b842-4191-94e1-fa4d861cd703"
          },
          "status": {
            "enum": [
              "Accepted",
              "Rejected",
              "Pending",
              "Revoked",
              "Archived"
            ],
            "type": "string",
            "example": "Accepted"
          },
          "isExpired": {
            "type": "boolean",
            "example": false
          },
          "acceptedAt": {
            "type": "string",
            "format": "date-time"
          },
          "rejectedAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isPdfReviewRequired": {
            "type": "boolean",
            "default": false,
            "description": "Signifies whether lives will have to scroll through the PDF to accept",
            "example": false
          },
          "isPdf": {
            "type": "boolean",
            "example": true,
            "description": "Determines if the Authorization contains a PDF document attached to it"
          }
        }
      },
      "BadRequest": {
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "example": "An error has occurred."
                },
                "message": {
                  "type": "string",
                  "example": "One or more validations errors occurred."
                },
                "field": {
                  "type": "string",
                  "example": "givenName"
                }
              }
            }
          }
        }
      },
      "NewAuthorization": {
        "required": [
          "name",
          "title",
          "description"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Resource name requested to be authorized. Resource names can be Medchart protected. Medchart protects its resource names by using the following format: ~/xxx/yyy.read. If the resource name starts with ~/, it is a Medchart resource name and the \".read\" (or \".write\") specifies the permission requested for that resource. eg: \"~/lives/demographics.read\" is a protected Medchart resource name that specifies read permission for a life\"s demographics. If the resource does not start with ~/, the resource is a custom one; hence, the resource name is within your domain. Therefore, you are responsible for controlling the access to the resources if the authorization is accepted. eg: \"patientHistory\" is a custom resource name because it does not match Medchart\"s protected resource name format",
            "example": "Medchart domain resource name ~/lives/demographics.read; Custom resource name bloodWork"
          },
          "title": {
            "type": "string",
            "description": "Authorization title that gives general context",
            "example": "Permission to access Blood Work"
          },
          "description": {
            "type": "string",
            "description": "Description/ reason why authorization is being requested",
            "example": "Access Blood Work information"
          },
          "identityRequirement": {
            "type": "string",
            "description": "Whether the authorization needs patient identity verification",
            "example": "IdAndIdentity"
          },
          "requiresLinkedLifeVerification": {
            "type": "boolean",
            "description": "Whether the authorization requires a user acting on behalf of the authorization owner to have their relationship verified",
            "example": true
          },
          "pdf": {
            "type": "object",
            "properties": {
              "isReviewRequired": {
                "type": "boolean",
                "description": "Whether the life is required to review the authorization before accepting",
                "example": true
              },
              "templateBase64": {
                "type": "string",
                "description": "Base64 string representation of a PDF file",
                "example": "JVBERi0xLj..."
              },
              "templateFields": {
                "type": "array",
                "description": "Collection of json values to populate the PDF with. Make sure  the template PDF form fields and the json field names match.",
                "items": {
                  "type": "object",
                  "properties": {
                    "fieldName": {
                      "type": "string",
                      "example": "${Organization.Name}"
                    },
                    "value": {
                      "type": "string",
                      "example": "PatientKeeper"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyHeader": {
        "type": "apiKey",
        "name": "Api-Key",
        "in": "header"
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Always required, obtain one using your Client Id and Client Secret"
      }
    },
    "parameters": {
      "apiVersion": {
        "name": "api-version",
        "in": "query",
        "description": "API Version",
        "schema": {
          "type": "string",
          "default": "21.09"
        }
      }
    },
    "responses": {
      "400BadRequest": {
        "description": "Bad Request <br><br>Returned when there is an error in the validation in any of the fields.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BadRequest",
              "example": {
                "errors": [
                  {
                    "code": "An error has occurred.",
                    "message": "One or more validations errors occurred.",
                    "field": "givenName"
                  }
                ]
              }
            }
          }
        }
      },
      "403Forbidden": {
        "description": "Forbidden <br><br>Returned when there are no authorizations for the specific resource."
      },
      "404NotFound": {
        "description": "Resource not found <br><br>Returned when the specific resource could not be found, or does not exist."
      }
    }
  },
  "security": [
    {
      "bearerAuth": [],
      "apiKeyHeader": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 129,
      "2": 102,
      "3": 174,
      "4": 222,
      "5": 237,
      "6": 125,
      "7": 0,
      "8": 30,
      "9": 225,
      "10": 38,
      "11": 162
    }
  }
}
```