Skip to content

Latest commit

 

History

History
2393 lines (1367 loc) · 28.8 KB

index.adoc

File metadata and controls

2393 lines (1367 loc) · 28.8 KB

ConfAPI for Bitbucket

Abstract
This plugin provides methods for accessing configuration for Bitbucket.

1. Access

  • HTTP Basic Authentication basicAuth

2. Endpoints

POST /application-links

Add an application link

Description
Parameters
Body Parameter
Name Description Required Default Pattern

ApplicationLinkBean

ApplicationLinkBean

X

Query Parameters
Name Description Required Default Pattern

ignore-setup-errors

-

false

Return Type
Content Type
  • application/json

Responses
Table 1. http response codes
Code Message Datatype

200

Returns the added application link.

ApplicationLinkBean

0

Returns a list of error messages.

ErrorCollection

Samples

DELETE /application-links/{uuid}

Delete an application link

Description
Parameters
Path Parameters
Name Description Required Default Pattern

uuid

X

null

Return Type

-

Content Type
  • /

Responses
Table 2. http response codes
Code Message Datatype

200

Returns an empty body.

<<>>

0

Returns a list of error messages.

ErrorCollection

Samples

DELETE /application-links

Delete all application links

Description
Note
The 'force' parameter must be set to 'true' in order to execute this request.
Parameters
Query Parameters
Name Description Required Default Pattern

force

-

null

Return Type

-

Content Type
  • /

Responses
Table 3. http response codes
Code Message Datatype

200

Returns an empty body.

<<>>

0

Returns a list of error messages.

ErrorCollection

Samples

GET /application-links/{uuid}

Get an application link

Description

Upon successful request,

Parameters
Path Parameters
Name Description Required Default Pattern

uuid

X

null

Return Type
Content Type
  • application/json

Responses
Table 4. http response codes
Code Message Datatype

200

Returns the requested application link.

ApplicationLinkBean

0

Returns a list of error messages.

ErrorCollection

Samples

GET /application-links

Get all application links

Description
Parameters
Return Type
Content Type
  • application/json

Responses
Table 5. http response codes
Code Message Datatype

200

Returns all application links.

ApplicationLinksBean

0

Returns a list of error messages.

ErrorCollection

Samples

PUT /application-links/{uuid}

Update an application link

Description
Parameters
Path Parameters
Name Description Required Default Pattern

uuid

X

null

Body Parameter
Name Description Required Default Pattern

ApplicationLinkBean

ApplicationLinkBean

X

Query Parameters
Name Description Required Default Pattern

ignore-setup-errors

-

false

Return Type
Content Type
  • application/json

Responses
Table 6. http response codes
Code Message Datatype

200

Returns the updated application link.

ApplicationLinkBean

0

Returns a list of error messages.

ErrorCollection

Samples

PUT /application-links

Set or update a list of application links

Description
Note
All existing application links with the same 'rpcUrl' attribute are updated.
Parameters
Body Parameter
Name Description Required Default Pattern

ApplicationLinksBean

ApplicationLinksBean

X

Query Parameters
Name Description Required Default Pattern

ignore-setup-errors

-

false

Return Type
Content Type
  • application/json

Responses
Table 7. http response codes
Code Message Datatype

200

Returns all application links.

ApplicationLinksBean

0

Returns a list of error messages.

ErrorCollection

Samples

2.2. Directories

2.2.1. addDirectory

POST /directories

Add a user directory

Description
Parameters
Body Parameter
Name Description Required Default Pattern

AbstractDirectoryBean

AbstractDirectoryBean

X

Query Parameters
Name Description Required Default Pattern

test-connection

-

false

Return Type
Content Type
  • application/json

Responses
Table 8. http response codes
Code Message Datatype

200

Returns the added directory.

AbstractDirectoryBean

0

Returns a list of error messages.

ErrorCollection

Samples

2.2.2. deleteDirectories

DELETE /directories

Delete all user directories

Description
Note
The 'force' parameter must be set to 'true' in order to execute this request.
Parameters
Query Parameters
Name Description Required Default Pattern

force

-

null

Return Type

-

Content Type
  • /

Responses
Table 9. http response codes
Code Message Datatype

200

Returns an empty body.

<<>>

0

Returns a list of error messages.

ErrorCollection

Samples

2.2.3. deleteDirectory

DELETE /directories/{id}

Delete a user directory

Description
Parameters
Path Parameters
Name Description Required Default Pattern

id

X

null

Return Type

-

Content Type
  • /

Responses
Table 10. http response codes
Code Message Datatype

200

Returns an empty body.

<<>>

0

Returns a list of error messages.

ErrorCollection

Samples

2.2.4. getDirectories

GET /directories

Get all user directories

Description
Parameters
Return Type
Content Type
  • application/json

Responses
Table 11. http response codes
Code Message Datatype

200

Returns all directories.

DirectoriesBean

0

Returns a list of error messages.

ErrorCollection

Samples

2.2.5. getDirectory

GET /directories/{id}

Get a user directory

Description
Parameters
Path Parameters
Name Description Required Default Pattern

id

X

null

Return Type
Content Type
  • application/json

Responses
Table 12. http response codes
Code Message Datatype

200

Returns the requested directory.

AbstractDirectoryBean

0

Returns a list of error messages.

ErrorCollection

Samples

2.2.6. setDirectories

PUT /directories

Set or update a list of user directories

Description
Note
All existing directories with the same 'name' attribute are updated.
Parameters
Body Parameter
Name Description Required Default Pattern

DirectoriesBean

DirectoriesBean

X

Query Parameters
Name Description Required Default Pattern

test-connection

-

false

Return Type
Content Type
  • application/json

Responses
Table 13. http response codes
Code Message Datatype

200

Returns all directories.

DirectoriesBean

0

Returns a list of error messages.

ErrorCollection

Samples

2.2.7. setDirectory

PUT /directories/{id}

Update a user directory

Description
Parameters
Path Parameters
Name Description Required Default Pattern

id

X

null

Body Parameter
Name Description Required Default Pattern

AbstractDirectoryBean

AbstractDirectoryBean

X

Query Parameters
Name Description Required Default Pattern

test-connection

-

false

Return Type
Content Type
  • application/json

Responses
Table 14. http response codes
Code Message Datatype

200

Returns the updated directory.

AbstractDirectoryBean

0

Returns a list of error messages.

ErrorCollection

Samples

2.3. Ping

2.3.1. getPing

GET /ping

Ping method for probing the REST API.

Description
Parameters
Return Type

-

Responses
Table 15. http response codes
Code Message Datatype

200

Returns 'pong'

<<>>

Samples

2.4. Settings

2.4.1. getSettings

GET /settings

Get the application settings

Description
Parameters
Return Type
Content Type
  • application/json

Responses
Table 16. http response codes
Code Message Datatype

200

Returns the application settings

SettingsBean

0

Returns a list of error messages.

ErrorCollection

Samples

2.4.2. setSettings

PUT /settings

Set the application settings

Description
Parameters
Body Parameter
Name Description Required Default Pattern

SettingsBean

SettingsBean

X

Return Type
Content Type
  • application/json

Responses
Table 17. http response codes
Code Message Datatype

200

Returns the application settings

SettingsBean

0

Returns a list of error messages.

ErrorCollection

Samples

3. Models

3.1. AbstractDirectoryBean

Field Name Required Type Description Format

id

Long

int64

name

X

String

description

String

active

Boolean

server

DirectoryLdapServer

permissions

DirectoryLdapPermissions

advanced

DirectoryInternalAdvanced

credentialPolicy

DirectoryInternalCredentialPolicy

schema

DirectoryLdapSchema

3.2. ApplicationLinkBean

Field Name Required Type Description Format

uuid

UUID

uuid

name

X

String

type

X

String

Enum: BAMBOO, JIRA, BITBUCKET, CONFLUENCE, FISHEYE, CROWD,

displayUrl

X

URI

uri

rpcUrl

X

URI

uri

primary

Boolean

status

String

Enum: AVAILABLE, UNAVAILABLE, CONFIGURATION_ERROR,

username

String

password

String

3.3. ApplicationLinksBean

Field Name Required Type Description Format

applicationLinks

List of ApplicationLinkBean

3.4. DirectoriesBean

Field Name Required Type Description Format

directories

List of AbstractDirectoryBean

3.5. DirectoryCrowdAdvanced

Field Name Required Type Description Format

enableNestedGroups

Boolean

enableIncrementalSync

Boolean

updateGroupMembershipMethod

String

updateSyncIntervalInMinutes

Integer

int32

3.6. DirectoryCrowdBean

Field Name Required Type Description Format

id

Long

int64

name

X

String

description

String

active

Boolean

server

DirectoryCrowdServer

permissions

DirectoryCrowdPermissions

advanced

DirectoryCrowdAdvanced

3.7. DirectoryCrowdPermissions

Field Name Required Type Description Format

readOnly

Boolean

fullAccess

Boolean

3.8. DirectoryCrowdServer

Field Name Required Type Description Format

url

X

URI

uri

proxy

DirectoryCrowdServerProxy

appUsername

X

String

appPassword

X

String

connectionTimeoutInMillis

Long

int64

maxConnections

Integer

int32

3.9. DirectoryCrowdServerProxy

Field Name Required Type Description Format

host

String

port

Integer

int32

username

String

password

String

3.10. DirectoryGenericBean

Field Name Required Type Description Format

id

Long

int64

name

X

String

description

String

active

Boolean

3.11. DirectoryInternalAdvanced

Field Name Required Type Description Format

enableNestedGroups

Boolean

3.12. DirectoryInternalBean

Field Name Required Type Description Format

id

Long

int64

name

X

String

description

String

active

Boolean

credentialPolicy

DirectoryInternalCredentialPolicy

advanced

DirectoryInternalAdvanced

permissions

DirectoryInternalPermissions

3.13. DirectoryInternalCredentialPolicy

Field Name Required Type Description Format

passwordRegex

String

passwordComplexityMessage

String

passwordMaxAttempts

Long

int64

passwordHistoryCount

Long

int64

passwordMaxChangeTime

Long

int64

passwordExpiryNotificationDays

List of [integer]

int32

passwordEncryptionMethod

String

3.14. DirectoryInternalPermissions

Field Name Required Type Description Format

addGroup

Boolean

addUser

Boolean

modifyGroup

Boolean

modifyUser

Boolean

modifyGroupAttributes

Boolean

modifyUserAttributes

Boolean

removeGroup

Boolean

removeUser

Boolean

3.15. DirectoryLdapBean

Field Name Required Type Description Format

id

Long

int64

name

X

String

description

String

active

Boolean

server

DirectoryLdapServer

schema

DirectoryLdapSchema

permissions

DirectoryLdapPermissions

3.16. DirectoryLdapPermissions

Field Name Required Type Description Format

readOnly

Boolean

readOnlyForLocalGroups

Boolean

fullAccess

Boolean

3.17. DirectoryLdapSchema

Field Name Required Type Description Format

baseDn

String

userDn

String

groupDn

String

3.18. DirectoryLdapServer

Field Name Required Type Description Format

host

X

String

port

Integer

int32

useSsl

Boolean

username

String

password

String

3.19. ErrorCollection

Field Name Required Type Description Format

errorMessages

List of [string]

3.20. SettingsBean

Field Name Required Type Description Format

baseUrl

URI

uri

mode

String

title

String