Railway Question..
swiftdev12
HOBBYOP

9 months ago

I have a question containing the endpoints for Railway.. where do you find when you wanna upload a project, and you have to see what type it is for example, static, veo and anymore please.

$10 Bounty

35 Replies

swiftdev12
HOBBYOP

9 months ago

N/A


9 months ago

By endpoints do you mean the cli or api?


swiftdev12
HOBBYOP

9 months ago

api


swiftdev12
HOBBYOP

9 months ago

[ERROR] [RailwayUpload] Failed: Problem processing request
[ERROR] [RailwayUploadSheet] ✗ Problem processing request

It shows this but not sure why I am using
private static let endpoint = URL(string: "https://backboard.railway.app/graphql/v2")!


9 months ago

I'm assuming you've created a project token and are including that in the request?

https://railway.com/account/tokens

What are you sending to that URL? It should be graphql and should look something like this

https://docs.railway.com/guides/manage-projects


swiftdev12
HOBBYOP

9 months ago

I am using an unsoped token


swiftdev12
HOBBYOP

9 months ago

that 2nd URL fetches the project, I am not trying to fetch any projects curretly, I am trying to make a project within Railway using my app


9 months ago

You're trying to make a new project in Railway using the api? I'm not sure that's currently possible. You can create a service using the api

https://docs.railway.com/guides/manage-services


swiftdev12
HOBBYOP

9 months ago

it is possible, I did it once, but forgotten what I did.


swiftdev12
HOBBYOP

9 months ago

You can achieve this without github and works.


swiftdev12
HOBBYOP

9 months ago

1386834164610891800


swiftdev12
HOBBYOP

9 months ago

Just trying to get my files uploaded to railway


9 months ago

Railway has an API collection file you can look through: https://docs.railway.com/guides/public-api#api-collection-file
I'm not super fluent with graphql, but there's a mutation for creating a project in it. Maybe this will help you?

mutation projectCreate($input: ProjectCreateInput!) {
  projectCreate(input: $input) {
    __typename
    # baseEnvironment
    baseEnvironmentId
    botPrEnvironments
    createdAt
    deletedAt
    # deploymentTriggers
    # deployments
    description
    # environments
    expiredAt
    # groups
    id
    isPublic
    isTempProject
    # members
    name
    # plugins
    prDeploys
    # projectPermissions
    # services
    subscriptionPlanLimit
    subscriptionType
    # team
    teamId
    updatedAt
    # volumes
    # webhooks
  }
}

swiftdev12
HOBBYOP

9 months ago

maybe..


9 months ago

perhaps this example code could help? -


swiftdev12
HOBBYOP

9 months ago

[ERROR] [Railway] FULL ERROR ⇒ [["traceId": 7266734769645533566, "message": Problem processing request], ["message": Problem processing request, "traceId": 7266734769645533566]]
[ERROR] [RailwayUpload] Failed: Problem processing request
[ERROR] [RailwayUpload] Upload failed: Problem processing request
[ERROR] [RailwayUploadSheet] ✗ Problem processing request

This is what I am currently getting..


swiftdev12
HOBBYOP

9 months ago

this is all I am getting not sure if it is Railway side
[ERROR] [Railway] FULL ERROR ⇒ [["message": Problem processing request, "traceId": 6601968694414192775], ["traceId": 6601968694414192775, "message": Problem processing request]]
[ERROR] [RailwayUpload] Failed: Problem processing request
[ERROR] [RailwayUpload] Upload failed: Problem processing request
[ERROR] [RailwayUploadSheet] ✗ Problem processing request


9 months ago

This doesn't seem like an error that my code would throw


9 months ago

Please try my code and go from there


swiftdev12
HOBBYOP

9 months ago

yours is python, mine swift


swiftdev12
HOBBYOP

9 months ago

I am using yours just in swift


9 months ago

I wrote it in python so that is can easily be translated into other languages


swiftdev12
HOBBYOP

9 months ago

ah ok


swiftdev12
HOBBYOP

9 months ago

whch file is it project_create.py?


9 months ago

Please read all the code for a good understanding of whats happening


swiftdev12
HOBBYOP

9 months ago

ok


swiftdev12
HOBBYOP

9 months ago

[INFO]    [Railway] Creating project with name: live-web, description: none, teamId: none
[DEBUG]   [Railway] Sending create project mutation with variables: ["input": ["description": "", "name": "live-web"]]
[DEBUG]   [Railway] Preparing GraphQL request - Query: mutation CreateProject($input: ProjectCreateInput!..., Variables: ["input": ["description": "", "name": "live-web"]]
[DEBUG]   [Railway] Sending GraphQL request - Body size: 238 bytes
[DEBUG]   [Railway] Received response - Status: 200, Data size: 173 bytes
[DEBUG]   [Railway] Navigating response path: ["projectCreate"]
[DEBUG]   [Railway] Final GraphQL result: {
    environments =     {
        edges =         (
                        {
                node =                 {
                    id = "6a364e43-c032-4f3a-9216";
                };
            }
        );
    };
    id = "63a4880b-cb75-4507-87ea";
    name = "live-web";
}
[DEBUG]   [Railway] Received project creation result: ["environments": {
    edges =     (
                {
            node =             {
                id = "6a364e43-c032-4f3a-9216";
            };
        }
    );
}, "name": live-web, "id": 63a4880b-cb75-4507-87ea]
[SUCCESS] [Railway] Project created successfully - ID: 63a4880b-cb75-4507-87ea, Environment ID: 6a364e43-c032-4f3a-9216
[DEBUG]   [Railway] Starting deployStaticSite for projectID: 63a4880b-cb75-4507-87ea-2e296b760259, environmentID: 6a364e43-c032-4f3a-9216
[DEBUG]   [Railway] Creating a new WEB service for static site deployment
[DEBUG]   [Railway] Preparing GraphQL request - Query: mutation CreateService($input: ServiceCreateInput!..., Variables: ["input": ["environmentId": "6a364e43-c032-4f3a-9216", "name": "static", "projectId": "63a4880b-cb75-4507-87ea", "serviceType": "WEB"]]
[DEBUG]   [Railway] Sending GraphQL request - Body size: 291 bytes
[DEBUG]   [Railway] Received response - Status: 400, Data size: 86 bytes
[ERROR]   [Railway] GraphQL errors: [["message": Problem processing request, "traceId": 6002140161088466581]]
[ERROR]   [RailwayUploadSheet] ✗ Problem processing request

swiftdev12
HOBBYOP

9 months ago

this is what it shows


swiftdev12
HOBBYOP

9 months ago

check the trace id please


windspore
FREE

9 months ago

The issue seems to happen when creating the service after the project is successfully made. The project creation part works fine, but when you try to create the WEB service for the static site, Railway throws “Problem processing request” with a 400 error.

This usually means something in the request body is wrong or incomplete.

Double check that the serviceType is exactly what Railway expects. For static sites, Railway usually expects a Nixpacks deployment, not manual static uploads via the API like this.

Also make sure you are passing:

- The correct `projectId`

- The correct `environmentId`

- The right serviceType (it should be "web", lowercase)

Here’s a possible issue: In your request, you’re using `"serviceType": "WEB"` but Railway probably expects `"serviceType": "web"` (lowercase).

Try changing that and sending the request again.

If the problem stays, it might be that Railway’s public API doesn’t fully support static deployments via API — you may need to use the CLI or connect via GitHub for static files.

Also, the trace ID is just for internal Railway debugging — you can’t check it yourself but you can send it to Railway support if you open a ticket.


windspore

The issue seems to happen when creating the service after the project is successfully made. The project creation part works fine, but when you try to create the WEB service for the static site, Railway throws “Problem processing request” with a 400 error.This usually means something in the request body is wrong or incomplete.Double check that the serviceType is exactly what Railway expects. For static sites, Railway usually expects a Nixpacks deployment, not manual static uploads via the API like this.Also make sure you are passing:- The correct `projectId`- The correct `environmentId`- The right serviceType (it should be "web", lowercase)Here’s a possible issue: In your request, you’re using `"serviceType": "WEB"` but Railway probably expects `"serviceType": "web"` (lowercase).Try changing that and sending the request again.If the problem stays, it might be that Railway’s public API doesn’t fully support static deployments via API — you may need to use the CLI or connect via GitHub for static files.Also, the trace ID is just for internal Railway debugging — you can’t check it yourself but you can send it to Railway support if you open a ticket.

swiftdev12
HOBBYOP

9 months ago

It does work, because I had achieved this before, but I think i removed the wrong function or something. not entirely sure.. but what I am trying to achieve has already been done, since I have done it before, just trying to recreate it for another project.


9 months ago

I'm sorry but we cannot assist here further as the issue is not with the Railway platform, I will step out to let the community help you, I have also left you with working example code.


swiftdev12
HOBBYOP

9 months ago

I have used your code.


swiftdev12
HOBBYOP

9 months ago

just mine is only for static service type not automated


9 months ago

These are errors from your own code, I cannot offer coding support, sorry.


Loading...