Open
Description
With the code:
import * as Fastly from "fastly";
Fastly.ApiClient.instance.authenticate("XXXX");
Fastly.ApiClient.instance.plugins = [
function logRequest(req) {
req.on('response', (res) => {
console.log(JSON.stringify(res.body, null, 2));
});
return req;
}
];
async function test() {
const apiInstance = new Fastly.ServiceAuthorizationsApi();
const options = {
service_authorization_id: 'YYY',
};
try {
const response = await apiInstance.showServiceAuthorization(options);
console.log(JSON.stringify(response, null, 2));
} catch(error) {
console.error("Error calling ServiceAuthorizationsApi.showServiceAuthorization", error);
}
}
test()
I am getting back:
{
"data": {
"type": "service_authorization",
"attributes": {
"created_at": "2024-11-12T17:16:09.000Z",
"deleted_at": null,
"updated_at": "2024-11-12T17:16:09.000Z"
},
"relationships": {
"service": {},
"user": {
"data": {
"type": "user",
"id": "ZZZ"
}
}
},
"id": "YYY"
}
}
While if I sniff the response I see:
{
"data": {
"id": "YYY",
"type": "service_authorization",
"attributes": {
"created_at": "2024-11-12T17:16:09Z",
"updated_at": "2024-11-12T17:16:09Z",
"deleted_at": null,
"permission": "read_only"
},
"relationships": {
"service": {
"data": {
"id": "AAA",
"type": "service"
}
},
"user": {
"data": {
"id": "ZZZ",
"type": "user"
}
}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels