POST - /git/account

General Information


Service

API

Method

Data Models

Workflow

Service

API

Method

Data Models

Workflow

repositories

/git/account

POST

N/A

N/A

Description

Login and add account

Input


Type: application/json

Input

Source

Required

Type

Description

Input

Source

Required

Type

Description

username

body

Yes

string

 

password

body

No

string

 

token

body

No

string

 

label

body

Yes

string

 

provider

body

Yes

string

["github", "bitbucket", "bitbucket_enterprise"]

domain

body

Yes

string

 

type

body

Yes

string

["personal", "organization"]

access

body

Yes

string

["public", "private"]

oauthKey

body

No

string

only when provider is bitbucket

oauthSecret

body

No

string

only when provider is bitbucket

 

Output


Response

SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response 

Valid Response

{ "result": true, "data": { "id": "5f3bca8435b5eea2c556ca9e", "message": "Repositories are being added..." } }

Invalid Response

{ "result":false, "errors":{ "codes":[602], "details":[ { "code":602, "message":"Model error: + %model_error%" } ] } }

Response schema

Follow this link to check out the response JSON Schema

SOAJS Error Codes


 

Code

Description

Code

Description

402

User account already exists.

602

Model error: + %model_error%

603

Provider not found.

604

error: + %model_error%

Â