Skip to content

Latest commit

 

History

History
565 lines (397 loc) · 18.4 KB

api.md

File metadata and controls

565 lines (397 loc) · 18.4 KB

strider v1.0.0

Strider API

Table of contents


Account

Change Email

Back to top

Changes the email address for the active user (the API user).

POST /account/email

Parameters - Request Body Parameters

Name Type Description
email String

The new email address. This must be a VALID email address.

Change jobs quantity on page

Back to top

Changes the jobs quantity on page for the active user (the API user).

POST /account/jobsQuantityOnPage

Parameters - Request Body Parameters

Name Type Description
quantity Number

The new value.

Change Password

Back to top

Changes the password for the active user (the API user).

POST /account/password

Parameters - Request Body Parameters

Name Type Description
password String

The new password, which must be at least 6 characters long.

Size range: 6..

Delete Provider Account

Back to top

Deletes a provider account for the active user (the API user).

DELETE /account/:provider/:id

Parameters - Parameter

Name Type Description
provider String

Type of provider, e.g. github

id Number

Unique provider identification

Update Provider Account

Back to top

Updates a provider account for the active user (the API user).

PUT /account/:provider/:id

Parameters - Parameter

Name Type Description
provider String

Type of provider, e.g. github

id Number

Unique provider identification

Admin

Get All Users

Back to top

Retrieves a list of all Strider users.

GET /admin/users

Examples

CURL Example:

curl -X GET http://localhost/admin/users

Revoke Invite

Back to top

Revokes a previously sent Strider invitation.

POST /admin/invite/revoke

Parameters - Request Body Parameters

Name Type Description
invite_code String

The invite code/token of the invite being revoked.

Examples

CURL Example:

curl -X POST -d invite_code=xoxox http://localhost/invite/revoke

Send Invite

Back to top

Create & email a new Strider invite.

POST /admin/invite/new

Parameters - Request Body Parameters

Name Type Description
invite_code String

The invite code/token to use in the invitation

email String

The email address of the new user being invited

Examples

CURL Example:

curl -X POST -d invite_code=xoxox -d [email protected] http://localhost/invite/new

Branch

Add Branch

Back to top

Add a new branch for a project.

POST /:org/:repo/branches

Parameters - Request Body Parameters

Name Type Description
name String

The name of the new branch

cloneName String

The name of the cloned branch

Parameters - Request URL Parameters

Name Type Description
org String

The organization name for the project. This is usually a GitHub user or organization name (e.g. "strider" in "strider-cd/strider") but may vary from one project provider to another. (as another example, in GitLab this refers to the repository's "group").

repo String

The project's repository name.

Examples

CURL Example:

curl -X POST -d name=newbranch http://localhost/api/strider-cd/strider/branches

Delete Branch

Back to top

Deletes a branch from a project

DELETE /:org/:repo/branches

Parameters - Request Body Parameters

Name Type Description
name String

The name of the branch to delete

Parameters - Request URL Parameters

Name Type Description
org String

The organization name for the project. This is usually a GitHub user or organization name (e.g. "strider" in "strider-cd/strider") but may vary from one project provider to another. (as another example, in GitLab this refers to the repository's "group").

repo String

The project's repository name.

Examples

CURL Example:

curl -X DELETE -d name=mybranch http://localhost/api/strider-cd/strider/branches

Reorder Branches

Back to top

Updates the branch order for a project.

PUT /:org/:repo/branches

Parameters - Request Body Parameters

Name Type Description
branches String

The new branch order, comma delimited

Parameters - Request URL Parameters

Name Type Description
org String

The organization name for the project. This is usually a GitHub user or organization name (e.g. "strider" in "strider-cd/strider") but may vary from one project provider to another. (as another example, in GitLab this refers to the repository's "group").

repo String

The project's repository name.

Examples

CURL Example:

curl -X PUT -d branches=master,testing http://localhost/api/strider-cd/strider/branches

Collaborators

Add Collaborator

Back to top

Add a new collaborator to a repository/project.

POST /:org/:repo/collaborators

Parameters - Request Body Parameters

Name Type Description
email String

Email address to add. If the user is not registered with Strider, we will send them an invite. If they are already registered, they will receive a notification of access.

access Number

Access level to grant to the new collaborator. This can be 0, for read only access, or 2 for admin access.

Default value: 0

Parameters - Request URL Parameters

Name Type Description
org String

The organization name for the project. This is usually a GitHub user or organization name (e.g. "strider" in "strider-cd/strider") but may vary from one project provider to another. (as another example, in GitLab this refers to the repository's "group").

repo String

The project's repository name.

Examples

CURL Example:

curl -X GET -d '{"email":"[email protected]", "access":2}' http://localhost/api/strider-cd/strider/collaborators

Delete Collaborator

Back to top

Remove a collaborator from a repository/project.

DELETE /:org/:repo/collaborators

Parameters - Request Body Parameters

Name Type Description
email String

Email address to remove from the repo/project.

Parameters - Request URL Parameters

Name Type Description
org String

The organization name for the project. This is usually a GitHub user or organization name (e.g. "strider" in "strider-cd/strider") but may vary from one project provider to another. (as another example, in GitLab this refers to the repository's "group").

repo String

The project's repository name.

Examples

CURL Example:

curl -X DELETE -d '{"email":"[email protected]"}' http://localhost/api/strider-cd/strider/collaborators

Get Collaborators

Back to top

Gets a list of collaborators for a project

GET /:org/:repo/collaborators

Parameters - Request URL Parameters

Name Type Description
org String

The organization name for the project. This is usually a GitHub user or organization name (e.g. "strider" in "strider-cd/strider") but may vary from one project provider to another. (as another example, in GitLab this refers to the repository's "group").

repo String

The project's repository name.

Examples

CURL Example:

curl -X GET http://localhost/api/strider-cd/strider/collaborators

Job

Get Latest Jobs

Back to top

Return JSON object containing the most recent build status for each configured repo This function is used to build the main dashboard status page. The result is separated into {public: [], yours: []}.

Note: the private ones are just ones that the current user is a collaborator on and are not necessarily private

GET /api/jobs

Examples

CURL Example:

curl -X GET http://localhost/api/jobs

Start Job

Back to top

Executes a strider test and, optionally, deployment.

POST /:org/:repo/start

Parameters - Request Body Parameters

Name Type Description
type String

Denotes the type of job to run. This can be "TEST_ONLY", which indicates that only the test stages of the job should be executed or "TEST_AND_DEPLOY", which indicates that all stages should be executed.

Default value: TEST_ONLY
branch String

Indicates which branch configuration should be executed.

Default value: master
message String

An optional message to include as the title of the execution.

Default value: Manually Retesting/Redeploying

Parameters - Request URL Parameters

Name Type Description
org String

The organization name for the project. This is usually a GitHub user or organization name (e.g. "strider" in "strider-cd/strider") but may vary from one project provider to another. (as another example, in GitLab this refers to the repository's "group").

repo String

The project's repository name.

Examples

CURL Example:

curl -X POST http://localhost/api/strider-cd/strider/start

Provider

Get Project Provider

Back to top

Get the provider config for the specified project

GET /:org/:repo/provider

Parameters - Request URL Parameters

Name Type Description
org String

The organization name for the project. This is usually a GitHub user or organization name (e.g. "strider" in "strider-cd/strider") but may vary from one project provider to another. (as another example, in GitLab this refers to the repository's "group").

repo String

The project's repository name.

Examples

CURL Example:

curl -X GET http://localhost:3000/strider-cd/strider/provider

Update Project Provider

Back to top

Update a project's provider

POST /:org/:repo/provider

Parameters - Request URL Parameters

Name Type Description
org String

The organization name for the project. This is usually a GitHub user or organization name (e.g. "strider" in "strider-cd/strider") but may vary from one project provider to another. (as another example, in GitLab this refers to the repository's "group").

repo String

The project's repository name.

Examples

CURL Example:

curl -X POST http://localhost:3000/strider-cd/strider/provider

Repo

Clear Cache

Back to top

Clears/invalidates the cache for a project.

DELETE /:org/:repo/cache

Parameters - Request URL Parameters

Name Type Description
org String

The organization name for the project. This is usually a GitHub user or organization name (e.g. "strider" in "strider-cd/strider") but may vary from one project provider to another. (as another example, in GitLab this refers to the repository's "group").

repo String

The project's repository name.

Examples

CURL Example:

curl -X DELETE http://localhost/api/strider-cd/strider/cache

Create Repo

Back to top

Create a new project for a repo.

PUT /:org

Parameters - Request Body Parameters

Name Type Description
name String

The name of the new branch

display_name String

Human-readable project name

display_url String

The URL for the repo (e.g. Github homepage)

public Boolean

Whether this project is public or not.

Default value: false
prefetch_config Boolean

Whether the strider.json should be fetched in advance.

Default value: true
account String

The ID of provider account

repo_id String

The ID of the repo

provider Object

A json object with 'id' and 'config' properties.

Delete Repo

Back to top

Deletes a repository/project. Also archives all jobs (marks as archived in DB which makes them hidden).

DELETE /:org/:repo

Parameters - Request URL Parameters

Name Type Description
org String

The organization name for the project. This is usually a GitHub user or organization name (e.g. "strider" in "strider-cd/strider") but may vary from one project provider to another. (as another example, in GitLab this refers to the repository's "group").

repo String

The project's repository name.

Examples

CURL Example:

curl -X DELETE http://localhost/api/strider-cd/strider

Session

Create New Session

Back to top

Creates a new user session after validating an email address and password pair.

POST /api/session

Parameters - Request Body Parameters

Name Type Description
email String

The email address to login as (which is used as the username).

password String

The user's password.

Examples

CURL Example:

curl -X POST -d [email protected] -d password=mypass http://localhost/api/session

Get Session

Back to top

Gets the current session information

GET /api/session

Examples

CURL Example:

curl -X GET http://localhost/api/session