Title: WP_REST_Application_Passwords_Controller::get_item_schema
Published: December 9, 2020
Last modified: May 20, 2026

---

# WP_REST_Application_Passwords_Controller::get_item_schema(): array

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/get_item_schema/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/get_item_schema/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/get_item_schema/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/get_item_schema/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/get_item_schema/?output_format=md#wp--skip-link--target)

Retrieves the application password’s schema, conforming to JSON Schema.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/get_item_schema/?output_format=md#return)󠁿

 array Item schema data.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/get_item_schema/?output_format=md#source)󠁿

    ```php
    public function get_item_schema() {
    	if ( $this->schema ) {
    		return $this->add_additional_fields_schema( $this->schema );
    	}

    	$this->schema = array(
    		'$schema'    => 'http://json-schema.org/draft-04/schema#',
    		'title'      => 'application-password',
    		'type'       => 'object',
    		'properties' => array(
    			'uuid'      => array(
    				'description' => __( 'The unique identifier for the application password.' ),
    				'type'        => 'string',
    				'format'      => 'uuid',
    				'context'     => array( 'view', 'edit', 'embed' ),
    				'readonly'    => true,
    			),
    			'app_id'    => array(
    				'description' => __( 'A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.' ),
    				'type'        => 'string',
    				'oneOf'       => array(
    					array(
    						'type'   => 'string',
    						'format' => 'uuid',
    					),
    					array(
    						'type' => 'string',
    						'enum' => array( '' ),
    					),
    				),
    				'context'     => array( 'view', 'edit', 'embed' ),
    			),
    			'name'      => array(
    				'description' => __( 'The name of the application password.' ),
    				'type'        => 'string',
    				'required'    => true,
    				'context'     => array( 'view', 'edit', 'embed' ),
    				'minLength'   => 1,
    				'pattern'     => '.*\S.*',
    			),
    			'password'  => array(
    				'description' => __( 'The generated password. Only available after adding an application.' ),
    				'type'        => 'string',
    				'context'     => array( 'edit' ),
    				'readonly'    => true,
    			),
    			'created'   => array(
    				'description' => __( 'The GMT date the application password was created.' ),
    				'type'        => 'string',
    				'format'      => 'date-time',
    				'context'     => array( 'view', 'edit' ),
    				'readonly'    => true,
    			),
    			'last_used' => array(
    				'description' => __( 'The GMT date the application password was last used.' ),
    				'type'        => array( 'string', 'null' ),
    				'format'      => 'date-time',
    				'context'     => array( 'view', 'edit' ),
    				'readonly'    => true,
    			),
    			'last_ip'   => array(
    				'description' => __( 'The IP address the application password was last used by.' ),
    				'type'        => array( 'string', 'null' ),
    				'format'      => 'ip',
    				'context'     => array( 'view', 'edit' ),
    				'readonly'    => true,
    			),
    		),
    	);

    	return $this->add_additional_fields_schema( $this->schema );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php#L785)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php#L785-L856)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/get_item_schema/?output_format=md#related)󠁿

| Uses | Description | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/get_item_schema/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.6.0](https://developer.wordpress.org/reference/since/5.6.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_rest_application_passwords_controller%2Fget_item_schema%2F)
before being able to contribute a note or feedback.