openapi: 3.2.0 info: title: Palo Alto Networks Access Keys API version: Latest contact: {} description: 'Operations tagged Access Keys across 2 of this provider''s published API definitions: palo-alto-cspm-accesskeys-openapi.json, palo-alto-cspm-consolidated-spec-cspm-spec-openapi.json. Each path carries the servers of the definition it was published in.' servers: - url: https://api.prismacloud.io - url: https://api2.prismacloud.io - url: https://api3.prismacloud.io - url: https://api4.prismacloud.io - url: https://api.anz.prismacloud.io - url: https://api.eu.prismacloud.io - url: https://api2.eu.prismacloud.io - url: https://api.gov.prismacloud.io - url: https://api.prismacloud.cn - url: https://api.ca.prismacloud.io - url: https://api.sg.prismacloud.io - url: https://api.uk.prismacloud.io - url: https://api.ind.prismacloud.io - url: https://api.jp.prismacloud.io - url: https://api.fr.prismacloud.io tags: - description: "Access Keys are a secure way to enable programmatic access to the Prisma Cloud API. By default, only \nthe System Admin has API access and can enable API access for other administrators. If you have API access, \nyou can create up to two access keys. Create an access key for a limited time period and regenerate your API \nkeys periodically to minimize exposure and follow security best practices.\n" name: Access Keys paths: /access_keys: get: description: Returns all access keys for your tenant if you have a Prisma Cloud System Admin role. Returns just your access keys if you don't have this role. operationId: get-my-access-keys responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/UserAccessKeyDetailResponseModel' type: array description: successful operation '400': description: user_inactive_or_not_exist '403': description: unauthorized_to_use_access_keys security: - x-redlock-auth: [] summary: List Access Keys tags: - Access Keys post: description: "Adds a new access key for the current user. If you have API access, you can create up to two access keys. \n\nIf you want to create an access key for an existing Prisma Cloud service account instead of for the current user, then\nspecify the name of the existing service account as the value for the request body parameter **serviceAccountName**.\n" operationId: add-access-keys requestBody: content: application/json: schema: $ref: '#/components/schemas/UserAccessKeyRequestModel' description: Model for user access key required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/CreateUserAccessKeyResponseModel' description: successful operation '400': description: invalid_expiry_access_key / already_have_two_access_keys / invalid_access_key_name_length / invalid_access_key_name '403': description: unauthorized_to_use_access_keys '409': description: duplicate_access_key_name security: - x-redlock-auth: [] summary: Add Access Key tags: - Access Keys servers: - url: https://api.prismacloud.io - url: https://api2.prismacloud.io - url: https://api3.prismacloud.io - url: https://api4.prismacloud.io - url: https://api.anz.prismacloud.io - url: https://api.eu.prismacloud.io - url: https://api2.eu.prismacloud.io - url: https://api.gov.prismacloud.io - url: https://api.prismacloud.cn - url: https://api.ca.prismacloud.io - url: https://api.sg.prismacloud.io - url: https://api.uk.prismacloud.io - url: https://api.ind.prismacloud.io - url: https://api.jp.prismacloud.io - url: https://api.fr.prismacloud.io /access_keys/{id}: get: description: Returns the metadata of the access key that has the specified ID. operationId: get-access-key-by-id parameters: - description: Access key ID in: path name: id required: true schema: format: uuid type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/UserAccessKeyResponseModel' description: successful operation '400': description: user_inactive_or_not_exist '403': description: unauthorized_to_use_access_keys security: - x-redlock-auth: [] summary: Get Access Key by ID tags: - Access Keys delete: description: Deletes the access key that has the specified ID. operationId: delete-access-keys parameters: - description: Access key ID in: path name: id required: true schema: format: uuid type: string responses: '200': description: successful operation '400': description: user_inactive_or_not_exist '403': description: unauthorized_to_use_access_keys security: - x-redlock-auth: [] summary: Delete Access Key tags: - Access Keys servers: - url: https://api.prismacloud.io - url: https://api2.prismacloud.io - url: https://api3.prismacloud.io - url: https://api4.prismacloud.io - url: https://api.anz.prismacloud.io - url: https://api.eu.prismacloud.io - url: https://api2.eu.prismacloud.io - url: https://api.gov.prismacloud.io - url: https://api.prismacloud.cn - url: https://api.ca.prismacloud.io - url: https://api.sg.prismacloud.io - url: https://api.uk.prismacloud.io - url: https://api.ind.prismacloud.io - url: https://api.jp.prismacloud.io - url: https://api.fr.prismacloud.io /access_keys/{id}/status/{status}: patch: description: Activates or deactivates the access key that has the specified ID. You cannot activate an expired access key. operationId: update-access-key-status parameters: - description: Access key ID in: path name: id required: true schema: format: uuid type: string - description: Whether or not the access key is active. True means active. in: path name: status required: true schema: type: boolean responses: '200': description: successful operation '400': description: empty_access_key_status_provided '403': description: unauthorized_to_use_access_keys security: - x-redlock-auth: [] summary: Update Access Key Status tags: - Access Keys servers: - url: https://api.prismacloud.io - url: https://api2.prismacloud.io - url: https://api3.prismacloud.io - url: https://api4.prismacloud.io - url: https://api.anz.prismacloud.io - url: https://api.eu.prismacloud.io - url: https://api2.eu.prismacloud.io - url: https://api.gov.prismacloud.io - url: https://api.prismacloud.cn - url: https://api.ca.prismacloud.io - url: https://api.sg.prismacloud.io - url: https://api.uk.prismacloud.io - url: https://api.ind.prismacloud.io - url: https://api.jp.prismacloud.io - url: https://api.fr.prismacloud.io components: schemas: UserAccessKeyResponseModel: description: Model for user access keys GET response properties: expiresOn: description: Timestamp in milliseconds when access key expires format: int64 type: integer id: description: Access key ID type: string name: description: Access key name type: string type: object UserAccessKeyDetailResponseModel: description: Model for get user access keys response properties: createdBy: description: Created By type: string createdTs: description: Time access key was created format: int64 type: integer expiresOn: description: Access key expires on format: int64 type: integer id: description: Access key id type: string lastUsedTime: description: Access key last used format: int64 type: integer name: description: Name type: string role: additionalProperties: type: string description: User role type: object roleType: description: User role permission type type: string status: description: Access key status type: string username: description: Access key user name type: string type: object UserAccessKeyRequestModel: description: Model for create user access key request properties: expiresOn: description: Timestamp in milliseconds when access key expires format: int64 type: integer name: description: Access key name type: string serviceAccountName: description: Service account name type: string required: - name type: object CreateUserAccessKeyResponseModel: description: Model for create user access key response properties: id: description: Access key ID type: string secretKey: description: Access key secret type: string type: object securitySchemes: x-redlock-auth: description: The x-redlock-auth value is a JSON Web Token (JWT). in: header name: x-redlock-auth type: apiKey x-refined-from: - palo-alto-cspm-accesskeys-openapi.json - palo-alto-cspm-consolidated-spec-cspm-spec-openapi.json