Test Log In to API
POST/targets/:id/check_api_login/
Test the API login configuration by making a login request
and returning available JSON selectors from the response.
Supported media types:
application/json: JSON-formatted payload in request bodyapplication/x-www-form-urlencoded: Form-encoded payload in URLapplication/graphql: Raw GraphQL query string
Request
Path Parameters
- application/json
- application/x-www-form-urlencoded
- multipart/form-data
Body
required
application/json- The payload is in JSON format in the request body.application/x-www-form-urlencoded- The payload is encoded in the request URL.application/graphql- The payload is a raw GraphQL query string.cookie- Cookieheader- Header
Possible values: [application/json, application/x-www-form-urlencoded, application/graphql]
Format of the payload:
Possible values: <= 2048 characters
URL to make the authentication request to the API.
The maximum length is 2048 characters.
Possible values: <= 4096 characters
Payload to send in the authentication request.
The maximum length is 4096 characters.
Possible values: <= 256 characters
Field containing the authentication token in the response to the authentication request.
The maximum length is 256 characters.
Possible values: <= 16 characters
Prefix to add to the authentication token.
For example, "Bearer" or "JWT".
The maximum length is 16 characters.
Possible values: <= 256 characters
Parameter name to send the authentication token.
For example, "Authorization".
The maximum length is 256 characters.
Possible values: [cookie, header]
Where to send the parameter name with the authentication token and the prefix:
Body
required
application/json- The payload is in JSON format in the request body.application/x-www-form-urlencoded- The payload is encoded in the request URL.application/graphql- The payload is a raw GraphQL query string.cookie- Cookieheader- Header
Possible values: [application/json, application/x-www-form-urlencoded, application/graphql]
Format of the payload:
Possible values: <= 2048 characters
URL to make the authentication request to the API.
The maximum length is 2048 characters.
Possible values: <= 4096 characters
Payload to send in the authentication request.
The maximum length is 4096 characters.
Possible values: <= 256 characters
Field containing the authentication token in the response to the authentication request.
The maximum length is 256 characters.
Possible values: <= 16 characters
Prefix to add to the authentication token.
For example, "Bearer" or "JWT".
The maximum length is 16 characters.
Possible values: <= 256 characters
Parameter name to send the authentication token.
For example, "Authorization".
The maximum length is 256 characters.
Possible values: [cookie, header]
Where to send the parameter name with the authentication token and the prefix:
Body
required
application/json- The payload is in JSON format in the request body.application/x-www-form-urlencoded- The payload is encoded in the request URL.application/graphql- The payload is a raw GraphQL query string.cookie- Cookieheader- Header
Possible values: [application/json, application/x-www-form-urlencoded, application/graphql]
Format of the payload:
Possible values: <= 2048 characters
URL to make the authentication request to the API.
The maximum length is 2048 characters.
Possible values: <= 4096 characters
Payload to send in the authentication request.
The maximum length is 4096 characters.
Possible values: <= 256 characters
Field containing the authentication token in the response to the authentication request.
The maximum length is 256 characters.
Possible values: <= 16 characters
Prefix to add to the authentication token.
For example, "Bearer" or "JWT".
The maximum length is 16 characters.
Possible values: <= 256 characters
Parameter name to send the authentication token.
For example, "Authorization".
The maximum length is 256 characters.
Possible values: [cookie, header]
Where to send the parameter name with the authentication token and the prefix:
Responses
- 200
- 400
- 401
- 404
- 500
- application/json
- Schema
- Example (from schema)
- JSONLogin
- Form-EncodedLogin
- GraphQLRawQuery
Schema
Array [
]
string
[
"[\"user.username\", \"user.email\"]"
]
JSON Login
{
"api_login_url": "https://api.example.com/auth/login",
"api_login_payload": "{\"username\": \"user\", \"password\": \"pass\"}",
"media_type": "application/json"
}
Form-Encoded Login
{
"api_login_url": "https://api.example.com/auth/login",
"api_login_payload": "username=user&password=pass",
"media_type": "application/x-www-form-urlencoded"
}
GraphQL Raw Query
{
"api_login_url": "https://api.example.com/graphql",
"api_login_payload": "mutation Login { login(email: \"[email protected]\", password: \"pass123\") { token user { id email } } }",
"media_type": "application/graphql"
}
- application/json
- Schema
- Example (from schema)
Schema
{
"<field name>": [
"Errors related to field <field name>."
],
"non_field_errors": [
"Errors not related to any field specific field."
]
}
- application/json
- Schema
- Example (from schema)
Schema
{
"detail": "Incorrect authentication credentials."
}
- application/json
- Schema
- Example (from schema)
Schema
{
"detail": "Not found."
}
- application/json
- Schema
- Example (from schema)
Schema
{
"detail": "Unexpected error while handling your request."
}