Day 02 - Submit Response - POST raw text (instructions here)
Any help is appreciated:
I have set-up the API as secret {{postman_api_key}}
variable per the instructions. It didnāt like this - complaining about exposing the KEY. So I used the āwizardā to create a POSTMAN_API environment with the key - value pair
Both seem to work but is confusing what Iām supposed to do.
Regardless - I send a POST request (CURL below)"
curl --location --request POST 'https://api.getpostman.com/collections/27267296-9f9f0d2a-49b8-4691-8be1-4416216dcac6' \
--header 'x-api-key: ā¢ā¢ā¢ā¢ā¢ā¢' \
--header '<**!!!MY API KEY IN RAW TEXT!!!!**>;'
and get these FAILED TESTS:
FAILCorrect collection returned | AssertionError: Target cannot be null or undefined.
FAILOld request updated | TypeError: Cannot read properties of undefined (reading 'item')|Fix test
FAILNew request added | AssertionError: Target cannot be null or undefined.
I looked & donāt see what I am missing
RAW LOG
POST https://api.getpostman.com/collections/27267296-9f9f0d2a-49b8-4691-8be1-4416216dcac6: {
"Network": {
"addresses": {
"local": {
"address": "10.10.10.24",
"family": "IPv4",
"port": 63542
},
"remote": {
"address": "18.209.71.189",
"family": "IPv4",
"port": 443
}
},
"tls": {
"reused": true,
"authorized": true,
"authorizationError": null,
"cipher": {
"name": "ECDHE-RSA-AES128-GCM-SHA256",
"standardName": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"version": "TLSv1/SSLv3"
},
"protocol": "TLSv1.2",
"ephemeralKeyInfo": {},
"peerCertificate": {
"subject": {
"commonName": "postman.com",
"alternativeNames": "DNS:postman.com, DNS:*.postman.com, DNS:*.srv.postman.com, DNS:*.explore.postman.com, DNS:*.postman.co, DNS:*.cdn.postman.com, DNS:postman.co, DNS:*.mac.postman.com, DNS:*.id.postman.com, DNS:*.gw.postman.com, DNS:*.go.postman.com, DNS:*.getpostman.com, DNS:getpostman.com"
},
"issuer": {
"country": "US",
"organization": "Amazon",
"commonName": "Amazon RSA 2048 M03"
},
"validFrom": "Aug 12 00:00:00 2023 GMT",
"validTo": "Sep 9 23:59:59 2024 GMT",
"fingerprint": "42:78:49:20:2E:E1:03:B9:42:CA:28:4E:05:31:3D:C5:98:63:2C:37",
"serialNumber": "02b64ce8f1fbca9b6181b0a89019041d"
}
}
},
"Request Headers": {
"x-api-key": "PMAK-XX",
"user-agent": "PostmanRuntime/7.36.0",
"accept": "*/*",
"postman-token": "1c2e293d-f1ff-49e9-89a6-4cdfde446c43",
"host": "api.getpostman.com",
"accept-encoding": "gzip, deflate, br",
"connection": "keep-alive",
"content-length": "0"
},
"Response Headers": {
"date": "Wed, 13 Dec 2023 14:51:09 GMT",
"content-type": "application/json; charset=utf-8",
"content-length": "70",
"connection": "keep-alive",
"x-frame-options": "SAMEORIGIN",
"access-control-allow-origin": "*",
"x-srv-trace": "v=1;t=12d29087500ef0ef",
"x-srv-span": "v=1;s=bfcacf6e25170e40",
"etag": "W/\"46-9aD1jZThNU4PUOTjNGN6oaM20gs\"",
"vary": "Accept-Encoding"
},
"Response Body": "{\"error\":{\"name\":\"notFound\",\"message\":\"Requested resource not found\"}}"
}