Jake Colling
Jake Colling
RRailway
Created by Jake Colling on 8/5/2024 in #✋|help
How to set "app sleeping" via API
Hello, is there a way to set app sleeping via the API? I see ServiceInstance.sleepApplication in the schema but I don't see it as an option in the ServiceInstanceUpdate schema.
6 replies
RRailway
Created by Jake Colling on 7/30/2024 in #✋|help
Service Domain Created via API gets 404 error
Howdy, I'm trying to create a service domain via the API. The API call succeeds, and returns the domain URL but when that URL is accessed it just gets a 404 error. The dashboard also displays the service domain URL correctly. When I create the service domain URL via the dashboard it works as expected. Can you provide any guidance on if my mutation is incorrect or I'm using this wrong? API Mutation:
mutation CreateServiceDomain {
serviceDomainCreate(input: {environmentId: "${environmentId}", serviceId: "${serviceId}", targetPort: ${targetPort}}) {
id
environmentId
domain
projectId
serviceId
targetPort
updatedAt
}
}
mutation CreateServiceDomain {
serviceDomainCreate(input: {environmentId: "${environmentId}", serviceId: "${serviceId}", targetPort: ${targetPort}}) {
id
environmentId
domain
projectId
serviceId
targetPort
updatedAt
}
}
Output:
{
data: {
serviceDomainCreate: {
id: "de660a64-f075-4094-acaa-76457e7dc21d",
environmentId: "48a59fba-0c3b-402b-a145-301c086bd0bd",
domain: "false-piranha-production.up.railway.app",
projectId: null,
serviceId: "9f2edc68-0ed8-405e-9c91-caafe88bf052",
targetPort: 3000,
updatedAt: "2024-07-30T18:19:25.567Z",
},
},
{
data: {
serviceDomainCreate: {
id: "de660a64-f075-4094-acaa-76457e7dc21d",
environmentId: "48a59fba-0c3b-402b-a145-301c086bd0bd",
domain: "false-piranha-production.up.railway.app",
projectId: null,
serviceId: "9f2edc68-0ed8-405e-9c91-caafe88bf052",
targetPort: 3000,
updatedAt: "2024-07-30T18:19:25.567Z",
},
},
9 replies
RRailway
Created by Jake Colling on 7/30/2024 in #✋|help
Internal API - Invalid Service Name when creating project
Hey Folks, I'm trying to use the API to create a new project. I'm getting an error about an Invalid Service Name. I think this might be because my repo URL is pretty long? The projects do get created, but the graphql response comes back with an error and I'm not able to pull the new project id out of it. Is there any way to work around this? Or to pass in the service name as a variable? Or let me know if my mutation is just formatted wrong The mutation looks like this:
mutation {
projectCreate(
input: {
isPublic: false,
name: "apple-garlic",
repo: {
branch: "main",
fullRepoName: "caret-jake/artifact_64dab1ad-0e50-4ca3-a3d9-372286eca940"
},
}
) {
id
}
}
mutation {
projectCreate(
input: {
isPublic: false,
name: "apple-garlic",
repo: {
branch: "main",
fullRepoName: "caret-jake/artifact_64dab1ad-0e50-4ca3-a3d9-372286eca940"
},
}
) {
id
}
}
I get this error response
{
errors: [
{
message: "Invalid service name",
locations: [
[Object ...]
],
path: [ "projectCreate" ],
extensions: [Object ...],
traceId: "4053368649584985068",
}
],
data: null,
}
{
errors: [
{
message: "Invalid service name",
locations: [
[Object ...]
],
path: [ "projectCreate" ],
extensions: [Object ...],
traceId: "4053368649584985068",
}
],
data: null,
}
10 replies