> ## Documentation Index
> Fetch the complete documentation index at: https://docs.judit.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Systems and Credential Status

> List the systems available in the vault, with the exact `system_name` to use when registering, and check the credential status of a `customer_key`. This endpoint does not register credentials.

<ResponseExample>
  ```json Without customer_key theme={null}
  {
  	"systems": [
  		{
  			"name": "*",
  			"customer_key": "",
  			"credential_status": "not exists"
  		},
  		{
  			"name": "EPROC - JFES - 1º grau",
  			"customer_key": "*",
  			"credential_status": "not exists"
  		},
  		{
  			"name": "PJE TJBA - 1º grau",
  			"customer_key": "*",
  			"credential_status": "active"
  		},
  		{
  			"name": "PJE TRF1 - 2º grau",
  			"customer_key": "*",
  			"credential_status": "not exists"
  		}
  	]
  }
  ```

  ```json With customer_key=lawyer_01 theme={null}
  {
  	"systems": [
  		{
  			"name": "*",
  			"customer_key": "lawyer_01",
  			"credential_status": "active"
  		},
  		{
  			"name": "PJE TJBA - 1º grau",
  			"customer_key": "lawyer_01",
  			"credential_status": "active"
  		}
  	]
  }
  ```
</ResponseExample>

<Accordion title="Credential Status Types">
  *credential\_status can be*:

  `not exists`: Not registered

  `active`: Registered and active

  `inactive`: The credential failed to log in to the court (invalid or expired password, blocked user or expired certificate). Revalidate the login in the court portal and register the credential again to make it `active`.

  If a registration is created under the system `*` (generic registration), that credential will be used for every court that does not have its own specific registration in the same `customer_key` — so be careful with this type of registration.
</Accordion>

Without the `customer_key` parameter (or with `?customer_key=*`), the response lists every system available in the vault, with the status of each one under the default key `*` (use this list to copy the exact `system_name`). The example above is shortened. How to read the example without `customer_key`:

* **Row `"name": "*"` with `"customer_key": ""`:** this is the wildcard credential of the default key. The `customer_key` is empty because no wildcard is registered under that key (`not exists`). When one exists, it is filled in.
* **Other rows with `"customer_key": "*"`:** the API repeats the default key used as the filter, even when the status is `not exists`. This `*` is not a registered wildcard credential.

With `?customer_key=...`, the `"name": "*"` row is the wildcard of that key and the other rows are only the systems with their own credential under it. If no `customer_key` is provided at registration, the default value `*` is used; the default key is never empty.


## OpenAPI

````yaml openapi/vault.json GET /credentials
openapi: 3.0.3
info:
  title: JUDIT - Credentials Vault API
  description: >-
    OpenAPI description for the credentials vault routes: register, inspect and
    delete per-tribunal credentials (username/password, 2FA secret or A1
    certificate).
  version: 1.0.0
servers:
  - url: https://crawler.prod.judit.io
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Credentials
    description: Register and inspect tribunal system credentials stored in the vault
paths:
  /credentials:
    get:
      tags:
        - Credentials
      summary: List credential status by system
      description: >-
        Returns the credential status of each tribunal system. Without
        `customer_key`, lists every system available in the vault (use it to
        copy the exact `system_name`). With `customer_key`, lists only the
        systems that have a credential for that key, plus the wildcard (`*`)
        row. `inactive` means the credential failed to log in to the court
        (invalid/expired password, blocked user or expired certificate);
        re-register it to make it `active` again.
      operationId: getCredentials
      parameters:
        - name: customer_key
          in: query
          required: false
          description: Credential key defined at registration. Defaults to `*`.
          schema:
            type: string
      responses:
        '200':
          description: List of systems with their credential status
          content:
            application/json:
              schema:
                type: object
                properties:
                  systems:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: >-
                            Tribunal system name, or `*` for the wildcard
                            credential
                        customer_key:
                          type: string
                          description: >-
                            Key used as the filter (default `*`). In the `*` row
                            it is empty when no wildcard credential exists for
                            that key; the other rows repeat the filter key even
                            when the status is `not exists`.
                        credential_status:
                          type: string
                          enum:
                            - not exists
                            - active
                            - inactive
                          description: >-
                            `active`: available. `inactive`: failed to log in to
                            the court. `not exists`: no credential registered.
              example:
                systems:
                  - name: '*'
                    customer_key: ''
                    credential_status: not exists
                  - name: PJE TJBA - 1º grau
                    customer_key: '*'
                    credential_status: not exists
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api-key
      description: API key for authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.