Mobile Suits
Get all mobile suits
fetch('https://fakegundamwikiapi.onrender.com/api/mobile-suits', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN_HERE',
'Content-Type': 'application/json'
}
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
[
{
"mobileSuitId": 1,
"mobileSuitName": "RX-78-2 Gundam",
"mobileSuitUnitType": "Prototype Close Quarters Combat Mobile Suit",
"mobileSuitFirstSeen": "September 18, 0079 U.C.",
"mobileSuitLastSeen": "December 31, 0079 U.C.",
"manufacturer": {
"manufacturerId": 1,
"manufacturerName": "Earth Federation",
"isActive": true,
"created": "2024-02-11T16:59:51.6310774",
"createdBy": null,
"lastModified": "2024-02-11T16:59:51.6312354",
"lastModifiedBy": null
},
"serie": {
"serieId": 1,
"serieName": "Mobile Suit Gundam",
"universe": {
"universeId": 1,
"universeName": "Universal Century",
"isActive": true,
"created": "2024-02-09T23:51:27.8694251",
"createdBy": null,
"lastModified": "2024-02-09T23:51:27.8696064",
"lastModifiedBy": null
},
"isActive": true,
"created": "2024-02-11T17:00:29.6279104",
"createdBy": null,
"lastModified": "2024-02-11T17:00:29.6279259",
"lastModifiedBy": null
},
"pilots": [
{
"characterId": 1,
"characterName": "Amuro Ray",
"characterAliases": "The White Devil",
"characterClassification": "Newtype",
"characterBirthDate": "November 4,0063",
"characterGenderId": 2,
"affiliations": [
{
"affiliationId": 1,
"affiliationName": "Earth Federation Forces",
"affiliationPurpose": "Military Organization",
"isActive": true,
"created": "2024-02-11T16:49:02.0024956",
"createdBy": null,
"lastModified": "2024-02-11T16:49:02.0027397",
"lastModifiedBy": null
},
{
"affiliationId": 2,
"affiliationName": "Karaba",
"affiliationPurpose": "Resistance movement",
"isActive": true,
"created": "2024-02-11T16:50:01.1771117",
"createdBy": null,
"lastModified": "2024-02-11T16:50:01.1771201",
"lastModifiedBy": null
},
{
"affiliationId": 3,
"affiliationName": "Londo Bell",
"affiliationPurpose": "Special Operations Forces",
"isActive": true,
"created": "2024-02-11T16:50:31.1738626",
"createdBy": null,
"lastModified": "2024-02-11T16:50:31.1738749",
"lastModifiedBy": null
}
],
"isActive": true,
"created": "2024-02-11T16:52:17.3530024",
"createdBy": null,
"lastModified": "2024-02-11T16:52:17.3530225",
"lastModifiedBy": null
}
],
"created": "2024-02-12T01:31:55.5904114",
"createdBy": null,
"lastModified": "2024-02-12T01:31:55.5905124",
"lastModifiedBy": null
}
]
Get a single mobile suit
fetch('https://fakegundamwikiapi.onrender.com/api/mobile-suits/1', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN_HERE',
'Content-Type': 'application/json'
}
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
{
"mobileSuitId": 1,
"mobileSuitName": "RX-78-2 Gundam",
"mobileSuitUnitType": "Prototype Close Quarters Combat Mobile Suit",
"mobileSuitFirstSeen": "September 18, 0079 U.C.",
"mobileSuitLastSeen": "December 31, 0079 U.C.",
"manufacturer": {
"manufacturerId": 1,
"manufacturerName": "Earth Federation",
"isActive": true,
"created": "2024-02-11T16:59:51.6310774",
"createdBy": null,
"lastModified": "2024-02-11T16:59:51.6312354",
"lastModifiedBy": null
},
"serie": {
"serieId": 1,
"serieName": "Mobile Suit Gundam",
"universe": {
"universeId": 1,
"universeName": "Universal Century",
"isActive": true,
"created": "2024-02-09T23:51:27.8694251",
"createdBy": null,
"lastModified": "2024-02-09T23:51:27.8696064",
"lastModifiedBy": null
},
"isActive": true,
"created": "2024-02-11T17:00:29.6279104",
"createdBy": null,
"lastModified": "2024-02-11T17:00:29.6279259",
"lastModifiedBy": null
},
"pilots": [
{
"characterId": 1,
"characterName": "Amuro Ray",
"characterAliases": "The White Devil",
"characterClassification": "Newtype",
"characterBirthDate": "November 4,0063",
"characterGenderId": 2,
"affiliations": [
{
"affiliationId": 1,
"affiliationName": "Earth Federation Forces",
"affiliationPurpose": "Military Organization",
"isActive": true,
"created": "2024-02-11T16:49:02.0024956",
"createdBy": null,
"lastModified": "2024-02-11T16:49:02.0027397",
"lastModifiedBy": null
},
{
"affiliationId": 2,
"affiliationName": "Karaba",
"affiliationPurpose": "Resistance movement",
"isActive": true,
"created": "2024-02-11T16:50:01.1771117",
"createdBy": null,
"lastModified": "2024-02-11T16:50:01.1771201",
"lastModifiedBy": null
},
{
"affiliationId": 3,
"affiliationName": "Londo Bell",
"affiliationPurpose": "Special Operations Forces",
"isActive": true,
"created": "2024-02-11T16:50:31.1738626",
"createdBy": null,
"lastModified": "2024-02-11T16:50:31.1738749",
"lastModifiedBy": null
}
],
"isActive": true,
"created": "2024-02-11T16:52:17.3530024",
"createdBy": null,
"lastModified": "2024-02-11T16:52:17.3530225",
"lastModifiedBy": null
}
],
"created": "2024-02-12T01:31:55.5904114",
"createdBy": null,
"lastModified": "2024-02-12T01:31:55.5905124",
"lastModifiedBy": null
}
Create a new mobile suit
fetch('https://fakegundamwikiapi.onrender.com/api/mobile-suits', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN_HERE',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"mobileSuitName": "string",
"mobileSuitUnitType": "string",
"mobileSuitFirstSeen": "string",
"mobileSuitLastSeen": "string",
"manufacturerId": 0,
"serieId": 0,
"pilotIds": [
0
] })
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
{
"mobileSuitId": 1,
"mobileSuitName": "RX-78-2 Gundam",
"mobileSuitUnitType": "Prototype Close Quarters Combat Mobile Suit",
"mobileSuitFirstSeen": "September 18, 0079 U.C.",
"mobileSuitLastSeen": "December 31, 0079 U.C.",
"manufacturer": {
"manufacturerId": 1,
"manufacturerName": "Earth Federation",
"isActive": true,
"created": "2024-02-11T16:59:51.6310774",
"createdBy": null,
"lastModified": "2024-02-11T16:59:51.6312354",
"lastModifiedBy": null
},
"serie": {
"serieId": 1,
"serieName": "Mobile Suit Gundam",
"universe": {
"universeId": 1,
"universeName": "Universal Century",
"isActive": true,
"created": "2024-02-09T23:51:27.8694251",
"createdBy": null,
"lastModified": "2024-02-09T23:51:27.8696064",
"lastModifiedBy": null
},
"isActive": true,
"created": "2024-02-11T17:00:29.6279104",
"createdBy": null,
"lastModified": "2024-02-11T17:00:29.6279259",
"lastModifiedBy": null
},
"pilots": [
{
"characterId": 1,
"characterName": "Amuro Ray",
"characterAliases": "The White Devil",
"characterClassification": "Newtype",
"characterBirthDate": "November 4,0063",
"characterGenderId": 2,
"affiliations": [
{
"affiliationId": 1,
"affiliationName": "Earth Federation Forces",
"affiliationPurpose": "Military Organization",
"isActive": true,
"created": "2024-02-11T16:49:02.0024956",
"createdBy": null,
"lastModified": "2024-02-11T16:49:02.0027397",
"lastModifiedBy": null
},
{
"affiliationId": 2,
"affiliationName": "Karaba",
"affiliationPurpose": "Resistance movement",
"isActive": true,
"created": "2024-02-11T16:50:01.1771117",
"createdBy": null,
"lastModified": "2024-02-11T16:50:01.1771201",
"lastModifiedBy": null
},
{
"affiliationId": 3,
"affiliationName": "Londo Bell",
"affiliationPurpose": "Special Operations Forces",
"isActive": true,
"created": "2024-02-11T16:50:31.1738626",
"createdBy": null,
"lastModified": "2024-02-11T16:50:31.1738749",
"lastModifiedBy": null
}
],
"isActive": true,
"created": "2024-02-11T16:52:17.3530024",
"createdBy": null,
"lastModified": "2024-02-11T16:52:17.3530225",
"lastModifiedBy": null
}
],
"created": "2024-02-12T01:31:55.5904114",
"createdBy": null,
"lastModified": "2024-02-12T01:31:55.5905124",
"lastModifiedBy": null
}
Update a mobile suit
fetch('https://fakegundamwikiapi.onrender.com/api/mobile-suits/1', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_TOKEN_HERE',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"mobileSuitId" : 1
"mobileSuitName": "string",
"mobileSuitUnitType": "string",
"mobileSuitFirstSeen": "string",
"mobileSuitLastSeen": "string",
"manufacturerId": 1,
"serieId": 1,
"pilotIds": [1 ] })
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
{
"mobileSuitId": 1,
"mobileSuitName": "RX-78-2 Gundam",
"mobileSuitUnitType": "Prototype Close Quarters Combat Mobile Suit",
"mobileSuitFirstSeen": "September 18, 0079 U.C.",
"mobileSuitLastSeen": "December 31, 0079 U.C.",
"manufacturer": {
"manufacturerId": 1,
"manufacturerName": "Earth Federation",
"isActive": true,
"created": "2024-02-11T16:59:51.6310774",
"createdBy": null,
"lastModified": "2024-02-11T16:59:51.6312354",
"lastModifiedBy": null
},
"serie": {
"serieId": 1,
"serieName": "Mobile Suit Gundam",
"universe": {
"universeId": 1,
"universeName": "Universal Century",
"isActive": true,
"created": "2024-02-09T23:51:27.8694251",
"createdBy": null,
"lastModified": "2024-02-09T23:51:27.8696064",
"lastModifiedBy": null
},
"isActive": true,
"created": "2024-02-11T17:00:29.6279104",
"createdBy": null,
"lastModified": "2024-02-11T17:00:29.6279259",
"lastModifiedBy": null
},
"pilots": [
{
"characterId": 1,
"characterName": "Amuro Ray",
"characterAliases": "The White Devil",
"characterClassification": "Newtype",
"characterBirthDate": "November 4,0063",
"characterGenderId": 2,
"affiliations": [
{
"affiliationId": 1,
"affiliationName": "Earth Federation Forces",
"affiliationPurpose": "Military Organization",
"isActive": true,
"created": "2024-02-11T16:49:02.0024956",
"createdBy": null,
"lastModified": "2024-02-11T16:49:02.0027397",
"lastModifiedBy": null
},
{
"affiliationId": 2,
"affiliationName": "Karaba",
"affiliationPurpose": "Resistance movement",
"isActive": true,
"created": "2024-02-11T16:50:01.1771117",
"createdBy": null,
"lastModified": "2024-02-11T16:50:01.1771201",
"lastModifiedBy": null
},
{
"affiliationId": 3,
"affiliationName": "Londo Bell",
"affiliationPurpose": "Special Operations Forces",
"isActive": true,
"created": "2024-02-11T16:50:31.1738626",
"createdBy": null,
"lastModified": "2024-02-11T16:50:31.1738749",
"lastModifiedBy": null
}
],
"isActive": true,
"created": "2024-02-11T16:52:17.3530024",
"createdBy": null,
"lastModified": "2024-02-11T16:52:17.3530225",
"lastModifiedBy": null
}
],
"created": "2024-02-12T01:31:55.5904114",
"createdBy": null,
"lastModified": "2024-02-12T01:31:55.5905124",
"lastModifiedBy": null
}
Delete a mobile suit
fetch('https://fakegundamwikiapi.onrender.com/api/mobile-suits/1', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_TOKEN_HERE',
'Content-Type': 'application/json'
},
});;